This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes How to set a String value to OutputText component in backing bean. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to set a String value to OutputText component in backing bean." Watch "How to set a String value to OutputText component in backing bean." New topic
Author

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

srikanth Thandra
Ranch Hand

Joined: Mar 04, 2009
Posts: 42

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.

Thanx in advance,
Srikanth
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14571
    
    7

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.

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: How to set a String value to OutputText component in backing bean.
 
Similar Threads
Dynamic Component in JSF
JSF portlet form fields retrieval
Displaying Data Without DataTable
Actions don't work inside a dataTable column?
Input row select on data table does not get called