click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis M. J. Yerger" <dennisyerge...@hotmail.com>
Subject RE: Page factory service
Date Fri, 26 Apr 2013 17:03:03 GMT
Hi, Bob. I have not seen the code for SpringClickServlet, so I cannot determine whether subclassing
is necessary. Would you post a link to the source code?

Date: Fri, 26 Apr 2013 13:05:31 +0200
From: sabob1@gmail.com
To: dev@click.apache.org
Subject: Re: Page factory service


  
    
  
  
    Hi Denis,

      

      On 2013/04/25 22:13, Dennis M. J. Yerger wrote:

    
    
      
      After examining the ClickServlet class, I noticed
        the newPageInstance() method, which is where new instances of
        Page objects are created. By default, newPageInstance() calls
        Class.newInstance() on the given class. This can be overridden
        by subclassing ClickServlet. However, I believe this
        functionality should be factored out into a separate class. A
        separate page factory would allow page objects to be created in
        more flexible ways (e.g., from Spring contexts or Tapestry IoC
        registries) without altering the ClickServlet. I
    
    

    Looking at SpringClickServlet there seems to be quite a bit going on
    in there which doesn't deal only with newPageIntance. So with a
    PageFactory in place, wouldn't Spring still need to subclass
    ClickServlet to work?

    

    Kind regards

    

    Bob
 		 	   		  
Mime
View raw message