Hi,
this mail is based on http://issues.apache.org/jira/browse/ADFFACES-97

as it is stated, currently, when a PanelBorderLayout get rendered, the 
StyleClass for label part of a component all get generated at the same 
time and all are put on the <td> of the panelform component.
That itself is a bug since as its said, with 
af|panelFormLayout::label-cell defining some skinning and ALSO 
af|inputTex::label. The skinning for form layout get applied. The solution 
proposed to correct this behavior was to put the StyleClass of 
af|inputTex::label directly on the <label> markup.

However, the issue also implies the use of :disabled pseudo class.  After 
having done a fews tests, I see that the current rendering doesn't works 
very well with the "p_AFDisabled" tag that is put in the class=" * " to 
specify if a component should have the disabled styleclass applied.   When 
an input* is outside of a PanelFormLayout and is disabled, the disabled 
works ok, as the tag is rendered at RootDomElement level. What this 
results in is something like this :

Exemple 1:
<table id="_id4__xc_" class="x18 p_AFDisabled" summary="" border="0" 
cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td class="" nowrap="nowrap">
        <label class="xu p_AFDisabled" for="_id4">I'm outsideDisabled: 
</label>
      </td>
      <td class="AFContentCell" nowrap="nowrap" valign="top">
        <input id="_id4" name="_id4" disabled="disabled" class="x1l" 
size="30" type="text">
      </td>
    </tr>
  </tbody>
</table>

The trouble is when inside a PanelFormLayout, disabled doesn't get checked 
anywhere in the code and the resulting markup is:

Exemple 2:
<div class="af_panelFormLayout">
  <table summary="" style="width: auto;" border="0" cellpadding="0" 
cellspacing="0">
    <tbody>
      <tr>
        <td class="x43" colspan="1">
          <table summary="" border="0" cellpadding="0" cellspacing="0" 
width="100%">
            <tbody>
              <tr>
                <td>
                </td>
                <td>
                </td>
              </tr>
              <tr>
                <td class="x46" nowrap="nowrap">
                  <label class="xu" for="_id8">IshouldbeYELLOW_Maroon 
</label>
                </td>
                <td class="x48" nowrap="nowrap" valign="top">
                  <input id="_id8" name="_id8" disabled="disabled" 
class="x1l" size="30" type="text">
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
</div>

I've tried adding the "p_AFDisabled" inside the class on the <label> 
markup doing the same check that is done with input* outside of a 
PanelFormLayout but its seems that unless the tag for disabled is on the 
class=" * " of the <table> markup the style doesn't get applied.

Since I havn't found why it must be on the <table> level markup, i'm 
turning to this list if somebody know why its this behavior.
In other word, I'm asking if someone know why the exemple 1 with 
"p_AFDisabled" will generate the correct styleClass for disabled while 
something like the following doesn't results in the correct style being 
seen by the user.

Example 3:
<div class="af_panelFormLayout">
  <table summary="" style="width: auto;" border="0" cellpadding="0" 
cellspacing="0">
    <tbody>
      <tr>
        <td class="x43" colspan="1">
          <table summary="" border="0" cellpadding="0" cellspacing="0" 
width="100%">
            <tbody>
              <tr>
                <td>
                </td>
                <td>
                </td>
              </tr>
              <tr>
                <td class="x46" nowrap="nowrap">
                  <label class="xu p_AFDisabled" 
for="_id8">IshouldbeYELLOW_Maroon </label>
                </td>
                <td class="x48" nowrap="nowrap" valign="top">
                  <input id="_id8" name="_id8" disabled="disabled" 
class="x1l" size="30" type="text">
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
</div>

I hopes this isn't too confusing ! if is it I could always try to explain 
it while directly adding screenshot and page example on the ADFFACES-97 
comments

Reply via email to