on 02-02-2006 1:52 PM
Hi,
We've problem with CheckBoxGroup UI element. We've created a context element and bind its type to a simple type we've created. We've added Enumeration values.
When we set "texts" attribute to the context element, NWDS shows the values with checkboxes right to them.
But when we deployed the application into portal, it displays nothing.
What may be the problem?
Hi,
When creating a simple type with enumeration, there is a checkbox on the enumeration tab that reads "Generate a class representation of the enumeration".
You need to check this box, if you want to use the simple type in checkboxgroups and dropdownlists.
I am not sure if that is the reason for the error in your case, but it is worth checking.
Regards,
Maarten.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hey check on to this,
The Context attribute where the texts for the CheckBoxGroup are located must be in a context node that has Cardinaliy 0..n and the Selection 0..n (to enable multiple selection). The initialization of the context takes place in the method wdDoInit().
Hope this helps u,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi HUSEYIN,
From here
http://help.sap.com/saphelp_nw04/helpdata/en/0a/16e94d251a164392f3a3415c6d643a/frameset.htm
<i>
texts
Specifies the path of the context attribute within a context node whose node elements provide the texts of the individual checkboxes at runtime.
...
The view context must provide the node X that can contain 0 to n values (X.cardinality=0..n). The context node must contain an attribute y that provides the texts for the checkbox fields. The data type of the context attribute y can be any simple data type for example, String, int, and so on. The number of checkboxes equals the number of node elements. The selection of the checkboxes is determined by the multiple selection of the node. The texts property of the CheckBoxGroup UI element is bound to the attribute y by assigning the context path of the context y to the texts property.
</i>
So, you need a node filled with elements containing attributes which is bound to texts proprty of checkBoxGroup.
Best regards, Maksim Rashchynski .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I added a Value Node and an Attribute under this node and fill it with the following code, it works well.
IPrivateNewUserView.ICountriesElement nodeElement;
for (int i = 0; i < 5; i++) {
nodeElement = wdContext.createCountriesElement();
nodeElement.setText("Text_"+i);
wdContext.nodeCountries().addElement(nodeElement);
}
My questions are;
1. IS there any way to bind Simple Type Enumeration Values to CBGroup?
2. What is returned when Text_0 and Text_3 checked? Or how can I check whether Text_3 is checked?
Hi HUSEYIN,
1) iterate through attribute info`s value set and add new elements to node manually:
final IWDAttributeInfo attr = ...;
final ISimpleTypeModifiable type = attr.getModifiableSimpleType();
final IModifiableSimpleValueSet values = type.getSVServices().getModifiableSimpleValueSet();
...
2) Again from here
http://help.sap.com/saphelp_nw04/helpdata/en/0a/16e94d251a164392f3a3415c6d643a/frameset.htm
<i>The selection of the checkboxes is determined by the multiple selection of the node</i>
best regards, Maksim Rashchynski.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.