Package de.xima.fc.form.common.items
Class XAppointment
- java.lang.Object
-
- de.xima.fc.form.common.items.XAppointment
-
- All Implemented Interfaces:
IXItem
,IXItemBasic
,IXValuableItem
public class XAppointment extends Object implements IXItem, IXValuableItem
-
-
Constructor Summary
Constructors Constructor Description XAppointment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAppointmentTemplateHtmlAttrString(XItemRenderData renderData)
ArrayList<XItemPropertyDesc>
getAvailableProperties(Locale locale)
String
getIcon()
String
getPrefix()
Finds the prefix for form items of this type, such ascb
for checkboxes ortf
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.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.List<IXValidationResult>
validate(IXValidationParams params)
Validates the values that were submitted for this form item.boolean
validateGlobal(IXGlobalValidationParams params)
Validates the values that were submitted for all form items of this kind.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.form.common.models.IXItemBasic
getAutoReRender, isShouldRenderUnit, processUpload, validate
-
-
-
-
Method Detail
-
getAvailableProperties
public ArrayList<XItemPropertyDesc> getAvailableProperties(Locale locale)
- Specified by:
getAvailableProperties
in interfaceIXItemBasic
- Parameters:
locale
- The current locale that can be used for locale dependent properties.- Returns:
- A list of all properties
-
getIcon
public 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
.
-
getPrefix
public String getPrefix()
Description copied from interface:IXItemBasic
Finds the prefix for form items of this type, such ascb
for checkboxes ortf
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
).- Specified by:
getPrefix
in interfaceIXItemBasic
- Returns:
- The prefix for form items of this type.
-
isSubmitsValues
public boolean isSubmitsValues()
Description copied from interface:IXItemBasic
Checks whether form items of this type can send values to the server when the form is submitted. Form items that do not submit values are, for example, not validated and no values are ever stored in the database. Form items such as pictures or charts do no submit values, while classical form elements such as input fields and checkboxes are a prime example of form items that do submit values.- Specified by:
isSubmitsValues
in interfaceIXItemBasic
- Returns:
- Whether form element of this type can send values to the server when the form is submitted.
-
getAppointmentTemplateHtmlAttrString
public String getAppointmentTemplateHtmlAttrString(XItemRenderData renderData)
-
renderItemPreview
public 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)
-
renderItem
public void renderItem(com.hp.gagawa.java.elements.Div container, XItemRenderData renderData, XItemRenderCtx renderCtx, IXFormRenderContext formRenderCtx)
Description copied from interface:IXItemBasic
Creates the HTML for this form item that is included in the final rendered form. You should append one or more HTML elements to the container that is passed to this method.- Specified by:
renderItem
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.renderItemPreview(Div, XItemRenderData, XItemRenderCtx, IXFormRenderContext)
-
validate
public List<IXValidationResult> validate(IXValidationParams params)
Description copied from interface:IXItemBasic
Validates the values that were submitted for this form item. This method is always called, even when server-side validation is not enabled (XPropertyEnum.servervalidate
). In case you do not want to perform any validation when server-side validation is disabled, check whether the propertyXPropertyEnum.servervalidate
is set.In case validation fails, the form submission is not accepted and an appropriate error message is shown to the form user.
- Specified by:
validate
in interfaceIXItemBasic
- Parameters:
params
- Parameters for the validation process the item can make use of, such as the submitted values.- Returns:
- A list with a validation result for each value of the
IXValidationParams.getValues()
. Each result indicating whether the submitted values are valid.
-
validateGlobal
public boolean validateGlobal(IXGlobalValidationParams params)
Description copied from interface:IXItemBasic
Validates the values that were submitted for all form items of this kind. This method is always called, after other validations have been performed, even when server-side validation is not enabled (XPropertyEnum.servervalidate
). In case you do not want to perform any validation when server-side validation is disabled, check whether the propertyXPropertyEnum.servervalidate
is set.In case validation fails, the form submission is not accepted and an appropriate error message is shown to the form user.
- Specified by:
validateGlobal
in interfaceIXItemBasic
- Parameters:
params
- Parameters for the validation process the item can make use of, such as the submitted values.- Returns:
true
if all items are valid, orfalse
otherwise. To add an error message for a certain item, useIXFormRenderConfig.addValidationError(String, String)
of theIXBaseValidationParams.getFormRenderConfig()
.
-
-