Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6
-
Fix Version/s: 1.6.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Windows XP SP2, JBoss 4.0.5, Seam 1.2.1, Firefox 2.0.0.6
Description
The Seam "ui" example's selectItems page was not lining up labels with their counterparts properly, nor applying CSS style properly. This was also observed with ICEfaces' seam-gen, where it's pretty typical to have an s:decorate around an s:label and some input component. The problem was that the html that ICEfaces was producing was wrong, and observably different than stock seam output.
Example source xml:
<s:label styleClass="label #{invalid?'errors':''}">
First Name
<s:span styleClass="required" rendered="#{required}">*</s:span>
</s:label>
Expected (summarised) html output:
<label for="firstName" class="name ">
firstName<span class="required">*</span>
</label>
ICEfaces (summarised) html output:
<label for="firstName" class="name "
</label>
firstName<span class="required">*</span>
Basically the problem was that the children of s:label were being rendered as peers. s:label extends h:outputLabel, and we supplant its default rendering our own D2D renderer. This was confirmed by replacing s:label with h:outputLabel and observing the same incorrect html output.
Example source xml:
<s:label styleClass="label #{invalid?'errors':''}">
First Name
<s:span styleClass="required" rendered="#{required}">*</s:span>
</s:label>
Expected (summarised) html output:
<label for="firstName" class="name ">
firstName<span class="required">*</span>
</label>
ICEfaces (summarised) html output:
<label for="firstName" class="name "
</label>
firstName<span class="required">*</span>
Basically the problem was that the children of s:label were being rendered as peers. s:label extends h:outputLabel, and we supplant its default rendering our own D2D renderer. This was confirmed by replacing s:label with h:outputLabel and observing the same incorrect html output.
Issue Links
- blocks
-
ICE-1721 OutputLabel doesn't correctly render inner html
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Just had to fix the cursor management, so that it would step in for the children.
Subversion 14714
icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\LabelRenderer.java