The mighty appearance Attribute

The XForms standard defines the appearance attribute to allow XForms authors to pass a hint to the XForms processor to select one of potential several different renderings of the given control. So for instance a xf:select1 might be rendered as a group of radio buttons or as a combo box depending on the choosen appearance.

There are three predefined appearance values (minimal | compact | full) mentioned in the Xforms Spec plus the option to add your own ones with qualified name e.g.

<xf:switch appearance=“dijit:tabContainer“ …

‘dijit:tabContainer’ is a custom extension which is only available in betterFORM and will be rendered as a Dojo TabContainer.

A XForms processor is free to choose the most appropriate rendering though the Spec gives some hints how to interpret the values of the appearance attribute for certain controls. The reference forms found in the betterFORM distribution show which values for appearance are available for a given control and how the final rendered results looks like.

In betterFORM the appearance is not only supported for controls but is also interpreted for group, repeat and switch. This is a very quick way to choose between some basic layout options. Again these layout alternatives can be studied best in our reference forms that are found in ‘forms/reference’ in the distribution.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

%d bloggers like this: