Re: How to setResponsePage with a classname string parameter?

2010-08-03 Thread rolandpeng
oh,I've figured it out...I should cast it with generic class. thank you :) try { setResponsePage((Class)Class.forName(pageClass)); } catch (ClassNotFoundException e) { e.printStackTrace(); } rolandpeng wrote: > > I've also tried casting like this. > setResponsePage((Page)Cla

Re: How to setResponsePage with a classname string parameter?

2010-08-03 Thread rolandpeng
I've also tried casting like this. setResponsePage((Page)Class.forName(pageClass)); but compiles error as well,the message below, The method setResponsePage(Class) in the type Component is not applicable for the arguments (Page) James Carman wrote: > > Cast it? > > On Aug 3, 2010 10:19 PM, "r

Re: How to setResponsePage with a classname string parameter?

2010-08-03 Thread James Carman
Cast it? On Aug 3, 2010 10:19 PM, "rolandpeng" wrote: > > 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; > if(pageClass.equals("com.