You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by heapifyman <he...@gmail.com> on 2010/06/25 19:29:53 UTC

Markup Inheritance example with Ajax?

Hello all,

I would like to extend the Markup Inheritance example
(http://wicket.apache.org/examplemarkupinheritance.html) by replacing
the content part of the page (i.e. the wicket:child) using Ajax.

I tried to replace the BookmarkablePageLink on the BasePage with an
AjaxLink but this does not seem to work because one cannot add a WebPage
(e.g. Page1 in the example) to the target in the onClick() method.

Is there a way in Wicket to have a BasePage with header, content and
footer and replace the content by using Ajax?

I'd appreciate if anyone could point me to some example or documentation.

Best regards,
philip


Re: Markup Inheritance example with Ajax?

Posted by heapifyman <he...@gmail.com>.
Am 25.06.2010 20:09, schrieb Jeremy Thomerson:
> If you want to do this, you are basically using the single-page paradigm
> where your content is always a panel.  Basically you just create a single
> page, and then all of your content goes into panels instead of pages with
> markup inheritance.  Then swap the panel in your link and add it to the ajax
> response.  You can make these bookmarkable through PageParameters.

Thank you both. Panels are what I've been looking for.

> 
> Jeremy Thomerson
> 
> On Fri, Jun 25, 2010 at 12:29 PM, heapifyman <he...@gmail.com> wrote:
> 
>>
>> Hello all,
>>
>> I would like to extend the Markup Inheritance example
>> (http://wicket.apache.org/examplemarkupinheritance.html) by replacing
>> the content part of the page (i.e. the wicket:child) using Ajax.
>>
>> I tried to replace the BookmarkablePageLink on the BasePage with an
>> AjaxLink but this does not seem to work because one cannot add a WebPage
>> (e.g. Page1 in the example) to the target in the onClick() method.
>>
>> Is there a way in Wicket to have a BasePage with header, content and
>> footer and replace the content by using Ajax?
>>
>> I'd appreciate if anyone could point me to some example or documentation.
>>
>> Best regards,
>> philip
>>
>>
> 
> 



Re: Markup Inheritance example with Ajax?

Posted by Jeremy Thomerson <je...@wickettraining.com>.
If you want to do this, you are basically using the single-page paradigm
where your content is always a panel.  Basically you just create a single
page, and then all of your content goes into panels instead of pages with
markup inheritance.  Then swap the panel in your link and add it to the ajax
response.  You can make these bookmarkable through PageParameters.

Jeremy Thomerson

On Fri, Jun 25, 2010 at 12:29 PM, heapifyman <he...@gmail.com> wrote:

>
> Hello all,
>
> I would like to extend the Markup Inheritance example
> (http://wicket.apache.org/examplemarkupinheritance.html) by replacing
> the content part of the page (i.e. the wicket:child) using Ajax.
>
> I tried to replace the BookmarkablePageLink on the BasePage with an
> AjaxLink but this does not seem to work because one cannot add a WebPage
> (e.g. Page1 in the example) to the target in the onClick() method.
>
> Is there a way in Wicket to have a BasePage with header, content and
> footer and replace the content by using Ajax?
>
> I'd appreciate if anyone could point me to some example or documentation.
>
> Best regards,
> philip
>
>


-- 
Jeremy Thomerson
http://www.wickettraining.com

Re: Markup Inheritance example with Ajax?

Posted by Edward Zarecor <wi...@indeterminate.org>.
What you are trying to accomplish doesn't require markup inheritance.

You can use a panel and replace it with an Ajax link.

That panel could be nested within wicket children participating in
markup inheritance, but that's another matter.  The panel should be
the component added to the AjaxRequestTarget.

Ed.


On Fri, Jun 25, 2010 at 1:29 PM, heapifyman <he...@gmail.com> wrote:
>
> Hello all,
>
> I would like to extend the Markup Inheritance example
> (http://wicket.apache.org/examplemarkupinheritance.html) by replacing
> the content part of the page (i.e. the wicket:child) using Ajax.
>
> I tried to replace the BookmarkablePageLink on the BasePage with an
> AjaxLink but this does not seem to work because one cannot add a WebPage
> (e.g. Page1 in the example) to the target in the onClick() method.
>
> Is there a way in Wicket to have a BasePage with header, content and
> footer and replace the content by using Ajax?
>
> I'd appreciate if anyone could point me to some example or documentation.
>
> Best regards,
> philip
>
>

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