You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by schneidc <si...@gmx.de> on 2010/03/29 18:33:36 UTC

[Trinidad] Skinning: Change only one occurence of a component

Hi,

I want to change the width of a <tr:selectOneChoice>, so it isn't so narrow
when empty. <tr:selectOneChoice inlineStyle="width: 100px"> doesn't do the
trick as the actual menu is embedded in a table and the style get's applied
on the table and not the menu itself.

So I figured out that I should change "af|selectOneChoice::content". But
this would alter all the selectOneChoices and I only want to adjust the
width of one. I read the skinning guide but didn't find anything useful. Is
it even possible?

Cheers
Simon
-- 
View this message in context: http://old.nabble.com/-Trinidad--Skinning%3A-Change-only-one-occurence-of-a-component-tp28071783p28071783.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] Skinning: Change only one occurence of a component

Posted by Catalin Kormos <ca...@gmail.com>.
It is possible, here is an example for when you would want to customize a
specific instance of the <tr:panelAccordion/>:

In your page you could specify a custom CSS class selector:

*<tr:panelAccordion discloseNone="true" inlineStyle="width: 100%;"
styleClass="custom_accordion">*
*    .....*
*</tr:panelAccordion>*
*
*
*Then, in your CSS file applied to your app you use the new "custom_accordion"
class selector to identify only that panelAccordion and further customize
it:*

*
.custom_accordion af|panelAccordion::content {
    .... // apply custom customization to this panel accordion's content
}

regards,
Catalin
*
On Mon, Mar 29, 2010 at 7:33 PM, schneidc <si...@gmx.de> wrote:

>
> Hi,
>
> I want to change the width of a <tr:selectOneChoice>, so it isn't so narrow
> when empty. <tr:selectOneChoice inlineStyle="width: 100px"> doesn't do the
> trick as the actual menu is embedded in a table and the style get's applied
> on the table and not the menu itself.
>
> So I figured out that I should change "af|selectOneChoice::content". But
> this would alter all the selectOneChoices and I only want to adjust the
> width of one. I read the skinning guide but didn't find anything useful. Is
> it even possible?
>
> Cheers
> Simon
> --
> View this message in context:
> http://old.nabble.com/-Trinidad--Skinning%3A-Change-only-one-occurence-of-a-component-tp28071783p28071783.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
------------
Codebeat
www.codebeat.ro

Re: [Trinidad] Skinning: Change only one occurence of a component

Posted by Now I find myself in question <vi...@gmail.com>.
you have to use it like

af|selectOneChoice.MyStyle af|selectOneChoice::content {
 // style properties
}

and use the MyStyle in the styleClass of the specific selectonechoice that
you are using..

On Tue, Mar 30, 2010 at 4:14 PM, Glauco P. Gomes
<gl...@yahoo.com.br>wrote:

> You can use <tr:selectOneChoice contentStyle="width: 100px" /> to change
> the menu size.
>
> Glauco P. Gomes
>
> schneidc escreveu:
>
>> Hi,
>>
>> I want to change the width of a <tr:selectOneChoice>, so it isn't so
>> narrow
>> when empty. <tr:selectOneChoice inlineStyle="width: 100px"> doesn't do the
>> trick as the actual menu is embedded in a table and the style get's
>> applied
>> on the table and not the menu itself.
>>
>> So I figured out that I should change "af|selectOneChoice::content". But
>> this would alter all the selectOneChoices and I only want to adjust the
>> width of one. I read the skinning guide but didn't find anything useful.
>> Is
>> it even possible?
>>
>> Cheers
>> Simon
>>
>>
>
>
>

Re: [Trinidad] Skinning: Change only one occurence of a component

Posted by "Glauco P. Gomes" <gl...@yahoo.com.br>.
You can use <tr:selectOneChoice contentStyle="width: 100px" /> to change 
the menu size.

Glauco P. Gomes

schneidc escreveu:
> Hi,
>
> I want to change the width of a <tr:selectOneChoice>, so it isn't so narrow
> when empty. <tr:selectOneChoice inlineStyle="width: 100px"> doesn't do the
> trick as the actual menu is embedded in a table and the style get's applied
> on the table and not the menu itself.
>
> So I figured out that I should change "af|selectOneChoice::content". But
> this would alter all the selectOneChoices and I only want to adjust the
> width of one. I read the skinning guide but didn't find anything useful. Is
> it even possible?
>
> Cheers
> Simon
>   



Re: [Trinidad] Skinning: Change only one occurence of a component

Posted by schneidc <si...@gmx.de>.
Thanks both of you.

This expression was what I had in mind

.custom_accordion af|panelAccordion::content {
    .... // apply custom customization to this panel accordion's content
} 



but this special case <tr:selectOneChoice contentStyle="..."> also did the
trick.
-- 
View this message in context: http://old.nabble.com/-Trinidad--Skinning%3A-Change-only-one-occurence-of-a-component-tp28071783p28082446.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.