on 10-16-2007 12:50 PM
Hi Experts,
I have one table and 4 column. i need
1. one check box for selection
2. if i click the check box entire row will be selected.
how to give checkbox?
its very urgent?
Regards,
P.Manivannan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manivannan,
Is your scenario like this?
You have a table with 4 columns
Near to the table , you need a checkbox, for selecting entire rows of the table
In your View Context add 1 value attribute, say 'checkVar' of type boolean.
Then in your view layout insert a check box.
Then go to the properties of checkbox.
select the property 'checked' , bind it to your boolean attribute 'checkVar'.
Then in checkbox's properties itself , select the event 'onToggle'.
create an action for this.
In that action write the coding
{
boolean chk=wdContext.currentContextElement().getCheckVar();
if(chk)
{
for(int i=0;i<wdContext.node<youtTableValueNode>().size();i++)
{
wdContext.node<youtTableValueNode>().setSelected(i,true);
}
}
else
{
wdContext.node<youtTableValueNode>().clearSelection();
}
}
Also note : set the table's property 'selection mode' to 'multi'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
Thanks for ur replies. I got the table with check box. I choose node cardinality is 1.n and selection is 0.n this is correct..and one more thing.
1. How to pass the selected values into another table. the new table placed into the new page.(i had stored Static values in the first table like Sting s[]{'a','b',})
how to do that? please help
Regards,
P.Manivannan.
Hi P.Manivanna,
Add a new attribute typed boolean in your node and put this attribute in your table. Right click at table -> insert column -> right click at new column -> insert TableCellEditor -> select CheckBox and press finish, go to properties of this checkbox and change de properties checked here you put the attribute created above typed boolean.
Regards,
Edson Thomaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
1. Create a table.
2. Bind it with the context elements.
3. Create an attribute with type boolean.
4. Create a check box and bind it with tht boolean variable.
5. Create a button. Here i am writing anexample coding ...
for(int j=0;j<wdContext.nodePassword().size();j++)
{
if(wdContext.nodePassword().getPasswordElementAt(j).getChk())
{
wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodePassword().getPasswordElementAt(j).getName());
wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodePassword().getPasswordElementAt(j).getNo());
}
}
Hop it helps..
GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.