[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • 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
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
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

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

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