You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by SantiagoA <s....@gmx.de> on 2007/10/16 09:48:43 UTC

Examples for AjaxLazyLoadPanel?

Hi,
i am trying to use an AjaxLazyLoadPanel, but have some Problems to get it
work.

I have a page with a panel, which produces heavily loading action. I just
want the page to be shown while the panel is loaded in contrast to load the
whole thing and get the page rendered afterwards.

Are there examples on how to use the panel correctly?

I´m  relatively new to this (2 years working with java, half a year with
wicket), so please excuse. :) 
-- 
View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13228392
Sent from the Wicket - User 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: Examples for AjaxLazyLoadPanel?

Posted by SantiagoA <s....@gmx.de>.
Thanks, that helped a lot.

Now I have another problem with that.
The panel, which is lazily loaded works but if i try to update it via Ajax,
i get this error:

Ajax render cannot be called on component that has setRenderBodyOnly
enabled.
Component: [MarkupContainer [Component id = content, ...
The Component with id=content seems to come from the AjaxLazyLoadPanel, i
think.

The wanted workflow is:
On the site is a table with radiobuttons. The first element has set the
radiobutton. The details of that element are shown in the lazily loaded
panel. If I change the active radiobutton in the table the details should be
refreshed, but this is the point where i get this error.


-- 
View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13230938
Sent from the Wicket - User 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: Examples for AjaxLazyLoadPanel?

Posted by SantiagoA <s....@gmx.de>.
Because I have replaced a Panel by an AjaxLazyLoadPanel, I had to replace the
ids for the targets at the other ajax-components too. That was just my
fault.

Example:
Step 1:
 myPanel = new MyPanel("panelName", new PropertyModel(this,"searchString"),
version);
 ...
someAjax
...
 target(myPanel);
...

Step 2: replaced by
 myLazyPanel = new AjaxLazyLoadPanel("lazyload"){
 @Override
  public Component getLazyLoadComponent(String id){
   myPanel = new MyPanel("panelName", new
PropertyModel(myPage.this,"searchString"), version);
   myPanel.setOutputMarkupId(true);
   return myPanel;
  }
 };
 ...
someAjax
...
 target(myLazyPanel);
...

Step 3:
 I replaced "panelName" by id
-- 
View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13234761
Sent from the Wicket - User 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: Examples for AjaxLazyLoadPanel?

Posted by Frank Bille <fr...@apache.org>.
On 10/16/07, SantiagoA <s....@gmx.de> wrote:
>
>
> Allright. Problem solved.



Good to hear :) Can I  get you to write what the problem was and what you
did to solve it? Just so if others search for this later they can find your
answer.

Frank

Re: Examples for AjaxLazyLoadPanel?

Posted by SantiagoA <s....@gmx.de>.
Allright. Problem solved.

Thanks for the help again.
-- 
View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13231668
Sent from the Wicket - User 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: Examples for AjaxLazyLoadPanel?

Posted by Florian Sperber <fl...@sperber.info>.
Did you look at

   http://www.wicketstuff.org/wicket13/ajax/lazy-loading.1

Kind regards,
Florian Sperber

SantiagoA schrieb:
> Hi,
> i am trying to use an AjaxLazyLoadPanel, but have some Problems to get it
> work.
> 
> I have a page with a panel, which produces heavily loading action. I just
> want the page to be shown while the panel is loaded in contrast to load the
> whole thing and get the page rendered afterwards.
> 
> Are there examples on how to use the panel correctly?
> 
> I´m  relatively new to this (2 years working with java, half a year with
> wicket), so please excuse. :) 


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