Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spend a fixed value of the inputText to ManagedBean

 
Flavio Mendes Santana
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can set the value using setter at the default constructor of the bean
 
Flavio Mendes Santana
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much dear friend. This solved my problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic