my dog learned polymorphism*
The moose likes JSF and the fly likes facelet: different css style for ui:define Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "facelet: different css style for ui:define" Watch "facelet: different css style for ui:define" New topic
Author

facelet: different css style for ui:define

Ast Lavond
Greenhorn

Joined: Mar 02, 2010
Posts: 16
Hi,

Is it possible to set an different style for each ui:define tag?
I would like to have a class or style attribute to set the width of an element:

For example:

Or another attempt:

In both cases, the style can not be set.
Maybe it’s possible to set the style with an <ui:param> tag?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

ui:define is not a GUI display element, it's a macro definition. So there's no style attached to it, only to whatever GUI content it expands into.

Technically, yes, you could define a macro and pass it a parameter which would be referenced in one or more of its expansion elements using an EL expression. In real life, I'd be more likely to pass a style name rather than hard-coding style values, however.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: facelet: different css style for ui:define
 
Similar Threads
How to dynamically set panel header on a condition using <f:facet
Is jboss seam framework really slow?
problem on saving inputText values
Mutiple ComboBoxes using c:forEach
jsf decorate