disagree. while you could certainly screw this up in many different
ways, onAdded() and onRemoved
are a huge invitation for people to get burned. in fact, when you get
your call to onAdded(), about all
you can do is reorder yourself. seems more prudent if that's the purpose
to provide an ordering mechanism.
but /why/ do you need to do this? listview doesn't need this. have you
looked at the implementation of that?
i think the child container mechanism it uses is pretty elegant.
Igor Vaynberg wrote:
seems to me the same naïve user would override add() or remove() to gain the
same functionality so I don’t see how not having the listeners protects
them.
If we arent going to add them lets at least cleanup the methods we have now
so that autoadd() doesn’t use add() directly and removeall() calls remove()
for each component.
-Igor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Jonathan Locke
Sent: Monday, August 15, 2005 5:39 PM
To: [email protected]
Subject: Re: [Wicket-develop] [ wicket-Patches-1260172 ] add
getchildren to markupcontainer
we had onAdded and onRemoved methods in an experiment
recently and it didn't go well at all. there is considerable
danger to this idea.
until rendering
happens, the state of a component is not yet stable. it may
have no parent, for example. if it has no parent, other
preconditions for success may fail, such as anything
involving the component's associated session or application object.
i think it's better not to notify anyone as the tree is being
built because things would fail in onAdded that naive users
would not expect to fail. worse, they will do things that
/sometimes/ fail. or /rarely/ fail. not good at all!
Igor Vaynberg wrote:
If we don't guarantee the order I think we should at least introduce
two template methods: onChildAdded(Component) and
onChildRemoved(Component).
These would be called from the add(), remove(), removeall(), etc.
Right now you need to look at the internals to know that autoadd()
calls
add() internally, removeAll() doesn't call remove() for
every object, etc.
Having onChildAdded and onChildRemoved will make it easy to add your
own ordering logic.
Also making iterator() overridable will further facilitate a
user-implemented ordering at render time, although this might open a
can of worms.
-igor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jonathan Locke
Sent: Monday, August 15, 2005 5:09 PM
To: [email protected]
Subject: Re: [Wicket-develop] [ wicket-Patches-1260172 ] add
getchildren to markupcontainer
a good question. we should add it to the javadoc if it's true. i
think we should at least guarantee that FormComponents are
validated
in the order they are added.
more than that, i'm not so sure.
Igor Vaynberg wrote:
On a side note,
Is the fact that iterator() now returns items in the order
they were
added going to be a formal contract?
-Igor
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices Agile & Plan-Driven Development * Managing
Projects & Teams *
Testing & QA Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices Agile & Plan-Driven Development * Managing
Projects & Teams
* Testing & QA Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices Agile & Plan-Driven Development * Managing
Projects & Teams *
Testing & QA Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference &
EXPO September 19-22, 2005 * San Francisco, CA * Development
Lifecycle Practices Agile & Plan-Driven Development *
Managing Projects & Teams * Testing & QA Security * Process
Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop