I'm no Wicket expert, but as a general rule it's almost always better to 
be notified of an event or state change than to constantly poll for it 
(think of the child in the back seat on a long trip constantly asking "Are 
we there yet?")



From:   Andrew Geery <andrew.ge...@gmail.com>
To:     users@wicket.apache.org
Date:   04/16/2012 01:45 PM
Subject:        "It is a better practice to push changes to state rather 
than pull"



In the Javadoc for the Component#onConfigure() method, it states (in a
paragraph dealing with setting whether a component is visible and/or
enabled): "It is a better practice to push changes to state rather than
pull." [
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/Component.html#onConfigure()

].

My reading of this sentence is that it is contrasting state change, where
changes should be pushed to the component, with data change, where changes
are pulled by the component from the model (i.e,  change the model, not 
the
component).

Does that sound correct?  Are there state changes other than being visible
and being enabled that should be done in onConfigure?

Thanks
Andrew



**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**

Reply via email to