incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanne Waldman <jeanne.wald...@oracle.com>
Subject Re: Required CSS - how to remove icon (*)
Date Tue, 17 Apr 2007 00:36:43 GMT


Chris Hane wrote:
> Thanks for the comments.
>
> Jeanne Waldman wrote:
>>
>>
>> Chris Hane wrote:
>>> Thanks that worked great!
>>>
>>> Now I'm trying to style a required label on a 
>>> <tr:panelLabelAndMessage/> This component behaves differently than a 
>>> <tr:panelFormLayout/>.  For example I have the following:
>>>
>>> <tr:panelFormLayout fieldWidth="50%" labelWidth="50%">
>>>  <tr:inputText value="#{backing.id}" label="Lbl 1" 
>>> showRequired="true"/>
>>>
>>>  <tr:panelLabelAndMessage label="List" showRequired="true">
>>>   <tr:panelGroupLayout layout="horizontal">
>>>      <tr:inputText value="#{backing.name}" readOnly="true" 
>>> simple="true"/>
>>>      <tr:commandLink action="#{backing.doAction}" id="buttonID"/>
>>>   </tr:panelGroupLayout>
>>>  </tr:panelLabelAndMessage>
>>> </tr:panelFormLayout>
>>>
>>>
>>> The first component generates something like:
>>>
>>> <tr class="af_inputText p_AFRequired">
>>>    <td class="af_inputText_label af_panelFormLayout_label-cell" 
>>> nowrap="">
>>>       <span class="AFRequiredIconStyle" title="Required">*</span>
>>>       <label for="status">Status</label>
>>>    </td>
>>>    <td class="af_panelFormLayout_content-cell" valign="top" nowrap="">
>>>       <input class="af_inputText_content" type="text" value="PENDING"/>
>>>    </td>
>>> </tr>
>>>
>>> With the CSS:
>>>
>>> .af_inputText.p_AFRequired .af_inputText_label{
>>>    background-color:#FF0000;
>>> }
>> You should use the skin's css format of af|inputText:required::label 
>> {} instead of the above.
>> We abstract out the css styleclasses in the skinning css format. 
>> Mostly because we can then
>> change it and not affect the skin.
>
>
> Sorry.  The CSS I showed was from the generated file.  I do use the 
> CSS in the skin file just the way you described.  My Skin is:
>
> af|inputText:required::label{
>    background-color: #FF0000;
> }
>
> What I was hoping for was something like the following that I could 
> put into the skin file:
>
>  af|panelLabelAndMessage:required::label{ color: red; }
>
> This does not seem to work though.
>
>> You can try
>>
>> af|panelLabelAndMessage::label .AFRequiredIconStyle {color: red}
>
> When sent the .AFRequiredIconStyle {color: red} in the skin file, it 
> just changed the color of the icon to red and not the background of 
> the label cell.
I see. You can submit a JIRA issue to have this fixed. If we rendered 
p_AFRequired on the panelLabelAndMessage when the showRequired is true, 
then you can do what you want, although both the * and the text will be 
red. There is not 'hook' for just the text. It appears that the label  
== the * + the text. Is this alright?
>
> Chris....
>
>
>

Mime
View raw message