Re: Chaining components

2008-06-17 Thread Timo Rantalaiho
On Mon, 16 Jun 2008, Matthijs Wensveen wrote: I've been thinking about writing aspects that fire Component.onModelChanged even when the model's object changed (possibly deep within an object hierarchy). Another option would be to use PropertyChangeSupport. Either way, you'd never require

Re: Chaining components

2008-06-16 Thread Matthijs Wensveen
Martin Makundi wrote: Now if I change the country, I must change the list of allowed values for cityCombo. http://wicketstuff.org/wicket13/ajax/choice Thanks, I remember seeing that but already forgot about the idea that a dropdown choice can be a model, and a smart model too.

Re: Chaining components

2008-06-16 Thread Jonathan Locke
] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Chaining-components-tp17853298p17859174.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe

Re: Chaining components

2008-06-16 Thread Johan Compagner
://www.nabble.com/Chaining-components-tp17853298p17859174.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Chaining components

2008-06-16 Thread Martin Makundi
I've been thinking about writing aspects that fire Component.onModelChanged even when the model's object changed (possibly deep within an object hierarchy). Do you have a demo about this? I am about to write a HierarchicalAjaxRefreshTargetPropagator soon just to get a feeling if it is a bad

Re: Chaining components

2008-06-16 Thread Matthijs Wensveen
Martin Makundi wrote: I've been thinking about writing aspects that fire Component.onModelChanged even when the model's object changed (possibly deep within an object hierarchy). Do you have a demo about this? Unfortunately no, I didn't have the time to convert my brain contents to

Re: Chaining components

2008-06-16 Thread Martin Makundi
If you just need a reference to the AjaxRequestTarget then you can do RequestCycle.get().getRequestTarget() and do an instanceof with AjaxRequestTarget. Well, I need the ajax event too so I suppose I can equally well pick up the target from there. I will post my brain later if I am succesful.

Re: Chaining components

2008-06-16 Thread Matthijs Wensveen
] -- View this message in context: http://www.nabble.com/Chaining-components-tp17853298p17859174.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Chaining components

2008-06-16 Thread Martin Makundi
What is your idea of nice chaining? http://wicketstuff.org/wicket13/ajax/choice I am using 1.4-m1 and I tried to make public abstract class AbstractListChoiceModelS extends AbstractReadOnlyModelListS { @Override public final ListS getObject() { return getChoices(); } protected

Re: Chaining components

2008-06-16 Thread Igor Vaynberg
AbstractReadOnlyModelList? extends S { should work iirc -igor On Mon, Jun 16, 2008 at 7:08 AM, Martin Makundi [EMAIL PROTECTED] wrote: What is your idea of nice chaining? http://wicketstuff.org/wicket13/ajax/choice I am using 1.4-m1 and I tried to make public abstract class

Chaining components

2008-06-15 Thread Martin Makundi
Hi! When I chain components, comboboxes and tables etc., I find myself repeatedly solving the same problem: * the parent component causes a data reload * the parent component causes an ajax refresh Has someone found a generic eventlistener-like solution to this? My current inline

Re: Chaining components

2008-06-15 Thread Igor Vaynberg
On Sun, Jun 15, 2008 at 11:38 AM, Martin Makundi [EMAIL PROTECTED] wrote: Hi! When I chain components, comboboxes and tables etc., I find myself repeatedly solving the same problem: * the parent component causes a data reload if you chain your models properly (make child's model depend on

Re: Chaining components

2008-06-15 Thread Martin Makundi
if you chain your models properly (make child's model depend on parent's model) this should work transparently. Say I have a Person with properties Person.country and Person.city. Then I have a countryCombo = dropDown... and a cityCombo = dropDown().. Now if I change the country, I must change

Re: Chaining components

2008-06-15 Thread Martin Makundi
Now if I change the country, I must change the list of allowed values for cityCombo. http://wicketstuff.org/wicket13/ajax/choice Thanks, I remember seeing that but already forgot about the idea that a dropdown choice can be a model, and a smart model too. interface statechangedlistener {