Re: WebMarkupContainer Ajax update problem
I replaced Id with class and it worked ! Thanks. 2009/9/4 Jeremy Thomerson jer...@wickettraining.com I'm not sure you can change the ID of an element in an Ajax request. Wicket depends on the ID to do component replacement. Try using a class instead. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Sep 3, 2009 at 5:57 PM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi ; In Panel I have a AjaxButton In that AjaxButton, I tried to update the background (Parent Pages's WebMarkupContainer). Here is the simplified code : AjaxButton vote = new AjaxButton(Vote) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { . WebMarkupContainer content = (WebMarkupContainer) super.findPage().get(Content); content.add(new SimpleAttributeModifier(id, content_selected)) ; target.addComponent(content); } Also I set WebMarkupContainer.setOutputMarkupId(true); in my parent page Any suggestions ? Thanks. -- Altuğ. -- Altuğ.
WebMarkupContainer Ajax update problem
Hi ; In Panel I have a AjaxButton In that AjaxButton, I tried to update the background (Parent Pages's WebMarkupContainer). Here is the simplified code : AjaxButton vote = new AjaxButton(Vote) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { . WebMarkupContainer content = (WebMarkupContainer) super.findPage().get(Content); content.add(new SimpleAttributeModifier(id, content_selected)) ; target.addComponent(content); } Also I set WebMarkupContainer.setOutputMarkupId(true); in my parent page Any suggestions ? Thanks. -- Altuğ.
RE: WebMarkupContainer Ajax update problem
Have you tried: content..add(new SimpleAttributeModifier(style, background-image=url(...))); I haven't done this, but you might also be able to do: content.add(new SimpleAttributeModifier(class, new-class-name)); Date: Fri, 4 Sep 2009 01:57:36 +0300 Subject: WebMarkupContainer Ajax update problem From: alt...@gmail.com To: users@wicket.apache.org Hi ; In Panel I have a AjaxButton In that AjaxButton, I tried to update the background (Parent Pages's WebMarkupContainer). Here is the simplified code : AjaxButton vote = new AjaxButton(Vote) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { . WebMarkupContainer content = (WebMarkupContainer) super.findPage().get(Content); content.add(new SimpleAttributeModifier(id, content_selected)) ; target.addComponent(content); } Also I set WebMarkupContainer.setOutputMarkupId(true); in my parent page Any suggestions ? Thanks. -- Altuğ. _ With Windows Live, you can organize, edit, and share your photos. http://www.windowslive.com/Desktop/PhotoGallery