• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

facelet: different css style for ui:define

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 27488
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic