I think it might have something todo with the fact that you are adding 
the attributemodifier in the ajax call? So each time you get the call 
you add another modifier, it would be better to add to modifier once and 
then change its model instead...

regards Nino

Pieter Cogghe wrote:
> If some link is clicked, I want to change the css-class of a label 
> like this:
>
> // text
> final Label text = new Label("text", resourceRecord.getText());
> add(text)
>
> // edit link
> add(new AjaxFallbackLink("edit-link"){
>     @Override
>     public void onClick(AjaxRequestTarget target) {  
>         // dome some other stuff
>         text.add(new SimpleAttributeModifier("id","test"));
>         if (target != null) {
>             // add some other components
>             target.addComponent(text);
>         }
>     }
>
> });
>
>
> Somehow this doesn't work. I guess I simply missed something?
>
> thanks,
>
> Pieter
>
> -- 
> Pieter Cogghe
> Ganzendries 186
> 9000 Gent
> 0487 10 14 21
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to