Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
fields:
	isBarbarian:
		fieldType: checkbox
		type: Boolean
	isElf
		fieldType: checkbox
		type: Boolean
    barbarianElfHatType:
		fieldType: text
		enabled: ( isBarbarian & isElf )
        description: What type of hat is your elven barbarian wearing?

Image Added

Dynamically Visible

A field is only visible on a form, if the  "visible" expression evaluates to true.

...

Code Block
fields:
	clericSpells:
		fieldType: text
		validators:
            onlyClericOrWizard:
              class: info....ExpressionValidator
              expression: (!(clericSpells!="" & wizardSpells!=""))
			  errorMessage: Only Cleric OR Wizard spells allowed, not both.


Image Added

Dynamic Label & Dynamic Button Labels

...

We provide some out-of-the-box modes where no custom coding is required, but also make it easier for developers to fulfil this use case with a minimum of coding for more custom use cases.


Dynamic Select

dynamicSelect

...

:

A select field which populates based on an optionModel and parametes which can come from other fields

optionModel:

Developer provides a Java class or a Javascript function which takes the values of the fields specifed in "optionModelArguments" as arguments, and returns an array of label & value pairs to populate the options field with.

Options list is empty until the "optionModelArguments" fields have values.

...

.

...

Another example:


Code Block
fields:
	country:
		fieldType: select
		path: /
		repository: countries

    state:
		fieldType: dynamicSelect
		optionModelArguments
			- country										#references 'country' field.
		optionModel: org.dandelion......StatesPerCountry

    postalCode:
		fieldType: dynamicSelect
		optionModelArguments
			- state											#references 'state' field.
		optionModel: org.dandelion......PostalCodesPerState

Image Added

Node Chooser

Out-of-the-box fields based on a heirarchy of nodes. (Probably JCR bound.)

...

Code Block
fields:
	ecommerceSystem:
		fieldType: select
		options:
			- elasticPath
			- shopify

	category:
		fieldType: dynamicRESTSelect
		datasource: 
            $type: jsonDatasource
            restClient: (ecommerceSystem) #dynamic based on value in 'ecommerceSystem' field.
            restCall: categories

    assets:
		fieldType: dynamicRESTLink
		datasource: 
            $type: jsonDatasource
            restClient: (ecommerceSystem) #dynamic based on value in 'ecommerceSystem' field.
            restCall: products
			restCallParameters:
				- category: (category) #dynamic based on value in 'category' field.

Image Added

Java Improvements

In addition to the above improvements, we want to make it easier to implement sophisticated use cases in Java.

...