You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Pi...@dmr.ca on 2006/08/18 14:59:18 UTC
[Question] tr:PanelFormLayout component and tr:input* rendering label
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
Re: [Question] tr:PanelFormLayout component and tr:input* rendering label
Posted by Pi...@dmr.ca.
Hi Matt! and other devs,
No, the test was done using firefox, but since you mentionned IE, I went
on to test the page on it too. Indeed there was a small difference on how
things were visually rendered.
I've added 2 screenshots showing what is seen both before my modification
and after my modification. You can see them as part of the Jira issues:
https://issues.apache.org/jira/browse/ADFFACES-97
Basically, here are the 3 styles that matter:
inputText::label : green text / white background
inputText:disabled::label : yellow text / red background
panelFormLayout::label-cell : gray text / silver background
Now, before jumping to the rendered html tag (like I did in the last
post), let's stay high level !
From the 2 screenshots, you can see that before my modification, a
inputText outside a panelFormLayout was correctly applied the disabled /
normal(enable) style. Inside a panelFormLayout, the "label-cell" style get
rendered over the inputText label style.
After my modification, the label inside a panelFormLayout get displayed
with the specified color BUT, if you pay close attention, the alignment is
modified. (no clue yet why) YET again, when testing on IE, before the
modification is the same as with firefox, HOWEVER, after the modification,
the alignment isn't changed like it is on firefox. (so, on IE the
alignment for the text label are all aligned to finish on the right
border)
This lead to my following question :
Is the expected behavior should really be that the "disabled" style
specified for an input* be rendered inside a panelFormLayout (like what is
seen on the screenshot after the modif) OR that style of a panelFormLayout
"label-cell" gets priority over others defined style?
thanks,
Pierre-Luc Archambault,
Fujitsu Consulting
Re: [Question] tr:PanelFormLayout component and tr:input* rendering label
Posted by Matt Cooper <ma...@gmail.com>.
Hi Pierre-Luc,
Do you notice this problem only in Internet Explorer? This particular
browser has poor support for compound style classes and your test might be
running into the bug. If it is an IE-only issue, perhaps the order of the
style classes could be rearranged to work around the issue.
Here's a smaller demo showing IE applying incorrect styles:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<style>
.af_navigationLevelTabs_tabs-mid {
color: black;
}
.af_navigationLevelTabs_tabs-inactive .af_navigationLevelTabs_tabs-mid {
color: yellow;
}
.af_navigationLevelTabs_tabs-inactive.p_AFDisabled.af_navigationLevelTabs_tabs-mid
{
color: green;
}
.RichPanelPageMainCenter {
color: white;
}
.RichPanelPageMainCenter .af_navigationLevelTabs_tabs-mid {
color: orange;
}
.RichPanelPageMainCenter .af_navigationLevelTabs_tabs-inactive
.af_navigationLevelTabs_tabs-mid {
color: blue;
}
.RichPanelPageMainCenter
.af_navigationLevelTabs_tabs-inactive.p_AFDisabled.af_navigationLevelTabs_tabs-mid
{
color: red;
}
.RichPanelPageMainCenter
.af_navigationLevelTabs_tabs-active.p_AFDisabled.af_navigationLevelTabs_tabs-mid
{
color: pink;
}
</style>
<div class="af_navigationLevelTabs_tabs-inactive">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
non-disabled
</div>
</div>
</div>
<hr/>
<div class="af_navigationLevelTabs_tabs-inactive p_AFDisabled">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
disabled
</div>
</div>
</div>
<hr/>
<div class="RichPanelPageMainCenter">
<div class="x">
<div class="af_navigationLevelTabs_tabs-inactive">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
RichPanelPageMainCenter non-disabled
</div>
</div>
</div>
</div>
</div>
<hr/>
<div class="RichPanelPageMainCenter">
<div class="x">
<div class="af_navigationLevelTabs_tabs-inactive p_AFDisabled">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
RichPanelPageMainCenter disabled
</div>
</div>
</div>
</div>
</div>
<hr/>
<div class="RichPanelPageMainCenter">
<div class="x">
<div class="af_navigationLevelTabs_tabs-active">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
RichPanelPageMainCenter non-disabled
</div>
</div>
</div>
</div>
</div>
<hr/>
<div class="RichPanelPageMainCenter">
<div class="x">
<div class="af_navigationLevelTabs_tabs-active p_AFDisabled">
<div class="y">
<div class="af_navigationLevelTabs_tabs-mid">
RichPanelPageMainCenter disabled
</div>
</div>
</div>
</div>
</div>
</body>
</html>
--Matt
On 8/18/06, Pierre-Luc_Archambault@dmr.ca <Pi...@dmr.ca>
wrote:
>
> 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
>