Looks powerful, thanks. What about partial ajax updates, should I
design so that I can replace complete webcomponents (might restrict
optimization) or is there a way to interact nicely with wicket-ajax
with such inline code?

**
Martin

2012/2/23 Igor Vaynberg <igor.vaynb...@gmail.com>:
> you can, for example, replace the entire listview with a single
> component like this:
>
> class workerlist extends webcomponent implements ilinklistener {
>
>   oncomponenttagbody() {
>         stringbuilder markup=new stringbuilder();
>         markup.append("<table>");
>         for (worker:list) {
>           
> markup.append("<tr><td>").append(Strings.escapeMarkup(worker.name())).append("</td>");
>           markup.append("<td><a
> href=").append(urlfor(ilinklistener.interface)).append("&action=checkout>checkout</a></td>
>      ...
>      replaceComponentTAgBody(...., markup);
>   }
>
>
>   protected void onclick() {
>       string action=getrequest().getparameter("action");
>       switch (action) {....}
>    }
> }
>
> basically its kind of like writing a servlet, but within the scope of
> a component. not pretty but works.
>
> -igor
>
> On Thu, Feb 23, 2012 at 8:18 AM, Martin Makundi
> <martin.maku...@koodaripalvelut.com> wrote:
>>>> I think the best optimisation for this kind of thing is probably to try to
>>>> reduce the component count as much as possible by implementing custom
>>>> components that render directly to html.
>>>
>>> +1
>>
>> What might be the best way (performance-wise) to make such a custom
>> component (rendering the dynamic markup, for example replacing a
>> label)? We have lots of labels and nested listview listitems...
>>
>> **
>> Martin
>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to