Question

Going "back" from a form doesn't take me to the previous form but back to the main form. What am I doing wrong? Here's more detail:

I have a Command that takes you from the main form of my app to a "human setup" form. From that form if you click on a certain multibutton I go to another form (MaintenanceLevel) like this:

protected void onHumanSetup_MultiButtonMaintenanceAction(Component c, ActionEvent event) {
    // Invoke the next level of form
    showForm("MaintenanceLevel", null);
}

In the "MaintenanceLevel" form I have an Action set to Back, but when I click the menu bar to go back I end up back on the main-form and not the "human setup" where I want to be.

Edit:
Things have got a little worse!! Now when I go back in to view the Commands for my MaintenanceLevel form it's empty: it's forgetting the command I've entered :(

Here is my command setting for MaintenanceLevel form: enter image description here

Was it helpful?

Solution

You don't need to define a back command. Remove it. Codename One automatically creates back commands for you.

The usage for this option is when you create a Button and place it within the form, then you want it to behave as a back button effectively (e.g. cancel button).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top