Show TOC

continueWhenSingleEntry(SmappState) methodLocate this document in the navigation structure

When the menu contains a single item, the state will automatically proceed to the continueDyn(1) transition by default.

Syntax
Syntax
protected SmappState continueWhenSingleEntry (SmappState continueState) throws DBException
Parameters
  • continueState the transition returns by the saveSessionVariables() method
Returns
the followUp transition when the menu contains a single item
Exceptions
  • DBException Exception when accessing or saving the session variable from database
Remarks

This method allows the subclass to override the default behavior when there is a need to automatically proceed with different continueDyn() based on the selected menu item. For example, if the menu presents the wallet entries of various types: SVA, CreditCard, BankAccount, etc. Let's say there is one wallet entry of SVA type. In such case, the implementation can override this method to proceed with, for example, continueDyn('SVA') instead of the default continueDyn(1).

This method is called immediately after saveSessionVariables(String, String). The input SmappState parameter is that returned by the saveSessionVariables(String, String). If the saveSessionVariables(String, String) already returns the correct SmappState, or continueDyn('SVA') for the above example, then this method implementation can just return the input parameter (i.e., return continueState;).