What do the tasty HTML bits look like? (wicket:ids and what not) On Fri, Feb 5, 2010 at 12:50 PM, Rangel Preis <rangel...@gmail.com> wrote: > How can I use Ajax to change value from a parent page in my layout. I > try to change values in header using a action from content page. > > I have this: > > |-------------------------------| > | HEADER | > |-------------------------------| > | MENU | CONTENT | > | | | > | | | > | | | > |-----------|-------------------| > | FOOTER | > |-------------------------------| > > public class MyTemplate{ > public MyTemplate() { > super(); > > this.add(CSSPackageResource.getHeaderContribution(...); > > this.add(AbstractTemplatePage.FEEDBACK); > > this.addOrReplace(new Header()); > > this.add(new Menu()); > > this.add(new Footer()); > ..... > > > public class MyContetPage extends MyTemplate { > public MyContetPage(final PageParameters _parameters) { > add(new AjaxFallbackLink<Void>("rem") { > > �...@override > public void onClick(final AjaxRequestTarget target) { > …... > } > }); > …. > } > } > > How change value in the header when i click on the ajaxlink of my content > page? > > In the onClick i try this; but don't work > > //some function to change the model value... > this.getPage().get("header:component").modelChanged(); > target.addComponent(this.getPage().get("header:component")); > > And in my Header.java I override onModelChanged: > protected void onModelChanged() { > super.onModelChanged(); > this.addOrReplace(component).setOutputMarkupId(true)); > } > > Thanks all. > > --------------------------------------------------------------------- > 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