I want to return the user to a page that has a context and some query
params:
I can do this, using Link:
public Object onSubmit(){
Link link = ls.createPageRenderLinkWithContext(Buy.class, product);
link.addParameter("x", x);
link.addParameter("y", y);
return link;
}
Directs the user to;
http://localhost:8080/web/buy/product?x=1&y=2
I want to know if I can easily do the same using Page:
@InjectPage
private Buy buy;
public Object onSubmit() {
buy.setProduct(product)
return buy;
}
And in Buy have an onPassivate to get the correct context
Buy {
String onPassivate90{return product}
}
Whch gets me the URL:
http://localhost:8080/web/buy/product
But what's the easiest way of then tacking on the query string I want?