1 person found this helpful
never tried but I can imagine that this requires a transient attribute to hold the check box state. To implement this you could rap the WS DC call in a POJO and have the POJO exposing a collection that has an additional field (selectBooleanState). This way the field would be updated with the checkbox selection and you would get the select state information from the list item listener
I've managed to set/un-set the checkboxes as part of a database query in the exact way you've just described. That works fine for the initial display, but the problem then is that there's no way to associate which checkbox a user selects with the containing listItem.
I'm trying to achieve this sort of thing which is very common in mobile apps, but doesn't seem possible in ADF mobile (the left image):
I don't know if this forum is the right place to suggest ADF mobile enhancements, but is it possible that the selectManyCheckbox UI component be expanded to allow a little more visual customization (icons, more text etc?).
I think I've managed to concoct a solution to this - it's a bit of a kludge but I'll post it here in case anyone's interested.
When you select a checkbox that sits on a listItem, both ActionListeners (for the checkBox and the listItem) are fired. So in the checkBox bean class, define 2 static variables - one to act as a flag to record the fact that the checkBox has been hit, and one to save the selected/un-selected boolean state. Set these accordingly in the checkBox valueChangeEvent method. Then in the listItem ActionEvent method (same class as the checkBox), check the flag to see if the checkBox has been hit, retrieve any data required from the property listeners, get the checkbox state (selected/unselected), and reset the flag at the end. This way you can distinguish if the checkBox was selected or not as opposed to an accidental click of the listItem, and gives you access to the data on the listItem, so the overall result is like a selectManyCheckBox UI component that's a lot more configurable.
I'm sure there's a more elegant solution this, but it works anyway.