I have a form on my page, which when submitted goes the next page, but all
the form's fields appear as URL parameters in the resulting page.  I want to
hide all the parameters in the url, so that I am using POST request but
still it shows the parameters in the resulting page.   

My sample code
------------------- 
HomePage.java
------------------
PageParameters pp = new PageParameters(); 
    pp.add("lastName", lastName); 
    pp.add("firstName", firstName); 
    pp.add("commonName", commonName); 
    pp.add("localeStr", localeStr); 
throw new RestartResponseException(UserDetailPage.class, pp); 

UserDetailPage 
---------------- 
        public UserDetailPage(final PageParameters parameters) { 
                String lastName = parameters.get("lastName").toString(); 
                String firstName = parameters.get("firstName").toString(); 
                String commonName = parameters.get("commonName").toString(); 
userForm = new UserForm("modifyForm", parameters); 
add(userForm);  

UserForm.java
----------------
        public UserForm(String id, PageParameters parameters) {
                super(id);
                String typeFlagValue = "COMMON";
                if (parameters != null)
                {
                        this.localeStr = parameters.get("localeStr").toString();
                        this.userDN = parameters.get("parentDN").toString();
                        this.userName = parameters.get("commonName").toString();
                        this.firstName = parameters.get("firstName").toString();
                        this.lastName = parameters.get("lastName").toString();
                }

Actually, From the HomePage.java, the request parameters are passed to
UserDetailPage.java.  This UserDetailPage.java takes the reference Userform
and shows the result in the GUI.  

So, the page parameters lastName, firstName, commonName, etc.. are shown in
the URL of result page.
We are using Bookmarakable Page.

If I use the "throw new RestartResponseException(new UserDetailPage(pp));"
instead of "throw new RestartResponseException(UserDetailPage.class, pp);"
in HomePage.java then the URL hides the parameters in the URL.  But I think
this is stateful.  Is it ok??

Could you provide the suggestions.. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/POST-request-shows-the-parameters-in-the-URL-of-result-page-tp4675323.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to