Expose your UiAction objects

You must implement the SearchableEntity.getUiActions(Object, UiActions[]) method to expose your UiAction objects. The following steps demonstrate how to expos an object based on a class named DisplayBookInfo, created in Create a UiAction subclass.
Before you begin: Create a class that implements the SearchableEntity interface. For more information, see Encapsulate your data in the SearchableEntity class.
  1. In your SeachableEntity implementation, import the Arrays class.
    import net.rim.device.api.util.Arrays;
  2. In your SearchableEntity.getUiAction(Object, UiAction[]) method, instantiate a DisplayBookInfo object.
    displayAction = new DisplayBookInfo();
  3. Invoke the setEntryPointIndex() method and specify a single parameter with a value of 1. This configures the UiAction object to use an alternate entry point for your application.
    displayAction.setEntryPointIndex(1);
  4. In your SearchableEntity.getUiAction(Object, UiAction[]) method, invoke the Arrays.add() method to add displayAction to the UiAction[] parameter.
    Arrays.add(uiActions, displayAction);
  5. Return displayAction set the default opertion for SearchableEntity.
    return displayAction;
After you finish: You must provide an alternate entry point for your application. For more information, see Provide an alternate entry point for your application.

Was this information helpful? Send us your comments.