cancel
Showing results for 
Search instead for 
Did you mean: 

DS 1.6 SP2 - Segmented Button - Missing script function

d_otto
Explorer
0 Kudos
295

Hello,

i just installed Design Studio 1.6 SP2 and tested the new feature "Segmented Button".

Now i wanted to set the segment via scripting.

But I do not find something like .setSelectedValue .

How can i achieve to set the selected segment with script functions?

thanks

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dirk,

I think you need to be in SAPUI5 m Mode.

But be aware that such mode also may have other limitations.

Regards

Former Member
0 Kudos

Hi Jose,

The segmented button is available ONLY in the SAPUI5m mode, but it still does not have a functionality to set values at run time using scripts.

Thanks and Regards,

Eshwar Prasanna

d_otto
Explorer
0 Kudos

Hi Eshwar,

thanks for the reply.

I hope this script functions comes with the next version of Design Studio.

regards Dirk

alexander_stettler
Participant
0 Kudos

Still not available with DS 1.6 SP3

Regards,

Alex

Answers (2)

Answers (2)

MustafaBensan
Active Contributor
0 Kudos

Hi Dirk,

I haven't installed SP02 yet but in theory I would expect there to be a selectedKey property which should be settable with a setSelectedKey() script method.  I say this because the segmented button should be based on the UI5 sap.m.SegmentedButton which does have this option if you look at tye examples and documentation: SAPUI5 Explored - Segmented Button

Can you at least set the default selection in the properties panel?

Regards,

Mustafa.

d_otto
Explorer
0 Kudos

Hi Mustafa,

i found no property to define the default selection.

The first segment seems to be the default because if you start the application it looks active.

But if you use getSelectedValue before you selected any segment of the segmented button the result you get is blank.

regards

Dirk

TammyPowlas
Active Contributor
0 Kudos

Dirk - in reading the SAP Help, I would expect the segmented button to work like the normal button component - e.g. not setting the selected value.  This is my interpretation only, perhaps others have suggestions.