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 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() {
> > > public Object getObject(final Component component)
> > > {
> > > String cssClass;
> > > if(isHorizontal)
> > > {
> > >  cssClass = "menuItemsHorizontal";
> > > } else {
> > >  cssClass = "menuItemsVertical";
> > > }
> > > return cssClass;
> > > }
> > >}));
> > >
> > > This is almost exactly the same as the example i got from Erik.
> > >
> > > Ted
> >
> > --
> > Erik van Oosten
> > http://www.day-to-day-stuff.blogspot.com/
> >
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>


-- 
http://www.thebeststuffintheworld.com/vote_for/wicket";>Vote
for http://www.thebeststuffintheworld.com/stuff/wicket";>Wicket
at the http://www.thebeststuffintheworld.com/";>Best Stuff in
the World!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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
http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html.

Regards,
Erik.


Ted Roeloffzen wrote:
> 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 exactly the same as the example i got from Erik.
>
> Ted

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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

2006-12-01 Thread Ted Roeloffzen












-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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() {
> public Object getObject(final Component component)
> {  
> String cssClass;
> if(isHorizontal)
> {
>  cssClass = "menuItemsHorizontal";
> } else {
>  cssClass = "menuItemsVertical";
> }
> return cssClass;
> }
>}));
>  
> This is almost exactly the same as the example i got from Erik.
>  
> Ted

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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 = "menuItemsVertical";
}
return cssClass;
}
   }));

This is almost exactly the same as the example i got from Erik.

Ted

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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 exactly the same as the example i got from Erik.

Ted
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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
> >
> > 

>
>
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




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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

2006-11-30 Thread Ted Roeloffzen

Okay i'll take a look at it.
Thanks to the both of you.

Ted

2006/11/30, Erik van Oosten <[EMAIL PROTECTED]>:


You can change attributes in several ways. The easiest is by adding a
behavior.
An example is described here:

http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html

Note that some subclasses of AttributeModifier are generally easier to
use.

Regards,
 Erik.

Ted Roeloffzen schreef:
> 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

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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

2006-11-30 Thread Erik van Oosten
You can change attributes in several ways. The easiest is by adding a 
behavior.
An example is described here: 
http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html

Note that some subclasses of AttributeModifier are generally easier to use.

Regards,
 Erik.

Ted Roeloffzen schreef:
> 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

-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


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

2006-11-30 Thread Eelco Hillenius
Add a (Simple)AttributeModifier.

Eelco


On 11/30/06, Ted Roeloffzen <[EMAIL PROTECTED]> wrote:
> 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
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user