Class ElementCreator

java.lang.Object
com.saperion.ngc.iform.ElementCreator

public final class ElementCreator extends Object
Helper class to create form elements.
  • Constructor Details

    • ElementCreator

      public ElementCreator(IntelligentFormView parent, com.saperion.ngc.iform.xml.PosType framePos, boolean noLocalizeation)
      Constructor.
      Parameters:
      parent - parent iForm component of all elements to create.
      framePos - Frame pos or null, if no pane layout
      noLocalizeation - option to disable localization of the created elements
  • Method Details

    • createBitmaps

      public void createBitmaps(List<com.saperion.ngc.iform.xml.BitmapType> bitmaps, org.zkoss.zk.ui.Component parent) throws NgcUiException
      Creates bitmaps.
      Parameters:
      bitmaps - bitmap definitions
      parent - parent component for the bitmaps
      Throws:
      NgcUiException - exception to be handled by view
    • createLabels

      public Map<Long,FormLabel> createLabels(List<com.saperion.ngc.iform.xml.LabelType> labels, org.zkoss.zk.ui.Component parent)
      Creates labels.
      Parameters:
      labels - label definitions
      parent - parent component for the labels
      Returns:
      a map containing the created labels mapped to their frame-ids
    • createButtons

      public Map<Long,FormButton> createButtons(List<com.saperion.ngc.iform.xml.ButtonType> buttons, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.Component eventParent) throws NgcUiException
      Creates buttons.
      Parameters:
      buttons - button definitions
      parent - parent component for the buttons
      eventParent - Event parent
      Returns:
      List of buttons
      Throws:
      NgcUiException - exception to be handled by view
    • createEditFields

      public Map<Long,IntelligentField> createEditFields(List<com.saperion.ngc.iform.xml.EditFieldType> editFields, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.Component eventParent)
      Creates fields.
      Parameters:
      editFields - list of field definitions
      parent - parent component for the fields
      eventParent - Event parent
      Returns:
      list of created fields
    • createResults

      public Map<Long,ResultSetView> createResults(List<com.saperion.ngc.iform.xml.ResultType> results, org.zkoss.zk.ui.Component parent, boolean stretch, org.zkoss.zk.ui.Component eventParent, String formName, String ddcName)
      Creates result lists.
      Parameters:
      results - list of result list definitions
      parent - parent component of the result lists
      stretch - true, if the result lists should fill it's container
      eventParent - Event parent
      formName - Form name
      ddcName - DDC name
      Returns:
      map of created result sets, identified by their frame id
    • createMashup

      public Map<Long,FormMashup> createMashup(List<com.saperion.ngc.iform.xml.MashupType> mashups, org.zkoss.zk.ui.Component parent) throws NgcUiException
      Creates Mashups.
      Parameters:
      mashups - mashup definitions
      parent - parent component for the mashups
      Returns:
      List of mashups
      Throws:
      NgcUiException - exception to be handled by view
    • createThumbnail

      public Map<Long,FormEditableImage> createThumbnail(List<com.saperion.ngc.iform.xml.ThumbnailType> thumbnails, org.zkoss.zk.ui.Component parent) throws NgcUiException
      Creates thumbnail components.
      Parameters:
      thumbnails - mashup definitions
      parent - parent component for the mashups
      Returns:
      List of mashups
      Throws:
      NgcUiException - exception to be handled by view
    • createViewers

      public Map<Long,DocumentView> createViewers(List<com.saperion.ngc.iform.xml.ViewerType> viewerTypes, org.zkoss.zk.ui.Component parent, boolean stretch, org.zkoss.zk.ui.Component eventParent, String className)
      Creates viewers.
      Parameters:
      viewerTypes - list of viewer definitions
      parent - parent component for the viewers
      stretch - true if the viewers should fill their parent
      eventParent - Event parent
      className - name of the view class to override setting in web.xml (or null if not required)
      Returns:
      Map with created viewers identified by their frame id
    • createTabs

      public Map<Long,FormTabbox> createTabs(List<com.saperion.ngc.iform.xml.TabListType> tabs, boolean stretch, org.zkoss.zk.ui.Component parent, boolean isQueryForm, String formName, String ddcName) throws NgcUiException
      Creates tabs.
      Parameters:
      tabs - list of tablist definitions
      stretch - true if the component should fill its target
      parent - parent component for the tabs
      isQueryForm - true is tabs belong to a query form
      formName - Form name
      ddcName - DDC name
      Returns:
      tabboxes list of created tab boxes
      Throws:
      NgcUiException - exception to be handled by view
    • createHiddenElements

      public Map<Long,IntelligentField> createHiddenElements(com.saperion.ngc.iform.xml.HiddenType hiddenElements, org.zkoss.zk.ui.Component parent)
      Creates and handles hidden elements.
      Parameters:
      hiddenElements - hidden elements
      parent - Parent
      Returns:
      Intelligent fields
    • createIncludes

      public Map<Long,IntelligentFormView> createIncludes(List<com.saperion.ngc.iform.xml.IncludeType> includes, org.zkoss.zk.ui.Component parent, org.zkoss.zk.ui.Component eventTarget, boolean autoQuery) throws NgcUiException
      Creates included elements.
      Parameters:
      includes - included element definitions
      parent - parent component
      eventTarget - Event target
      autoQuery - perform a query automatically
      Returns:
      Created forms
      Throws:
      NgcUiException - exception to be handled by view
    • createElementsBox

      public org.zkoss.zul.Box createElementsBox(org.zkoss.zk.ui.Component mainContainer)
      Creates a box to hold multiple elements.
      Parameters:
      mainContainer - parent of the box
      Returns:
      box
    • createEditableFields

      public boolean createEditableFields(FormMode formMode)
      Decides if fields will be editable.
      Parameters:
      formMode - form mode
      Returns:
      editable
    • createDisabledFields

      public boolean createDisabledFields(FormMode formMode)
      Decides if fields will be disabled.
      Parameters:
      formMode - form mode
      Returns:
      disabled
    • visible

      public static boolean visible(com.saperion.ngc.iform.xml.PosType position)
      Checks the visibility-property of the provided PosType.
      Parameters:
      position - PosType to check
      Returns:
      true if the position's visibility property is true for the web client