I mounted a page to /signupref that points to a capture page that gets a signup reference (generated and sent to the user via email, so that upon verification the reference finds the cooresponding user).
The url to the page looks like: /signupref/ref/23432987098234 <-- where that number changes with each signup process.
Page is mounted via:
mountBookmarkablePage( "/signupref", EmailRef.class );
The mounted page, EmailRef.java, looks like this:
public class EmailRef extends SignupPage
{
private static Log log = LogFactory.getLog(EmailRef.class);
public EmailRef( PageParameters params )
{
try {
EntityServicesLocal esl = getUserSession().getEntityServices();
// get the signup reference number
long ref = params.getLong( "ref" );
// find the user
Member member = esl.getSingleResult( "SELECT u FROM Member u where signupRef='" + ref + "'" );
// redirect to continue the signup process
//redirectToInterceptPage( new Step3( new EntityModel< Member >( member), ref ) ); // also tried this, same result
setResponsePage( new Step3( new EntityModel< Member >( member ), ref ) );
setRedirect( true ); // tried with and without this line
} catch ( Exception ex )
{
setResponsePage( new StandardError( "Sorry, I could not process your signup request", ex ) );
}
}
}
The user is redirected properly to Step3 page. However, the URL remains under the mounted version ( http://localhost:8080/signupref/ref/?wicket:interface=:11:: ). Then, when the user submits the form in Step3, I get the error:
Root cause:
java.lang.IllegalStateException: URL fragment has unmatched key/value pair: ref/
at wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters(AbstractRequestTargetUrlCodingStrategy.java:129)
at wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:75)
at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:314)
at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:83)
at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48)
at wicket.RequestCycle.step(RequestCycle.java:942)
at wicket.RequestCycle.steps(RequestCycle.java:1034)
Why are all subsequent setResponsePage() calls continuing to render under /signupref/ref/?wicket:interface=***** ?? This is wicket 1_2 snapshot as of couple days ago
Aaron
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
