-
Notifications
You must be signed in to change notification settings - Fork 18
WComponent content models
The following lists the allowed content types for container WComponents. For information about content types see
These WComponents may contain any content including form-bound controls:
- WCollapsible;
- WContainer;
- WPanel (and therefore WAjaxPollingRegion;
- WFieldSet;
- WFigure;
- WSection;
- WDecoratedLabel if it is the title component of a WSection, the description of a WFigure or a column header in a WTable.
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)
-
WDecoratedLabel including:
- the title component of a WCollapsible;
- the title component of a WFieldSet;
- the title component of a WHeading;
- the title component of a WSection;
- the title component of a WSubMenu;
- the title component of a WMenuItem;
- the title component of a WTab;
unless the WDecoratedLabel is the title component of a WSection, the description of a WFigure or a column header in a WTable;
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 WSubMenu;
- the title component of a WMenuItem;
- the title component of a WTab before v1.2.3;
- WLabel (with some exceptions which are harder to implement than not).
In addition it is strongly recommended that the title component of a WTab and the title component of a WCollapsible should not contain interactive components.
The following lists WComponents by their category. You should also consult the list of WComponent form controls.
These WComponents are stand-alone components which output only phrasing content and may, therefore be used anywhere where phrasing content is permitted.
- WAbbrText;
- WContentLink;
- WDecoratedLabel unless it is the titling element of a WSection, the title component of a WTab (from 1.2x) or a column in a WTable;
- WImage;
- WInternaLink;
- WLabel;
- WLink;
- WProgressBar;
-
WStyledText unless the
whiteSpaceproperty isPARAGRAPHorPRESERVE; - WText;
- WComponents which output labelable elements except WDateField, WPartialDateField and WTextArea in rich-text mode - note that these components may not be used where interactive components are forbidden;
- WComponents which output labelable elements if the
readOnlyproperty istrueexcept WTextArea in rich-text mode which outputs non-phrasing content and may output form-bound controls.
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.
- WAjaxPollingRegion
- WAudio;
- WCollapsible;
- WCollapsibleToggle;
-
WDateField unless the
readOnlyproperty istrue; - WDefinitionList;
- WDialog;
-
WDropdown if the
typeproperty isCOMBO; - WFieldLayout;
- WFieldSet;
- WFieldWarningIndicator;
- WFigure;
- WHeading;
- WHorizontalRule;
- WMenu;
- WMessageBox;
- WPanel;
- WPartialDateField;
- WRow;
- WSection;
-
WSelectToggle unless the
renderAsproperty isCONTROL; - WStyledText if the whiteSpace property is PARAGRAPH or PRESERVE;
- WTable;
- WTabSet;
- WTree;
- WValidationErrors;
- WVideo;
- All WComponents which output complex form controls.
The following components will output sectioning content:
-
WPanel (and therefore WAjaxPollingRegion) if the
Typeproperty isACTIONorCHROME; - WSection.
The following WComponents will output a sectioning root.
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.