Interface IWidgetConfigProviding<TWidgetConfiguration>

Type Parameters:
TWidgetConfiguration - Type of the widget configuration for the widget.
All Known Implementing Classes:
Flowchart, FlowchartBase

public interface IWidgetConfigProviding<TWidgetConfiguration>
Interface for Widget that wish to provide their client configuration as a class. You can then use ComponentHelper.appendWidgetConfig(FacesContext, org.primefaces.util.WidgetBuilder, IWidgetConfigProviding) in your widget renderer.

This interface should usually be implemented by the Widget.

Author:
XIMA MEDIA GmbH
  • Method Details

    • getWidgetConfig

      TWidgetConfiguration getWidgetConfig(javax.faces.context.FacesContext context) throws Exception
      Parameters:
      context - The current faces context.
      Returns:
      The widget configuration to send to the client.
      Throws:
      Exception - When the configuration could not be created for any reason.
    • getDefaultWidgetConfig

      TWidgetConfiguration getDefaultWidgetConfig(javax.faces.context.FacesContext context)
      Parameters:
      context - The current faces context.
      Returns:
      The default widget configuration. Values in the getWidgetConfig(FacesContext) that are equal to the default values are not sent to the client.
    • getWidgetConfigConverter

      IFastJsonConverter getWidgetConfigConverter()
      Returns:
      The converter for converting between the widget configuration and JSON.