It might even be interesting to have warnings like this as pluggable runtime 
libraries that users could download from wicket-stuff.  The idea is if a 
developer downloads and installs some of the libraries on their instance, they 
would get additional debugging output, and because they are in wicket-stuff, 
there's more opportunity for community participation.  

Maybe there's an SPI that uses AOP for the libraries to plug in with.

It's kind of like running 'lint' on the C compilers of yore, but with 
metadata-driven plugins that would be easy to share.

I bring it up because a client project I am working on has this problem all 
over the place.  It was something I knew had a solution, but along with a 
hundred other worst practices, it doesn't get solved quickly unless I happen to 
get hit over the head with the answer in a forum like this or while surfing.  
Installing a "wicket lint superbundle" would have given me a great log of 
problems and solutions, making both this app and the world of wicket apps that 
much more robust and appealing to new candidates.

Brian

On May 18, 2010, at 9:44 AM, James Carman wrote:

> Perhaps during development mode there should be a warning message if
> Wicket sees any fields on any components that are of type Page (or a
> subclass thereof)?  Or, even if the actual object is a page (the
> variable type could be some interface), it should spit out a warning
> telling you to use PageReference instead?
> 
> On Tue, May 18, 2010 at 8:37 AM, Wilhelmsen Tor Iver <toriv...@arrive.no> 
> wrote:
>>> Well, I think that's quite obvious when you consider that each page is
>>> the "root" of a "tree" (not directed, acyclic graph) of components.
>>> Each component can have at most one parent.
>> 
>> But you can pass a component to a different page/component without adding 
>> it; like in the example of having a "back link" which wants a page to 
>> navigate back to. If you keep that Page in an instance variable in the 
>> "back-from" Page you will needlessly serialize that, too, unless you use a 
>> PageReference.
>> 
>> - Tor Iver
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to