Friday, July 11, 2008

Multiple Choices

In our last example (too-many-choices) the MIDlet displays as last screen a ChoiceGroup that allows multiple selection:





This is possible due to the following schema configuration:


schema.put("field.facilities", "choicegroup;;allFacilities;multiple");


And the choicegroup is connected to the following listmodel:

schema.put("listmodel.allFacilities",
"1;Air Pump;2;Oil Change;7;Car Wash;4;Snack Bar;6;Convenience Store;12;Repair Shop");


Two noteworthy related features:
  • A listmodel has a good reason for a requiring numerical ids for each displayable choice: it saves RMS - when a Collector is submited to a StorageManager, only the ids from selecteted choices are stored, as primitive shorts.

  • The filter componentes are able to deal with choicegroups whatever is their selection modes: exclusive or multiple.

Plus, one noteworthy non-related feature:
  • The last page doesn't have a help definition - in this case Diamond Powder manages to remove the Help Command from screen.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.