• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF, Set attribute type dynamically.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

context.getELContext().getELResolver().getType(context.getELContext(), null, "value")

Here "value" is an attribute name. By this we can get data type of the attribute.

By somehow can we set the type also?

Thanks in advance for your answer.
 
Saloon Keeper
Posts: 27752
196
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
Welcome to the JavaRanch, Lalit!

The first thing I always have to ask when I see JSF-specific code is "why". What is this complex platform-specific construct supposed to do that something simpler and less JSF-specific could not?

In this particular case, especially I don't understand. Attributes are the named properties of JSF tags and they're not something that you should be meddling with directly under virtually any scenario I can hallucinate.

Did you mean "backing bean properties"? If so, you've taken the Inversion of Control mechanism and re-inverted it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic