i was thinking of a situation where you need multiple components to be updated from a single ajax request. like in an email client when you change the folder you want the message list and the preview pane to be updated. so one ajax event that leads to two components being updated on the page.
-Igor
On 1/15/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
I like the target rendering, as I only need to know to set the target
correctly. If you are rendering multiple components into the stream,
you are pretty much at the lowest level of Wicket processing.
RequestCycle.get ().addRequestTarget(new ComponentTarget(myTarget));
seems a lot less complicated than remembering to have to perform
onBeginRequest() and onEndRequest().
The component target is created for that purpose.
I think it is not usefull to have to pick specific components to
render HTML directly. Or are you doing markup parsing on the client
side as well?
The only reason I can think of where cherry picking sub components in
an Ajax call is valid, is when you do _javascript_ rendering: creating
_javascript_ that updates the various components on the client side.
Direct HTML markup rendering will not work too good, as it is fairly
complex to select the right HTML to set on the innerHtml property in
the document.
Martijn
On 1/14/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> i dont like using a target to render components. it feels more of a work
> around. i would like my handler code to look like this:
>
> onAjaxCallback() {
> Component a=page.get("...");
> Component b=page.get ("....");
>
> OutputStream stringStream=....
> a.onBeginRequest();
> a.render(stringStream);
> a.onEndRequest();
>
> b.onBeginRequest();
> b.render(stringStream);
> b.onEndRequest();
>
> return stringStream;
>
> }
>
> maybe have a convinience function to called render(Component, OutputStream )
> in the ajax handler that would call onbegin/endrequest.
>
> but i am in total control of what components i wish to render and where
> their output is going. i dont need any, imho goofy, response swapping, etc.
>
> and another thing. what we need is a way to render only the body of the
> component easily because most of the time in an ajax response you only want
> to swap out the body not the tag.
> right now you have to call setrenderbodyonly and then restore its state,
> which is again goofy.
>
>
> in my sandbox i have render(OutputStream) renderBody(OutputStream) and i
> think it works great, as far as 1.2 im not sure what the best way is.
>
>
> -Igor
>
>
>
> On 1/14/06, Eelco Hillenius <[EMAIL PROTECTED] > wrote:
> > We could make a special target for that I guess. Not sure whether that
> > is more elegant though... What do you think?
> >
> > Eelco
> >
> >
> > On 1/14/06, Igor Vaynberg < [EMAIL PROTECTED] > wrote:
> > > what if you want to render more then one component in a single ajax
> request?
> > > can you do that via setting the request target?
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 1/14/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Martijn told me a couple of days ago that instead of directly
> > > > requesting a component to render itselve, he just set the proper
> > > > request target (I think that is ComponentRequestTarget) instead. I
> > > > think that's much more elegant.
> > > >
> > > > Eelco
> > > >
> > > >
> > > > On 1/14/06, Jonathan Locke < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > but all these ajax components are using doRender()...
> > > > > and it's confusing how doRender() differs from render().
> > > > > you can't tell just from the name. can we somehow
> > > > > collapse the two logically?
> > > > >
> > > >
> > > >
> > > >
> -------------------------------------------------------
> > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > > files
> > > > for problems? Stop! Download the new AJAX search engine that makes
> > > > searching your log files as easy as surfing the web. DOWNLOAD
> SPLUNK!
> > > > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > > > _______________________________________________
> > > > Wicket-develop mailing list
> > > > [email protected]
> > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > > >
> > >
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>
--
Living a wicket life...
Martijn Dashorst - http://www.jroller.com/page/dashorst
Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
