wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard W. Adams" <RWADA...@UP.COM>
Subject Re: "It is a better practice to push changes to state rather than pull"
Date Mon, 16 Apr 2012 18:55:45 GMT
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.geery@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.
**

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message