You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Raul <ra...@netwie.com> on 2013/05/02 12:45:38 UTC

Performance replace panel with AjaxLink.

Hi, I have a problem to replace a panel with Ajax, I use a AjaxLink to
replace a panel on the other, as follows.

Component current = this.getParent();
current.replaceWith (editorPanel);
target.add (editorPanel);

The problem I have it because it makes a call undue page builder. Thing I do
not want to happen, first because it fails to receive the parameter that was
receiving that page and second because even if it worked,  would unduly
penalize performance.

Does anyone know why this call is made?

A greeting and thanks advanced.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Performance replace panel with AjaxLink.

Posted by Raul <ra...@netwie.com>.
Hello, in this project we are not using unit tests, and I can not add a
breakpoint, but I managed to narrow down the error. The call to the
constructor of the page disappears, commenting javascript call panel markup.





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473p4658634.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Performance replace panel with AjaxLink.

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, May 2, 2013 at 3:47 PM, Raul <ra...@netwie.com> wrote:

> Indeed the page is not repainted, but its constructor is called, How to
> put a
> breakpoint?.
>
> From Google: http://www.vogella.com/articles/EclipseDebugging/article.html


>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473p4658484.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Re: Performance replace panel with AjaxLink.

Posted by Raul <ra...@netwie.com>.
Indeed the page is not repainted, but its constructor is called, How to put a
breakpoint?.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473p4658484.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Performance replace panel with AjaxLink.

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, May 2, 2013 at 2:12 PM, Raul <ra...@netwie.com> wrote:

> Let's see, I have a page that receives a parameter, and since I do a query
> parameter to the database to load a panel, within that panel there is
> another panel with a AjaxLink, that when you click I want to be replaced by
> another panel, everything works fine, ie the panel is replaced, but in my
> traces get a NullPointerException, ie when you update with Ajax, the
> AjaxRequestTarget, makes a call to the constructor of the page. received
> additional setting that always puts me is "lib", regardless of the
> initially
> received. The problem is that it makes a call to the constructor of the
> page
> internally, I do not want it done. My question is why do it? and if you can
> avoid it to.
>


Put a breakpoint and see who calls it. Unless you add the page itself in
the ajax request target the page should not be repainted. But even in this
case its constructor should not be called.


>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473p4658481.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Re: Performance replace panel with AjaxLink.

Posted by Raul <ra...@netwie.com>.
Let's see, I have a page that receives a parameter, and since I do a query
parameter to the database to load a panel, within that panel there is
another panel with a AjaxLink, that when you click I want to be replaced by
another panel, everything works fine, ie the panel is replaced, but in my
traces get a NullPointerException, ie when you update with Ajax, the
AjaxRequestTarget, makes a call to the constructor of the page. received
additional setting that always puts me is "lib", regardless of the initially
received. The problem is that it makes a call to the constructor of the page
internally, I do not want it done. My question is why do it? and if you can
avoid it to.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473p4658481.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Performance replace panel with AjaxLink.

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Thu, May 2, 2013 at 12:45 PM, Raul <ra...@netwie.com> wrote:

> Hi, I have a problem to replace a panel with Ajax, I use a AjaxLink to
> replace a panel on the other, as follows.
>
> Component current = this.getParent();
> current.replaceWith (editorPanel);
> target.add (editorPanel);
>
> The problem I have it because it makes a call undue page builder. Thing I
> do
>

I don't understand what you meant above.
Please give more details.


> not want to happen, first because it fails to receive the parameter that
> was
> receiving that page and second because even if it worked,  would unduly
> penalize performance.
>
> Does anyone know why this call is made?
>
> A greeting and thanks advanced.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Performance-replace-panel-with-AjaxLink-tp4658473.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>