tags:

views:

77

answers:

1

I am developing a Java ME application for CLDC devices. I have a requirement where the questions are generated based on the previous response. I would start with one choicegroup and then based on the answer to this choices give another set of question to the user- Kind of Yes/No- If Yes this question or No this question. How do we do that? Am novice in mobile app development. Any help in terms of ideas or blog posts or articles is much appreciated and is of great help.

+1  A: 

Read the MIDP2.0 javadocs, and set aside some time to just experiment with the LCDUI APIs and become familiar with how the different components work. Are you comfortable with the difference between a Form and a List, or a Screen and an Item?

These classes in particular can sometimes be slightly surprising and confusing in how they behave. They also often generate quite different results depending on platform.

What you are looking for can be achieved by doing something like adding an ItemStateListener to your form, whose itemStateChanged() method will get called whenever your first ChoiceGroup gets touched. Add your next form elements in that method based on whatever action has been performed on the ChoiceGroup.

funkybro
Thanks a lot for the information. Will surely look into the documentation. Was also experimenting with choicegroup.
sana