Package de.xima.fc.form.common.models
Interface IXItemWidget
-
- All Superinterfaces:
IXItem
,IXItemBasic
public interface IXItemWidget extends IXItem
Interface for widget plugins. Each widget plugin provides a set ofIXItemWidget
classes.- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default String
getCssData()
Deprecated.default String
getCssData(IGetWidgetResourceParams params)
Gets the CSS required by this widget.default String
getCssPath()
Deprecated.default String
getCssResourceURL()
Deprecated.Do not override this, this will method will be removed.default String
getIcon()
default String
getJavaScriptData()
Deprecated.default String
getJavaScriptData(IGetWidgetResourceParams params)
Gets the JavaScript required by this widget.default String
getJavaScriptPath()
Deprecated.default String
getJavaScriptResourceURL()
Deprecated.Do not override this, this will method will be removed.default String
getLabel()
Deprecated.UsegetLabel(Locale)
default String
getLabel(Locale locale)
default InputStream
getResource(String path)
Deprecated.ImplementgetJavaScriptData(IGetWidgetResourceParams)
andgetCssData(IGetWidgetResourceParams)
yourself.default String
getResourceAsString(String path)
Deprecated.ImplementgetJavaScriptData(IGetWidgetResourceParams)
andgetCssData(IGetWidgetResourceParams)
yourself.default void
renderItemPreview(com.hp.gagawa.java.elements.Div container, XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx)
Similar to theIXItemBasic.renderItem(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext)
method, but this is called when the form is viewed in the designer.-
Methods inherited from interface de.xima.fc.form.common.models.IXItemBasic
getAutoReRender, getAvailableProperties, getPrefix, isShouldRenderForAttributeOnLabel, isShouldRenderUnit, isShowInDrawerPanel, isShowInElementSelect, isSubmitsValues, processUpload, renderItem, validate, validate, validateGlobal
-
-
-
-
Method Detail
-
getCssData
@Deprecated default String getCssData()
Deprecated.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()
Deprecated.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 implementgetCssData(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 interfaceIXItemBasic
- Returns:
- The CSS class for the icon of this form item, such as for example
ico-fc-XCheckbox
.
-
getJavaScriptData
@Deprecated default String getJavaScriptData()
Deprecated.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()
Deprecated.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 implementgetJavaScriptData(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.UsegetLabel(Locale)
- 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)
Deprecated.ImplementgetJavaScriptData(IGetWidgetResourceParams)
andgetCssData(IGetWidgetResourceParams)
yourself.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)
Deprecated.ImplementgetJavaScriptData(IGetWidgetResourceParams)
andgetCssData(IGetWidgetResourceParams)
yourself.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 theIXItemBasic.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 interfaceIXItemBasic
- 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:
IXItemBasic.renderItem(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext)
-
-