Interface MenuNode

  • All Superinterfaces:
    Component

    public interface MenuNode
    extends Component
    MenuNode represents a menu node on UI.
    Since:
    5.12
    • Method Detail

      • getMenuBean

        MenuBean getMenuBean()
        Get the menu bean to which this menu node belongs.
        Returns:
        MenuBean instance
      • click

        default void click()
        Click this menu node.
      • click

        void click​(java.lang.String expectedConfirmAlertText,
                   boolean accept,
                   java.lang.String redirectURLPattern)
        Click this menu node, and accept or dismiss confirm alert.
        Parameters:
        expectedConfirmAlertText - expected confirm alert text(whole or partial)
        accept - whether to accept or dismiss the alert
        redirectURLPattern - if not null, wait for redirecting to a URL that contains the pattern
      • getInputDataBean

        EntityBean getInputDataBean()
        Get the inputData bean (if any) as command parameters.
        Returns:
        input data bean. return null if there is no input data bean.
      • isDisabled

        boolean isDisabled()
        Is this menu node disabled and not interactable?
        Returns:
        true if disabled, false otherwise
        Since:
        5.19
      • isExpanded

        boolean isExpanded()
        Is this menu node expanded so that its child nodes are visible?
        Returns:
        true if expanded, false otherwise
      • isDisplayed

        boolean isDisplayed()
        Is this menu node displayed (visible)?
        Returns:
        true if displayed, false otherwise
      • expandToggle

        void expandToggle()
        Expand or collapse this menu node so that its child nodes are visible or invisible. Different from click, expanding or collapsing a menu node will not execute the command of this menu node.
      • isLeaf

        boolean isLeaf()
        Is this menu node a leaf?
        Returns:
        true if leaf, false otherwise
      • getParentNode

        MenuNode getParentNode()
        Get parent menu node.
        Returns:
        parent menu node. return null if there is no parent.
      • getChildNodes

        java.util.List<MenuNode> getChildNodes()
        Get child menu nodes.
        Returns:
        a list of menu nodes. return empty if there is no children.
      • getChildNode

        MenuNode getChildNode​(int index)
        GEt child menu node at the index.
        Parameters:
        index - zero-based index
        Returns:
        MenuNode instance. return null if not found.
      • getInputDataDefaultProperty

        EntityProperty getInputDataDefaultProperty()
        Get the default property of this menu node's inputDataBean, which has only one default property named "value".
        Returns:
        EntityProperty instance. return null if it is not found
      • getInputDataProperty

        EntityProperty getInputDataProperty​(java.lang.String name)
        Get the property of this menu node's inputDataBean.
        Parameters:
        name - property name
        Returns:
        EntityProperty instance. return null if it is not found
      • openInputDataBean

        default EntityBean openInputDataBean()
        Open this menu node's inputDataBean. If the inputDataBean is not visible, click this menuNode to open it.
        Returns:
        inputDataBean
        Since:
        5.17