You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Zenberg Ding <ze...@gmail.com> on 2009/04/16 04:13:20 UTC

Page content setting on a panel.

Hi, How can let a page render to a panel component, then I can avoid page  
inherited and whole page refresh to build my pages layout.

Think about this :

<html>
<body>
	<span wicket:id="navigator"/>
	<span wicket:id="content"/>
</body>
</html>

   onNavNodeClicked(AjaxRequestTarget target) {
	MyPage page = new MyPage(...);
         Component component = getPage().get("content");
         ((Panel)component).setRenderPage(page); // this method is what i  
wanted.
         target.add(component); //my page's cotent rendered
   }

----
so, is there any way to reach this?

Thanks.

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


Re: Page content setting on a panel.

Posted by Zenberg Ding <ze...@gmail.com>.
Thank u, I'll check it


> I would use an iframe instead of doing this, or I would use panels  
> instead of pages. But you may want to look at the code of ModalWindow in  
> wicket extensions since it is capable of doing what you want, i.e.  
> displaying the content of a page within a <div>.
>
>
>
>
> Zenberg Ding wrote:
>> Hi, How can let a page render to a panel component, then I can avoid  
>> page inherited and whole page refresh to build my pages layout.
>>
>> Think about this :
>>
>> <html>
>> <body>
>> <span wicket:id="navigator"/>
>> <span wicket:id="content"/>
>> </body>
>> </html>
>>
>> onNavNodeClicked(AjaxRequestTarget target) {
>> MyPage page = new MyPage(...);
>> Component component = getPage().get("content");
>> ((Panel)component).setRenderPage(page); // this method is what i wanted.
>> target.add(component); //my page's cotent rendered
>> }
>>
>> ----
>> so, is there any way to reach this?
>>
>> Thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

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


Re: Page content setting on a panel.

Posted by Serkan Camurcuoglu <Se...@telenity.com>.
I would use an iframe instead of doing this, or I would use panels 
instead of pages. But you may want to look at the code of ModalWindow in 
wicket extensions since it is capable of doing what you want, i.e. 
displaying the content of a page within a <div>.




Zenberg Ding wrote:
> Hi, How can let a page render to a panel component, then I can avoid 
> page inherited and whole page refresh to build my pages layout.
>
> Think about this :
>
> <html>
> <body>
> <span wicket:id="navigator"/>
> <span wicket:id="content"/>
> </body>
> </html>
>
> onNavNodeClicked(AjaxRequestTarget target) {
> MyPage page = new MyPage(...);
> Component component = getPage().get("content");
> ((Panel)component).setRenderPage(page); // this method is what i wanted.
> target.add(component); //my page's cotent rendered
> }
>
> ----
> so, is there any way to reach this?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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