on 03-21-2008 11:53 AM
I have a table that contains checkboxes in one of the columns. I also have two buttons - one to select all (checkboxes) and one to de-select.
I bound the checkbox checked attribute to a boolean in the context attributes the table is being derived from. I can set this flag to true or false and the view displays the checkbox correctly. When I clicked the button and looped though the context changing the checkbox attribute (though the attribute is changed) the table does not show the new state (checked or not checked).
How do I get this checkbox to "refresh" so that it shows checked or not based on the button event results?
Regards,
Diane
Edited by: Diane Fuller on Mar 21, 2008 12:53 PM
No need to refresh. Please post the code of the button handler.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
msgMgr.reportSuccess("Select all");
for (int i=0; i<wdContext.nodeManagerEmployeeList().size(); i++)
{
IManagerEmployeeListElement elem =(IManagerEmployeeListElement)wdContext.nodeManagerEmployeeList().getElementAt(i);
elem.setRosterFlag(true);
msgMgr.reportSuccess(String.valueOf(elem.getRosterFlag()));
}
The view layout shows checkbox - checked = Manager.MaangerEmployeeList.RosterFlag
The messages reported show the values of rosterflag changing but the checkbox never does.
Here is a link to a picture of the context.
http://i219.photobucket.com/albums/cc307/DianeF1photo/work/ManagerContext.jpg
From component Controller
Manager Node
http://i219.photobucket.com/albums/cc307/DianeF1photo/work/ManagerContext-ManagerNode.jpg
Manager Employee Node
http://i219.photobucket.com/albums/cc307/DianeF1photo/work/ManagerContext-ManagerEmployeeNode.jpg
I cannot see what's wrong.
Do you try to implement a multi-selection in the table using check boxes? If yes, why not just setting the selection of the "ManagerEmployeesNode" to 0:n and using the built-in selection functionality of the table? The table has already a "Select All" / "Deselect All" function integrated (at least in newer releases).
Armin
I placed a new column in the table showing the RosterFlag (field that is modifing checkbox checked attribute). It is not changing.
Why is the table not showing current data after a roundtrip (though messages send to page show that the contents changed? Do I have to do something in the wdDoModifyView or something to the table itself?
Diane
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.