You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ravindra Adireddy <ad...@gmail.com> on 2008/05/06 14:05:56 UTC

[Trinidad] tr:inputText styleClass problem

Hi all,

         When I provide custom style class to tr:inputText, trinidad does
not add custom style class to HTML input tag instead it adds custom style
class to  span tag(along with OraInlineErrorText). Is it the desire
behavior? or a bug?


The following line in my XHTML file

*
<tr:inputText label="Name" value="#{detailTableBean.currentEmployee.name}"
styleClass="r1_table_input_text"/>
*

Translated to

<td class="af_panelFormLayout_content-cell" valign="top" nowrap="nowrap">
        <input id="j_id205" class="af_inputText_content" type="text" value="
John" size="30" name="j_id205"/>
        <div class="af_panelFormLayout_message-cell">
               <span id="j_id205::msg" class="r1_table_input_text
OraInlineErrorText"/>
        </div>
</td>

But I was expecting

<td class="af_panelFormLayout_content-cell" valign="top" nowrap="nowrap">
        <input id="j_id205" class="r1_table_input_text af_inputText_content"
 type="text" value="John" size="30" name="j_id205"/>
        <div class="af_panelFormLayout_message-cell">
               <span id="j_id205::msg" class="OraInlineErrorText"/>
        </div>
</td>

Appreciate your help

-- 
Thanks and Regards
Ravindra Adireddy

Re: [Trinidad] tr:inputText styleClass problem

Posted by Matt Cooper <ma...@gmail.com>.
This is the intended implementation, inlineStyle and styleClass should
be applied to the root element of the component.  If it becomes common
additional style or class attributes can be added.  For example, there
is a contentStyle attribute that would apply to the inner input
element.

For your needs, either a contentClass attribute could be added to each
component that needs it or the a style definition similar to the
following could be added to the skin your application is using (as
noted by the other reply to your email):

.OraInlineErrorText af|inputText::content {
  /* inputText content styles when inside of an "OraInlineErrorText"
container */
}

Regards,
Matt

On Tue, May 6, 2008 at 6:05 AM, Ravindra Adireddy
<ad...@gmail.com> wrote:
>
> Hi all,
>
>          When I provide custom style class to tr:inputText, trinidad does
> not add custom style class to HTML input tag instead it adds custom style
> class to  span tag(along with OraInlineErrorText). Is it the desire
> behavior? or a bug?
>
>
> The following line in my XHTML file
>
> *
> <tr:inputText label="Name" value="#{detailTableBean.currentEmployee.name}"
> styleClass="r1_table_input_text"/>
>  *
>
> Translated to
>
> <td class="af_panelFormLayout_content-cell" valign="top" nowrap="nowrap">
>
>
>         <input id="j_id205" class="af_inputText_content" type="text"
> value="John" size="30" name="j_id205"/>
>          <div class="af_panelFormLayout_message-cell">
>
>                <span id="j_id205::msg" class="r1_table_input_text
> OraInlineErrorText"/>
>         </div>
> </td>
>
> But I was expecting
>
> <td class="af_panelFormLayout_content-cell" valign="top" nowrap="nowrap">
>
>
>         <input id="j_id205" class="r1_table_input_text af_inputText_content"
> type="text" value="John" size="30" name="j_id205"/>
>          <div class="af_panelFormLayout_message-cell">
>
>                <span id="j_id205::msg" class="OraInlineErrorText"/>
>         </div></td>
>
> Appreciate your help
>
> --
> Thanks and Regards
> Ravindra Adireddy

Re: [Trinidad] tr:inputText styleClass problem

Posted by arne anka <do...@ginguppin.de>.
i'd think you need either to overwrite af_inputText_content or to use  
something like r1_table_input_text.input in your css ...