Class SelectData

java.lang.Object
org.zkoss.stateless.action.data.SelectData
All Implemented Interfaces:
Serializable, ActionData

public class SelectData extends Object implements ActionData
Represents an action is triggered by a user to do a list selection being changed at the client.
Author:
jumperchen
See Also:
  • Field Details

    • ALT_KEY

      public static final int ALT_KEY
      Indicates whether the Alt key is pressed. It might be returned as part of getKeys().
      See Also:
    • CTRL_KEY

      public static final int CTRL_KEY
      Indicates whether the Ctrl key is pressed. It might be returned as part of getKeys().
      See Also:
    • SHIFT_KEY

      public static final int SHIFT_KEY
      Indicates whether the Shift key is pressed. It might be returned as part of getKeys().
      See Also:
  • Constructor Details

    • SelectData

      protected SelectData(Map data)
  • Method Details

    • getSelectedItems

      public List<Integer> getSelectedItems()
      Returns the selected items (never null).
    • getSelectionPaths

      public List<List<Integer>> getSelectionPaths()
      Returns the selected paths of ITree (never null).
    • getReference

      public int getReference()
      Returns the reference item that is the component causing the onSelect event(select or deselect) to be fired. Note: if not multiple, the getReference() is the same with the first item of getSelectedItems().
    • getReferencePath

      public List<Integer> getReferencePath()
      Returns the reference item path that is the component causing the onSelect event(select or deselect) to be fired, such as ITree Note: if not multiple, the getReferencePath() is the same with the first item of getSelectionPaths().
    • getKeys

      public final int getKeys()
      Returns what keys were pressed when the mouse is clicked, or 0 if none of them was pressed. It is a combination of CTRL_KEY, SHIFT_KEY and ALT_KEY.