File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how to get data from immediate true? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to get data from immediate true?" Watch "how to get data from immediate true?" New topic
Author

how to get data from immediate true?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
<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

Joined: Jun 25, 2001
Posts: 15646
    
  15

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.


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 get data from immediate true?
 
Similar Threads
how to use ByteArrayInputStream?
Problem with collapsiblePanel
how to get data type of a value in resultset
Simple list table
please help me