on 01-28-2008 7:08 AM
Hi all,
I am new to webdynpro Java. I'm facing a problem while retrieving data from the check box group..
I've taken a simple type "Status" and Node with value attribute named status and set the property of that attribute as the simple type. This attribute is bound to the checkboxgroup.The cardinality of the Node is 0..n
But i am unable to read the checked items of the group.
Please help me out in solving my problem........
Hi Uday,
Welcome to SDN,
You can get the checked check boxes using:
wdContext.node<YOUR NODE NAME>().isMultiSelected(int index) which will return true if the checkbox at index is selected. Node here is the node containing the attribute to which your checkbox is mapped.
Hope this will solve your problem.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If your node Name is test the following is the code
for (int x=0; x< wdContext.nodeTest().size(); x++)
{
if( wdContext.nodeTest().isMultiSelected(x) )
//Do what you want to do here
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the following
for (int x=0; x< wdContext.nodeTest().size(); x++)
{
if( wdContext.nodeTest().isMultiSelected(x) )
// Selected Element
IWDNodeElement nodeElement = wdContext.nodeTest().getElementAt(x);
nodeElement.setAttributeValue("<Your Attribute> ", <Value>);
//Ex setting value for attribute called Name
nodeElement.setAttributeValue("Name", "Test");
}
Regards
Ayyapparaj
User | Count |
---|---|
76 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.