cancel
Showing results for 
Search instead for 
Did you mean: 

Checkbox check in table not showing new bound value based on button

former_member540174
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

No need to refresh. Please post the code of the button handler.

Armin

former_member540174
Participant
0 Kudos

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.

Former Member
0 Kudos

Please post the context structure. Is "ManagerEmployeeList" a non-singleton subnode of "Manager"?

Armin

former_member540174
Participant
0 Kudos
Former Member
0 Kudos

That's not enough information. What's the cardinality of node "Manager"? Can you post a screenshot of the context structure in the component controller (or wherever the origin of the mapping is)?

Armin

Former Member
0 Kudos

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

former_member540174
Participant
0 Kudos

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

former_member540174
Participant
0 Kudos

AHHHHH!!! The buildView method in the wdDoModify view was running everytime. I had commented out the if (firstTime) statement.

Thank you for looking and responding so quickly!

Diane.

Answers (0)