Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

How to submit a page without submitting the values in JSF?

I have a JSF application running on a Weblogic Server.

In a form, the user can enter some inputs and submits the page. He will be taken to a review screen, where the user can review the inputs he had entered in the previous page. In the review screen, there is an option to edit the inputs. On selecting the "Edit" button the user will be taken back to the input screen. If the user made some changes to the inputs but wishes to cancel the changes, he will be taken back to the review screen again.

In this case, I'm seeing the newly entered values being updated in the view object and the same is displayed on the review screen. How we can avoid updating the new value on canceling the changes in JSF?

Note: The edited values should be updated only on selecting the Submit button.


Any suggestions please...
0
Kadhiravan
Asked:
Kadhiravan
  • 3
  • 3
2 Solutions
 
Sathish David Kumar NCommented:
Take that values as request and put in ur  preview screen !!

eg ; I have enter the first name as sathish  and last name kumar the n you can submit the form and redirect to new page that page (review page)
<input type="text " name="firstName" value="${fName}"}
fName the values is u can set the value of the 1st page request !!
0
 
KadhiravanAuthor Commented:
Can you please be more specific and explain me. I'm not getting your views on this.
0
 
Sathish David Kumar NCommented:
how your going to new page while submiting ?

JSp--->java class---->new JSP

JSP---->new Jsp
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
KadhiravanAuthor Commented:
I have tried the following fix.

I have added immediate="true" to the Cancel button and it worked as expected for me.
0
 
Sathish David Kumar NCommented:
Gd work kadhiravan ..... vaazthukal
0
 
KadhiravanAuthor Commented:
I myself have tried for various fixes and the mentioned simple code change helped me achieve the expected result.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now