Interface DataElementHandler
- All Superinterfaces:
IgnoreRemainingElementsHandler
- All Known Implementing Classes:
AbstractLayoutHandler
,ColumnHandler
,LayoutHandler
,SearchLayoutHandler
,TableHandler
Handler for different custom field tags (like
'<number-field>'
etc).
Implemented as interface with default methods, so that it can be used in different
class hierarchies.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.impl.form2.reader.handler.IgnoreRemainingElementsHandler
IgnoreRemainingElementsHandler.ExtPropsHandler
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
address
(String id, String postcodeCityField, String postcodeField, String locationField, String streetField, String countryField, String stateField, String districtField, String communityNrField, String latitudeField, String longitudeField) default Object
code
(String id, String path, String mode, String aceMode, String implicitModel, String implicitModelField) default Object
createFieldHandler
(@Nullable String id, String path, @Nullable String dataType) createFieldHandler
(@Nullable String id, String path, @Nullable String dataType, Class<T> type, BiFunction<T, AbstractComponentContainer, ? extends FieldHandler> fn) Creates aFieldHandler
for the given path.default AbstractPathResolver
default Object
default Object
default Object
default Object
default <T extends FieldImpl>
TgetOrCreateField
(String id, String path, Class<T> type) Find or create aField
for the given path.default Object
default Object
default Object
location
(String id, String postcodeField, String locationField, String streetField, String countryField, String stateField, String districtField, String communityNrField, String latitudeField, String longitudeField) default Object
multiRemoteField
(String id, String path, String form, String formBase) default Object
multiSelectBox
(String id, String path) default Object
default Object
default Object
remoteField
(String id, String path, String form, String formBase) default Object
singleSelectBox
(String id, String path) default Object
default Object
default Object
default Object
Methods inherited from interface ch.tocco.nice2.model.form.impl.form2.reader.handler.IgnoreRemainingElementsHandler
handleExtProps, ignore, iterator, template
-
Method Details
-
createFieldHandler
default <T extends FieldImpl> Object createFieldHandler(@Nullable @Nullable String id, String path, @Nullable @Nullable String dataType, Class<T> type, BiFunction<T, AbstractComponentContainer, ? extends FieldHandler> fn) Creates aFieldHandler
for the given path. If dataType is not null, the default data type will be overwritten with the given value. Takes aBiFunction
as argument which gets the created field and the parent of it as argument. Changes can be applied to this field inside that function. The function returns a FieldHandler. Was introduced because the remote fields have more attributes than normal fields. -
createFieldHandler
-
createPathResolver
-
getOrCreateField
Find or create aField
for the given path. -
getFieldContainer
-
getEntityModel
EntityModel getEntityModel() -
getDefaultValueResolver
DefaultValueResolver getDefaultValueResolver() -
getValidatorHandlerContextFactory
ValidatorHandlerContextFactory getValidatorHandlerContextFactory() -
datetime
@Element("datetime-field") @Cardinality(max=2147483647) default Object datetime(@Attribute("name") String id, @Required @Attribute("data") String path) -
date
@Element("date-field") @Cardinality(max=2147483647) default Object date(@Attribute("name") String id, @Required @Attribute("data") String path) -
singleSelectBox
@Element("single-select-box") @Cardinality(max=2147483647) default Object singleSelectBox(@Attribute("name") String id, @Required @Attribute("data") String path) -
multiSelectBox
@Element("multi-select-box") @Cardinality(max=2147483647) default Object multiSelectBox(@Attribute("name") String id, @Required @Attribute("data") String path) -
remoteField
@Element("remote-field") @Cardinality(max=2147483647) default Object remoteField(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("form") String form, @Attribute("form-base") String formBase) -
multiRemoteField
@Element("multi-remote-field") @Cardinality(max=2147483647) default Object multiRemoteField(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("form") String form, @Attribute("form-base") String formBase) -
url
@Element("url-field") @Cardinality(max=2147483647) default Object url(@Attribute("name") String id, @Required @Attribute("data") String path) -
text
@Element("text-field") @Cardinality(max=2147483647) default Object text(@Attribute("name") String id, @Required @Attribute("data") String path) -
html
@Element("html-field") @Cardinality(max=2147483647) default Object html(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("htmlconfig") String htmlConfig) -
textArea
@Element("text-area") @Cardinality(max=2147483647) default Object textArea(@Attribute("name") String id, @Required @Attribute("data") String path) -
code
@Element("code-field") @Cardinality(max=2147483647) default Object code(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("mode") String mode, @Attribute("ace-mode") String aceMode, @Attribute("implicit-model") String implicitModel, @Attribute("implicit-model-field") String implicitModelField) -
document
@Element("document-field") @Cardinality(max=2147483647) default Object document(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("allowed-file-types") String allowedFileTypes) -
upload
@Element("upload-field") @Cardinality(max=2147483647) default Object upload(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("allowed-file-types") String allowedFileTypes) -
image
@Element("image-field") @Cardinality(max=2147483647) default Object image(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("allowed-file-types") String allowedFileTypes) -
number
@Element("number-field") @Cardinality(max=2147483647) default Object number(@Attribute("name") String id, @Required @Attribute("data") String path) -
geosearch
@Element("geosearch-field") @Cardinality(max=2147483647) default Object geosearch(@Attribute("name") String id, @Required @Attribute("latitudeFieldname") String latitudeField, @Required @Attribute("longitudeFieldname") String longitudeField) -
address
@Element("address-field") @Cardinality(max=2147483647) default Object address(@Attribute("name") String id, @Attribute("postcode-city-field") @Required String postcodeCityField, @Attribute("postcode-field") @Required String postcodeField, @Attribute("location-field") @Required String locationField, @Attribute("street-field") @Required String streetField, @Attribute("country-field") @Required String countryField, @Attribute("state-field") String stateField, @Attribute("admincode2-field") String districtField, @Attribute("community-nr-field") String communityNrField, @Attribute("latitude-field") String latitudeField, @Attribute("longitude-field") String longitudeField) -
location
@Element("location-field") @Cardinality(max=2147483647) default Object location(@Attribute("name") String id, @Attribute("postcode-field") @Required String postcodeField, @Attribute("location-field") @Required String locationField, @Attribute("street-field") @Required String streetField, @Attribute("country-field") @Required String countryField, @Attribute("state-field") String stateField, @Attribute("admincode2-field") String districtField, @Attribute("community-nr-field") String communityNrField, @Attribute("latitude-field") String latitudeField, @Attribute("longitude-field") String longitudeField) -
range
@Element("range-field") @Cardinality(max=2147483647) default Object range(@Attribute("name") String id, @Required @Attribute("data") String path, @Attribute("expanded") boolean expanded, @Attribute("default-field") String defaultField)
-