Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to set a String value to OutputText component in backing bean.

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi all,

I am a newbie to jsf. I am learning jsf and i got struck with a problem.

Is it possible to set a String Value like "Welcome" to an outputText component from backing bean.

i.e. outputText value="value comes from backing bean when action is perfomed. "/>

outputText value="" id="msg"/>
commanButton action="#{myBean.setValue}" value="submit"/>

In backingBean: is it possible to get the outputText component with the help of Id and set a value to it..


Waiting for the response.
 
Saloon Keeper
Posts: 24847
174
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
Normally you provide the value for the outputText tag from a backing bean, like so:


In that case, there's no need to provide the value to the bean, since the bean already knows the value.
reply
    Bookmark Topic Watch Topic
  • New Topic