on 08-11-2008 3:08 PM
Hi All,
I am trying to use a RadioButtonGroupByIndex. In doing so, I have bound the "texts" property to the corresponding node/element in my context.
Now, the RadioButtonGroupByIndex only shows one element... not suprising since the node/element does only have one value.
I guess the texts property actually has to be bound to something like an array... But how??
Anybody out there who can help me??
Thanks, Johannes
Example:
Colors (node, cardinality=0:n)
- name (string)
Fill the context node with values:
String[] colors = { "red", "green", "blue" };
for (int i = 0; i < colors.length; ++i)
{
IColorsElement e = wdContext.createAndAddColorsElement();
e.setName(colors<i>);
}
Bind the "texts" property to attribute "Colors/@name" and you will get a radio button group with 3 buttons. To select the first button, set the lead selection of node "Colors" to 0.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a RadioButton from which the user chooses one entry.
What I need to to know is the entry, the user has chosen.
The RadioButtonGroupByIndex UI Element has a couple of properties e.g. STATE, but there is no "currentlySelectedElement" or the like.
There may be the Event onSelect... Yet do I need to know the currently selected element...
What I mean is means that tell me the actually selected element, e.g.
element 1
-> element 2 //users choice
element 3
then in coding:
wdContext.createAndAddInfoObjectsElement().setSelectedInfoObject(
RadioButtonGroupByIndex.currentlySelectedElement );
// currentlySelectedElement should have the value 'element 2' right now...
I hope this points it out...
Thanks, Johannes
Yes, indeed. The following code provides the value and binds it to a context element:
int leadSelection = wdContext.nodeInfoObjects().getLeadSelection();
IInfoObjectsElement myIInfoObjectsElement = wdContext.nodeInfoObjects().
getInfoObjectsElementAt(leadSelection);
String name = myIInfoObjectsElement.getName();
wdContext.currentInfoObjectsElement().setSelectedInfoObject(name);
wdContext.currentZ_Read_Infoobject_InputElement().setI_Infoobject(name);
So long, Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.