Class FormButton

java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.impl.LabelElement
org.zkoss.zul.impl.LabelImageElement
org.zkoss.zul.Button
com.saperion.ngc.button.Button
com.saperion.ngc.iform.button.FormButton
All Implemented Interfaces:
EventChild, Localized, Identifiable, Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Disable, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.ext.Uploadable, org.zkoss.zk.ui.sys.ComponentCtrl

public class FormButton extends Button implements EventChild, Localized, Identifiable
A Button that is contained in a IntelligentFormView.
See Also:
  • Constructor Details

    • FormButton

      public FormButton() throws NgcUiException
      Constructor.
      Throws:
      NgcUiException - exception to be handled by view
    • FormButton

      public FormButton(String label, String image) throws NgcUiException
      Constructor.
      Parameters:
      label - Label
      image - Image
      Throws:
      NgcUiException - exception to be handled by view
    • FormButton

      public FormButton(String label) throws NgcUiException
      Constructor.
      Parameters:
      label - Label
      Throws:
      NgcUiException - exception to be handled by view
    • FormButton

      public FormButton(com.saperion.ngc.iform.xml.ButtonType buttonType, com.saperion.ngc.iform.xml.PosType panePos, boolean isNoLocatization) throws NgcUiException
      Constructor.
      Parameters:
      buttonType - Button type
      panePos - Pane position
      isNoLocatization - disables the localization of this button
      Throws:
      NgcUiException - exception to be handled by view
  • Method Details

    • getZclass

      public String getZclass()
      Overrides:
      getZclass in class org.zkoss.zul.Button
    • onClick

      public final void onClick(org.zkoss.zk.ui.event.Event event)
      Handler for onClick event.
      Parameters:
      event - event
    • getEventType

      public ButtonInfo.EventType getEventType()
      Returns:
      Event name
    • setMold

      public void setMold(String mold)
      Specified by:
      setMold in interface org.zkoss.zk.ui.Component
      Overrides:
      setMold in class org.zkoss.zk.ui.AbstractComponent
      See Also:
      • AbstractComponent.setMold(java.lang.String)
    • getKind

      public final com.saperion.ngc.iform.xml.ButtonKindType getKind()
      Returns:
      the kind
    • setKind

      public final void setKind(com.saperion.ngc.iform.xml.ButtonKindType value) throws NgcUiException
      Parameters:
      value - the kind to set
      Throws:
      NgcUiException - exception to be handled by view
    • isUseFields

      public final boolean isUseFields()
      Returns:
      the useFields
    • setUseFields

      public final void setUseFields(boolean value) throws NgcUiException
      Parameters:
      value - the useFields to set
      Throws:
      NgcUiException - exception to be handled by view
    • getSaveAction

      public final com.saperion.ngc.iform.xml.SaveActionType getSaveAction()
      Returns:
      the saveAction
    • setSaveAction

      public final void setSaveAction(com.saperion.ngc.iform.xml.SaveActionType value) throws NgcUiException
      Parameters:
      value - the saveAction to set
      Throws:
      NgcUiException - exception to be handled by view
    • isUtf8

      public final boolean isUtf8()
      Returns:
      the utf8
    • setUtf8

      public final void setUtf8(boolean value) throws NgcUiException
      Parameters:
      value - the utf8 to set
      Throws:
      NgcUiException - exception to be handled by view
    • getWorkflowAction

      public final com.saperion.ngc.iform.xml.WorkflowActionType getWorkflowAction()
      Returns:
      the workflowAction
    • setWorkflowAction

      public final void setWorkflowAction(com.saperion.ngc.iform.xml.WorkflowActionType value) throws NgcUiException
      Parameters:
      value - the workflowAction to set
      Throws:
      NgcUiException - exception to be handled by view
    • getEventtarget

      public Set<org.zkoss.zk.ui.Component> getEventtarget(String eventName)
      Reads the event target for the given event name, if set or the root element.
      Specified by:
      getEventtarget in interface EventChild
      Parameters:
      eventName - Event name or null for main target
      Returns:
      Set of event targets
      See Also:
    • postFormButtonEvent

      public void postFormButtonEvent(ButtonInfo info)
      Posts a FormButtonEvent.
      Parameters:
      info - information about the button pressed.
      See Also:
    • setEventtarget

      public void setEventtarget(org.zkoss.zk.ui.Component comp, String eventName)
      Set the event target.
      Specified by:
      setEventtarget in interface EventChild
      Parameters:
      comp - Event target
      eventName - Event name or null for main target
      See Also:
    • setParent

      public void setParent(org.zkoss.zk.ui.Component parent)
      Specified by:
      setParent in interface org.zkoss.zk.ui.Component
      Overrides:
      setParent in class org.zkoss.zk.ui.AbstractComponent
      See Also:
      • AbstractComponent.setParent(org.zkoss.zk.ui.Component)
    • onPageAttached

      public void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage)
      Specified by:
      onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageAttached in class org.zkoss.zk.ui.AbstractComponent
      See Also:
      • AbstractComponent.onPageAttached(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Page)
    • onPageDetached

      public void onPageDetached(org.zkoss.zk.ui.Page page)
      Specified by:
      onPageDetached in interface org.zkoss.zk.ui.sys.ComponentCtrl
      Overrides:
      onPageDetached in class org.zkoss.zk.ui.AbstractComponent
      See Also:
      • AbstractComponent.onPageDetached(org.zkoss.zk.ui.Page)
    • getParentForm

      public IntelligentFormView getParentForm()
      Returns the parent form or null, if this button is not part of a form.
      Returns:
      parent for or null
    • isNoLocalize

      public boolean isNoLocalize()
      Description copied from interface: Localized
      Returns the noLocalize parameter.
      Specified by:
      isNoLocalize in interface Localized
      Returns:
      noLocalize
    • setNoLocalize

      public void setNoLocalize(boolean noLocalize)
      Description copied from interface: Localized
      Sets the noLocalize parameter that can be used to disable localization of this component.
      Specified by:
      setNoLocalize in interface Localized
      Parameters:
      noLocalize - value
    • generateUUID

      public String generateUUID()
      Specified by:
      generateUUID in interface Identifiable
      Returns:
      the generated uuid for the DOM tree