Skip to content

WComponent content models

Mark Reeves edited this page Jan 3, 2018 · 19 revisions

WComponents by content type

The following lists the allowed content types for container WComponents. For information about content types see the Content model specification and Content category specification.

Any content

These WComponents may contain any content including form-bound controls:

Components which require phrasing content

The WComponents below may have other WComponents added to them but may not contain any of the WComponents which output content which is not phrasing content (see below).

Components which must not include interactive controls

The following WComponents are able to accept other components as content but which may not contain any of the form bound controls listed on this page.

The title component of a WCollapsible and the title component of a WFieldSet may contain interactive controls but not complex form controls. It is recommended that these labeling elements should not contain any interactive control due to issues which may arise from ambiguity of interaction. It is strongly recommended that the title component of a WTab and the title component of a WCollapsible should not contain interactive components.

WComponents by category

The following lists WComponents by their category. You should also consult the list of WComponent form controls.

Phrasing content

These WComponents are stand-alone components which output only phrasing content and may, therefore be used anywhere where phrasing content is permitted.

Flow content which is not phrasing content

The following WComponents are those which are stand-alone components so can be placed anywhere in the Java tree but output HTML which contains one or more elements which are incompatible with a phrasing content content model. None of these elements may be used where phrasing content is required.

Sectioning content

The following components will output sectioning content:

Sectioning roots

The following WComponents will output a sectioning root.

form-bound controls

Interactive components

No output

WComponents without UI artefacts (except WComponents in a hidden state) do not output HTML at the point in the output tree equivalent to their point in the component tree. For most purposes they can be considered empty and any WComponent or (or sub-component which outputs a wrapper element) which contains only one or more of these components suffers from being empty. A WComponent which contains only WComponents without UI artefacts (including WComponents in a hidden state) does not have palpable content which may create an accessibility issue.

Further information

Clone this wiki locally