incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hane <chrish...@gmail.com>
Subject Re: Required CSS - how to remove icon (*)
Date Mon, 16 Apr 2007 20:57:03 GMT
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.

Chris....



Mime
View raw message