Package de.xima.fc.form.common.models
Interface IXItemWidget
- All Superinterfaces:
IXItem
,IXItemBasic
Interface for widget plugins. Each widget plugin provides a set of
IXItemWidget
classes.- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Deprecated.default String
getCssData
(IGetWidgetResourceParams params) Gets the CSS required by this widget.default String
Deprecated.default String
Deprecated.Do not override this, this will method will be removed.default String
getIcon()
default String
Deprecated.default String
Gets the JavaScript required by this widget.default String
Deprecated.default String
Deprecated.Do not override this, this will method will be removed.default String
getLabel()
Deprecated.UsegetLabel(Locale)
default String
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, getFieldNameConventions, getPrefix, isShouldRenderForAttributeOnLabel, isShouldRenderUnit, isShowInDrawerPanel, isShowInElementSelect, isSubmitsValues, processUpload, renderItem, validate, validate, validateGlobal
-
Method Details
-
getCssData
Deprecated.Gets the CSS required by this widget.- Returns:
- The CSS required by this widget.
-
getCssData
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.Gets the CSS required by this widget.- Returns:
- The path of the CSS resource within the plugin's class path.
-
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
- 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.Gets the JavaScript required by this widget.- Returns:
- The JavaScript required by this widget.
-
getJavaScriptData
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.Gets the JavaScript required by this widget.- Returns:
- The path of the JavaScript resource within the plugin's class path.
-
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.UsegetLabel(Locale)
- Returns:
- The label of this widget.
-
getLabel
- Parameters:
locale
- Locale for which to find the label.- Returns:
- The localized label of this widget.
-
getResource
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.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:
-
getCssData(IGetWidgetResourceParams)
.