Wicket adds the following markup to my HomePage
(http://localhost:8081/wicket/test) <head>:

<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
if (window.name=='') { window.name="wicket:default"; }
/*-->]]>*/</script>

and the user's address bar shows http://localhost:8081/wicket/test, which is
nice.

Under what circumstances would the HomePage <head> include something other
than window.name="wicket:default"?

For example, when the user returns to the (same?) HomePage from another page
(eg Page2,  also a wicket page in the same app) using setResponsePage(new
HomePage(showAlert,alertMessage) in its form's onSubmit() - because I need
to pass in some indication of what has just happened on Page2), this markup
in the HomePage <head> becomes

<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
if (window.name=='') {
window.location="/wicket/test?wicket:interface=:3::INewBrowserWindowListener";
}
/*-->]]>*/</script>

and I have a different url
(http://localhost:8081/wicket/test?wicket:interface=:3::) in the address
bar. Not so "nice".

Can this second type of url be avoided ?

In Page2.java, if I use setResponsePage(new HomePage()), I also get this
second type of url but if I use setResponsePage(HomePage.class) the address
bar shows the "nice" url (http://localhost:8081/wicket/test).

Is it because the original instance of HomePage is used only if I
setResponsePage(HomePage.class)?
-- 
View this message in context: 
http://www.nabble.com/HomePage-url-changes-when-user-returns-from-a-second-wicket-page-tf3732701.html#a10448319
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to