Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Feel free to play here!

Testing...

In your java:

Panel
Wiki Markup

  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 )
      {
          if ( someConditionIsTrue )
              return "stylesheetx.css";
          else
              return "stylesheety.css";
      }
  };
  c.add( new AttributeModifier( "href", model ) );
  add( c );