public interface IXItemBasic
Modifier and Type | Method and Description |
---|---|
default boolean |
getAutoReRender() |
ArrayList<XItemPropertyDesc> |
getAvailableProperties(Locale locale) |
String |
getIcon() |
String |
getPrefix()
Finds the prefix for form items of this type, such as
cb for checkboxes or tf for input fields. |
boolean |
isSubmitsValues()
Checks whether form items of this type can send values to the server when the form is submitted.
|
void |
renderItem(com.hp.gagawa.java.elements.Div container,
XItemRenderData renderData,
XItemRenderCtx renderCtx,
IXFormRenderContext formRenderCtx)
Creates the HTML for this form item that is included in the final rendered form.
|
default void |
renderItemPreview(com.hp.gagawa.java.elements.Div container,
XItemRenderData renderData,
XItemRenderCtx renderCtx,
IXFormRenderContext formRenderCtx)
Similar to the
renderItem(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext) method, but this is
called when the form is viewed in the designer. |
default List<IXValidationResult> |
validate(IXValidationParams params)
Validates the values that were submitted for this form item.
|
default IXValidationResult |
validate(List<String[]> values,
Locale locale,
Map<Serializable,Serializable> frqSessionAttributes)
Deprecated.
|
default boolean |
validateGlobal(IXGlobalValidationParams params)
Validates the values that were submitted for all form items of this kind.
|
void renderItem(com.hp.gagawa.java.elements.Div container, XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx)
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.renderItemPreview(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext)
default void renderItemPreview(com.hp.gagawa.java.elements.Div container, XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx)
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.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.renderItem(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext)
boolean isSubmitsValues()
ArrayList<XItemPropertyDesc> getAvailableProperties(Locale locale)
locale
- The current locale that can be used for locale dependent properties.String getIcon()
ico-fc-XCheckbox
.String getPrefix()
cb
for checkboxes or tf
for input fields.
This prefix is used, for example, in the designer to generate a default name for newly added form items
(tf-1
, cb-2
).default boolean getAutoReRender()
true
to render the item automatically in the designer, or false
otherwise. When set to
false
, you will need to display the item via JavaScript yourself.@Deprecated default IXValidationResult validate(List<String[]> values, Locale locale, Map<Serializable,Serializable> frqSessionAttributes)
validate(IXValidationParams)
.XPropertyEnum.servervalidate
). In case you do not want to perform any validation
when server-side validation is disabled, check whether the property XPropertyEnum.servervalidate
is set.
In case validation fails, the form submission is not accepted and an appropriate error message is shown to the form user.
values
- The values that were submitted for this form item.locale
- The current locale to be used for creating error messages.frqSessionAttributes
- All attributes from the current form request session.default List<IXValidationResult> validate(IXValidationParams params)
XPropertyEnum.servervalidate
). In case you do not want to perform any validation
when server-side validation is disabled, check whether the property XPropertyEnum.servervalidate
is set.
In case validation fails, the form submission is not accepted and an appropriate error message is shown to the form user.
params
- Parameters for the validation process the item can make use of, such as the submitted values.IXValidationParams.getValues()
. Each result
indicating whether the submitted values are valid.default boolean validateGlobal(IXGlobalValidationParams params)
XPropertyEnum.servervalidate
). In case you do not want to perform any validation when server-side
validation is disabled, check whether the property XPropertyEnum.servervalidate
is set.
In case validation fails, the form submission is not accepted and an appropriate error message is shown to the form user.
params
- Parameters for the validation process the item can make use of, such as the submitted values.true
if all items are valid, or false
otherwise. To add an error message for a certain
item, use IXFormRenderConfig.addValidationError(String, String)
of the
IXGlobalValidationParams.getFormRenderConfig()
.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.