ICEfaces
  1. ICEfaces
  2. ICE-2034

outputLabel doesn't render children properly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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.

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          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

          Show
          Mark Collette added a comment - 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

            People

            • Assignee:
              Unassigned
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: