File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get data from immediate true?

 
kahkean chor
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<hutputText value="Country "/>
<h:inputText value="#{packageManagedBean.country}" /> <-------------------how to get this data
<h:commandButton image="resources/images/search.png" action="#{packageManagedBean.search()}" />

immediate help me skipped the form validation...however the input text value is not retrieve , could anyone help me? thanks in advance

 
Tim Holloway
Saloon Keeper
Pie
Posts: 17624
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: if you use the "Code" button on our message editor to generate code tags around your XML, it will be a lot easier to read.

When you specify "immediate="true"" on a commandButton or commandLink, it doesn't simply bypass validation. It bypasses all data handing. The form data is simply not sent down to the server at all.

JSF requires that all data on a submitted form pass validation. If even a single value is invalid, the submission process is short-circuited. The Model (backing bean) is not updated, listeners don't fire, and the action method (if any) is not invoked. This ensures that you never work with partially-corrupt data.

The other thing that you should be aware of is that the action attribute is not executable code. It is a reference to executable code. Therefore it should not attempt to do code-like things, nor should it have "()" on it.

If you have everything set up properly, the backing bean's "search" method will be invoked and the backing bean "country" property will have already been set with the value the user entered into the form. Providing the form controls all have valid values.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic