Feel free to play here!
Testing...
In your java:
import wicket.markup.html.WebComponent;
import wicket.model.IModel;
import wicket.model.Model;
import wicket.AttributeModifier;
import wicket.Component;
...
WebComponent c = new WebComponent( "mycss" );
IModel model = new Model()
{
public Object getObject( Component c )
Unknown macro: { if ( someConditionIsTrue ) return "stylesheetx.css"; else return "stylesheety.css"; }
};
c.add( new AttributeModifier( "href", model ) );
add( c );