Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Ted Roeloffzen
Hi all, An example is described here: http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html If have taken a look at the example given above, but it still doesn't work. Wicket won't change the value of the class attribute. Ted

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Dirk Markert
Show us some of your code. 2006/12/1, Ted Roeloffzen [EMAIL PROTECTED]: Hi all, An example is described here: http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html+ If have taken

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Ted Roeloffzen
list.add(new AttributeModifier(class, new Model() { public Object getObject(final Component component) { String cssClass; if(isHorizontal) { cssClass = menuItemsHorizontal; } else { cssClass = menuItemsVertical; } return cssClass; } })); This is almost

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Dirk Markert
And your html? 2006/12/1, Ted Roeloffzen [EMAIL PROTECTED]: list.add(new AttributeModifier(class, new Model() { public Object getObject(final Component component) { String cssClass; if(isHorizontal) { cssClass = menuItemsHorizontal; } else { cssClass =

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Erik van Oosten
Hi Ted, I see that the component is called 'list'. If it is a ListView (or similar) you should also read the FAQ entry on http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html. Regards, Erik. Ted Roeloffzen wrote: list.add(new AttributeModifier(class, new Model() {

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Ted Roeloffzen
wicket:panel ul wicket:id=menuItems class=menuItemsVertical lia wicket:id=menuItem class=menuItemdiv wicket:id=menuItemLabel /div/a/li /ul /wicket:panel - Take Surveys. Earn Cash. Influence the Future of IT Join

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Ted Roeloffzen
It is indeed a ListView. Which is attached to an UL-tag Ted 2006/12/1, Erik van Oosten [EMAIL PROTECTED]: Hi Ted, I see that the component is called 'list'. If it is a ListView (or similar) you should also read the FAQ entry on

Re: [Wicket-user] Changing class attribute of a HTML-tag

2006-12-01 Thread Martijn Dashorst
add the attribute modifier to the ITEM instead of the list. Martijn On 12/1/06, Ted Roeloffzen [EMAIL PROTECTED] wrote: It is indeed a ListView. Which is attached to an UL-tag Ted 2006/12/1, Erik van Oosten [EMAIL PROTECTED]: Hi Ted, I see that the component is called 'list'. If

[Wicket-user] Changing class attribute of a HTML-tag

2006-11-30 Thread Ted Roeloffzen
Hi all, Is it possible to change the class attribute of a tag at run-time using Wicket? I need multiple instances of the same component, but with different styles. Ted - Take Surveys. Earn Cash. Influence the Future of IT