RE: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-24 Thread Nick Pratt
Chris Ive been following this thread with interest - what is the use case that drives your need to add components dynamically - why can't you just add a SytemPanel in the panel constructor - is your HTML markup being generated outside of your Wicket app? N On Nov 24, 2012 1:26 AM, Chris Colman

RE: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-24 Thread Chris Colman
Chris Ive been following this thread with interest - what is the use case that drives your need to add components dynamically - why can't you just add a SytemPanel in the panel constructor - is your HTML markup being generated outside of your Wicket app? Our use case is as follows: We have a

RE: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-23 Thread Chris Colman
historically the components you add from auto resolvers are added via the autoAdd() method, not using add(). these components only exist during render of the page (in detach() phase all auto-added components are removed). the thinking here is that auto resolved components are not normal

RE: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-23 Thread Chris Colman
I had a thought - is there an interface implemented that provides the parsing of markup? If there was then I could somehow hook into that or provide another implementation and avoid double parsing of the markup - or would that be happening too late in the lifecycle to work? -Original

Re: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-23 Thread Martin Grigorov
See IMarkupFilter implementations. On Fri, Nov 23, 2012 at 12:08 PM, Chris Colman chr...@stepaheadsoftware.com wrote: I had a thought - is there an interface implemented that provides the parsing of markup? If there was then I could somehow hook into that or provide another implementation

RE: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-23 Thread Chris Colman
Wow! That was a bit too easy! Here's how to override onInitialize to dynamically add components to a page that are specified in the markup: protected void onInitialize() { super.onInitialize(); IMarkupFragment markupElements = getMarkup();

Re: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-22 Thread Igor Vaynberg
historically the components you add from auto resolvers are added via the autoAdd() method, not using add(). these components only exist during render of the page (in detach() phase all auto-added components are removed). the thinking here is that auto resolved components are not normal

Re: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-22 Thread Sven Meier
The markup is parsed already, see Component#getMarkup(). Sven On 11/23/2012 08:33 AM, Chris Colman wrote: starting with wicket 1.5, however, components are able to resole their markup earlier in their lifecycle. the reason auto resolved components are added so late and treated specially was

Re: Ideas on implementing dynamic addition of components that use AJAX?

2012-11-22 Thread Martin Grigorov
Hi, On Fri, Nov 23, 2012 at 9:33 AM, Chris Colman chr...@stepaheadsoftware.comwrote: starting with wicket 1.5, however, components are able to resole their markup earlier in their lifecycle. the reason auto resolved components are added so late and treated specially was because the markup