@Test public void testCustomCssClass() { Wicketopia plugin = new Wicketopia(); plugin.install(tester.getApplication()); final EditableBean bean = new EditableBean(); bean.setStringProperty("Hello"); bean.setIntProperty(123); bean.setDoubleProperty(456.0); bean.setGender(Gender.Male); final IModel<EditableBean> model = new Model<EditableBean>(bean); final Context context = new Context(Context.CREATE); CssBeanViewLayoutPanel<EditableBean> panel = new CssBeanViewLayoutPanel<EditableBean>(CssBeanViewLayoutTestPage.PANEL_ID, EditableBean.class, model, context, plugin.createEditorFactory(EditableBean.class)); panel.setCssClass("custom-css"); tester.startPage(new CssBeanViewLayoutTestPage(panel)); tester.assertRenderedPage(CssBeanViewLayoutTestPage.class); assertEquals(tester.getTagByWicketId("view").getAttribute("class"), "custom-css"); tester.assertNoErrorMessage(); tester.assertNoInfoMessage(); }
public CssBeanViewLayoutPanel<T> setCssClass(String cssClass) { this.cssClass = cssClass; return this; }
CssBeanViewLayoutPanel extends BeanViewLayoutPanel<T> { public CssBeanViewLayoutPanel<T> setCssClass(String cssClass) { this.cssClass = cssClass; return this; } }
CssBeanViewLayoutPanel extends BeanViewLayoutPanel<T> { public CssBeanViewLayoutPanel<T> setCssClass(String cssClass) { this.cssClass = cssClass; return this; } CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, List<String> propertyNames);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, String... propertyNames); }
CssBeanViewLayoutPanel extends BeanViewLayoutPanel<T> { public CssBeanViewLayoutPanel<T> setCssClass(String cssClass) { this.cssClass = cssClass; return this; } CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, List<String> propertyNames);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, String... propertyNames); CssBeanViewLayoutPanel<T> setCssClass(String cssClass); }
CssBeanViewLayoutPanel extends BeanViewLayoutPanel<T> { public CssBeanViewLayoutPanel<T> setCssClass(String cssClass) { this.cssClass = cssClass; return this; } CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, List<String> propertyNames);  CssBeanViewLayoutPanel(String id, Class<T> beanType, IModel<T> beanModel, Context context, PropertyComponentFactory<T> componentFactory, String... propertyNames); CssBeanViewLayoutPanel<T> setCssClass(String cssClass); static final String DEFAULT_CSS_CLASS; }