Interface IXItemWidget

All Superinterfaces:
IXItem, IXItemBasic

public interface IXItemWidget extends IXItem
Interface for widget plugins. Each widget plugin provides a set of IXItemWidget classes.
Author:
XIMA MEDIA GmbH
  • Method Details

    • getCssData

      @Deprecated default String getCssData()
      Gets the CSS required by this widget.
      Returns:
      The CSS required by this widget.
    • getCssData

      default String getCssData(IGetWidgetResourceParams params) throws IOException
      Gets the CSS required by this widget. The returned content may depend on the provided params. For example, a plugin might want to replace links in the JavaScript resource with the current context path where the application is running.
      Parameters:
      params - Parameters for obtaining the resource.
      Returns:
      The CSS required by this widget.
      Throws:
      IOException - When the resource could not be read. The form will proceed to load, but the resource will not be available.
    • getCssPath

      @Deprecated default String getCssPath()
      Gets the CSS required by this widget.
      Returns:
      The path of the CSS resource within the plugin's class path.
    • getCssResourceURL

      @Deprecated default String getCssResourceURL()
      Deprecated.
      Do not override this, this will method will be removed. You do not need to care how the resource is served, you only need to implement getCssData(IGetWidgetResourceParams).
      Get the URL from which to read CSS resource.
      Returns:
      The URL from which to read CSS resource
    • getIcon

      default String getIcon()
      Specified by:
      getIcon in interface IXItemBasic
      Returns:
      The CSS class for the icon of this form item, such as for example ico-fc-XCheckbox.
    • getJavaScriptData

      @Deprecated default String getJavaScriptData()
      Gets the JavaScript required by this widget.
      Returns:
      The JavaScript required by this widget.
    • getJavaScriptData

      default String getJavaScriptData(IGetWidgetResourceParams params) throws IOException
      Gets the JavaScript required by this widget. The returned content may depend on the provided params. For example, a plugin might want to replace links in the JavaScript resource with the current context path where the application is running.
      Parameters:
      params - Parameters for obtaining the resource.
      Returns:
      The JavaScript required by this widget.
      Throws:
      IOException - When the resource could not be read. The form will proceed to load, but the resource will not be available.
    • getJavaScriptPath

      @Deprecated default String getJavaScriptPath()
      Gets the JavaScript required by this widget.
      Returns:
      The path of the JavaScript resource within the plugin's class path.
    • getJavaScriptResourceURL

      @Deprecated default String getJavaScriptResourceURL()
      Deprecated.
      Do not override this, this will method will be removed. You do not need to care how the resource is served, you only need to implement getJavaScriptData(IGetWidgetResourceParams).
      Get the URL from which to read JavaScript resource.
      Returns:
      The URL from which to read CSS resource
    • getLabel

      @Deprecated default String getLabel()
      Deprecated.
      Returns:
      The label of this widget.
    • getLabel

      default String getLabel(Locale locale)
      Parameters:
      locale - Locale for which to find the label.
      Returns:
      The localized label of this widget.
    • getResource

      @Deprecated default InputStream getResource(String path)
      Helper method to read a resource for the class path of this plugin.
      Parameters:
      path - Path to the resource within the plugin's class path.
      Returns:
      An input stream with the contents of the resource, or null if not found.
    • getResourceAsString

      @Deprecated default String getResourceAsString(String path)
      Helper method to read a resource for the class path of this plugin.
      Parameters:
      path - Path to the resource within the plugin's class path.
      Returns:
      The contents of the resource, or null if not found.
    • renderItemPreview

      default void renderItemPreview(com.hp.gagawa.java.elements.Div container, XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx)
      Description copied from interface: IXItemBasic
      Similar to the IXItemBasic.renderItem(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext) method, but this is called when the form is viewed in the designer. You can, if necessary, render the form slightly differently in the desigern. This is useful, for example, when when you do not want users to be able to interact with the form element directly in the designer preview area.
      Specified by:
      renderItemPreview in interface IXItemBasic
      Parameters:
      container - The container that will contain this form item in the final form. You should append children to this container.
      renderData - The current render data with the properties and options of the item.
      renderCtx - The current render context giving you access to the global configuration.
      formRenderCtx - The form render context giving you access to the global form configuration.
      See Also: