Re: [Wicket-user] add class onlclick

2007-07-03 Thread Pieter Cogghe
Super it works. Thanks. I thought you said that because I wrote "id" instead of "class". I didn't see the connection. I did some Ajax related things before without setting outPutMarkU... . Either way it works. 2007/7/3, Alex Objelean <[EMAIL PROTECTED]>: You forgot again to call text.setOutput

Re: [Wicket-user] add class onlclick

2007-07-03 Thread Alex Objelean
You forgot again to call text.setOutputMarkupId(true); This is an important method to make components ajax aware.. yuccaplant wrote: > > I just tried to modify the id to see if the worked, I'm sorry for the > confusion. > > @Nino > I think you might be right, but I couldn't get it to work. (I

Re: [Wicket-user] add class onlclick

2007-07-03 Thread Pieter Cogghe
I just tried to modify the id to see if the worked, I'm sorry for the confusion. @Nino I think you might be right, but I couldn't get it to work. (I changed it to modifying the style attribute, just to quick test visually.) My modified code: // text final Label text = new Label("text", resource

Re: [Wicket-user] add class onlclick

2007-07-03 Thread Alex Objelean
First of all you must setOutputMarkupId to true for the text component: text.setOutputMarkupId(true); Also, you are modifying the id attribute, and not the css... this is also a problem so instead of: text.add(new SimpleAttributeModifier("id","test")); do this: text.add(new Si

Re: [Wicket-user] add class onlclick

2007-07-03 Thread Nino Saturnino Martinez Vazquez Wael
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 lin