Meaningless Drivel is fun!*
The moose likes JSF and the fly likes Spend a fixed value of the inputText to ManagedBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Spend a fixed value of the inputText to ManagedBean" Watch "Spend a fixed value of the inputText to ManagedBean" New topic
Author

Spend a fixed value of the inputText to ManagedBean

Flavio Mendes Santana
Greenhorn

Joined: Apr 21, 2013
Posts: 2
Goodnight everyone.

I wonder how do I pass a default parameter for ManagedBean through a JSF inputText component. I want for example, every time I register a branch of a company, this field shows always the value "1" and pass this value to the form ManagedBean (and then record in the database).

My component is currently as follows:



Where I declare this fixed value (1) in my code?

Thank you!
Avik Mazunder
Ranch Hand

Joined: Jun 27, 2012
Posts: 39

you can set the value using setter at the default constructor of the bean
Flavio Mendes Santana
Greenhorn

Joined: Apr 21, 2013
Posts: 2
Thank you very much dear friend. This solved my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spend a fixed value of the inputText to ManagedBean
 
Similar Threads
validation of inputText in rich:dataTable
value binding inputText
selectOneMenu
How to create copy/delete buttons for Input Text in JSF
Newbie Question