Hi,I want to redirect to a dynamic webpage,but I can only get the destination
as a fullpath classname string .The sample code like below,

String pageClass=task.getFormResourceName();

WebPage page=null;
        page=new Page1();
}else if(pageClass.equals("com.sandbox.practices.Page2")){
        page=new Page2();
}else if(pageClass.equals("com.sandbox.practices.Page3")){
        page=new Page3();

Is there any better way to replace this "if...else if" way? I have tried
Class.forname(pageClass),but compiles error and shows Bound mismatch,like

Bound mismatch: The generic method setResponsePage(Class<C>) of type
Component is not applicable for the arguments (Class<capture#3-of ?>). The
inferred type capture#3-of ? is not a valid substitute for the bounded
parameter <C extends Page>.

Any suggestion is welcome,thank you.
View this message in context: 
Sent from the Wicket - User 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