I wonder if there could be components that would melt/dissolve after use...

... for example a label:

container.add(new Label("xx"));

After use, the label output would become part of container's markup
output at proper position, but there would remain no reference to an
instance of label component.

This would be something like a "passive" component... not just "stateless".

**
Martin

2012/2/23 Igor Vaynberg <igor.vaynb...@gmail.com>:
> ajax updates work based on components, so in this particular case you
> would only be able to update the entire listview using ajax. so design
> your component breakdown accordingly.
>
> of course if you design these optimized components to be able to
> produce some part of its output you can use jquery ajax to repaint
> just those parts...but thats a bit more wiring.
>
> -igor
>
> On Thu, Feb 23, 2012 at 8:43 AM, Martin Makundi
> <martin.maku...@koodaripalvelut.com> wrote:
>> 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
>>
>
> ---------------------------------------------------------------------
> 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