on 08-07-2007 11:55 AM
Is it possible to populate the labels on a checkbox group from a Simple Type enumration ?
I have done the following:
1. Defined a Simple Type "texts" and added "Text1", "Text2", "Text3" to the enumeration tab.
2. In the context of the View, created a Value Node (cardinality= 0..n, initilazieLeadSelection = false, selection=0..n), "cbTexts" with the value attribute of "texts" as per step 1.
3. Added the CB group to the View and set the attribute "texts" from the context.
When I run the app nothing appears on the screen.
Thanks
You misunderstood the binding model for CheckBoxGroup. It does not use binding against a value set of a DDIC type like for example RadioButtonGroupByKey.
What you can do: Create a context node "Items" with an attribute "text", define a supply function for "Items". In the supply function, iterate over the enum values and create/add a corresponding element to node "Items". Bind CheckBoxGroup.texts property to "Items.text".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
CheckboxGroup is work like a multi select table .
create a value node name "C" (cardinality 0..n ,selection 0..n) , create a value attribute text under it. create a ui element checkboxgroup bind texts=C.text.
code to check which check boxes select
//displays checked check box texts
for(int i=0;i<wdContext.nodeC().size();i++){
if(wdContext.nodeC().isMultiSelected(i)){
String text=wdContext.nodeC().getCElementAt(i).getText();
wdComponentAPI.getMessageManager().reportSuccess(text);
}
}
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.