List of usage examples for org.apache.wicket.markup ComponentTag put
public final void put(String key, StringValue value)
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.ButtonDeleteRenderer.java
License:Apache License
/** * {@inheritDoc}/*from w ww . ja v a 2 s . c o m*/ */ @SuppressWarnings("unchecked") @Override public Component getEditorComponent(String id, IModel model, SelectableListItem parent, int row, int column) { return new LenientAjaxButton(id) { @Override public void onSubmit(AjaxRequestTarget target, Form<?> form1) { panel.deleteListEntity(target); } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", "buttonDelete"); } }; }
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.ButtonEditRenderer.java
License:Apache License
/** * {@inheritDoc}//from www .ja v a 2 s . c om */ @SuppressWarnings("unchecked") @Override public Component getEditorComponent(String id, IModel model, SelectableListItem parent, int row, int column) { return new LenientAjaxButton(id) { @Override public void onSubmit(AjaxRequestTarget target, Form<?> form1) { panel.updateListEntity(target); } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", "buttonEdit"); } }; }
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.DateTextFieldRenderer.java
License:Apache License
/** * {@inheritDoc}/* w w w.java2 s . c o m*/ */ @SuppressWarnings("unchecked") @Override public Component getEditorComponent(String id, IModel model, SelectableListItem parent, int row, int column) { LenientDateTextField teDate = new LenientDateTextField(id, model, new StyleDateConverter("S-", true)) { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", "dateCell"); } }; teDate.add(new DatePicker()); return teDate; }
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.LenientAjaxButton.java
License:Apache License
/** * {@inheritDoc}//from w w w .ja v a 2 s . com */ @Override protected void onComponentTag(final ComponentTag tag) { tag.setName("button"); tag.put("type", "button"); super.onComponentTag(tag); }
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.LenientDateTextField.java
License:Apache License
/** * {@inheritDoc}// www. j ava 2s . c o m */ @Override protected void onComponentTag(final ComponentTag tag) { tag.setName("input"); tag.put("type", "text"); super.onComponentTag(tag); }
From source file:at.ac.tuwien.ifs.tita.ui.uihelper.LinkToIssueTracker.java
License:Apache License
/** * {@inheritDoc}//from ww w .j av a 2 s . c om */ @Override protected void onComponentTag(final ComponentTag tag) { tag.setName("a"); tag.put("href", ""); super.onComponentTag(tag); }
From source file:au.org.theark.core.web.behavior.ArkVisualErrorBehavior.java
License:Open Source License
public void onComponentTag(Component component, ComponentTag tag) { super.onComponentTag(component, tag); if (component instanceof FormComponent) { if (!((FormComponent) component).isValid()) { tag.put("style", "border: 1px solid #CC2200;"); }//from w ww. j a v a2 s . co m } }
From source file:au.org.theark.core.web.component.ArkErrorHighlightBehaviour.java
License:Open Source License
public void onComponentTag(Component c, ComponentTag tag) { try {/*ww w . j ava 2s . c om*/ FormComponent<?> fc = (FormComponent<?>) c; if (!fc.isValid()) { tag.put("class", "error"); } } catch (ClassCastException cce) { // ignore non FormComponent Objects } }
From source file:au.org.theark.core.web.component.navigator.ArkAjaxPagingNavigator.java
License:Open Source License
@Override protected Link<?> newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { AjaxPagingNavigationIncrementLink link = new AjaxPagingNavigationIncrementLink(id, pageable, increment) { private static final long serialVersionUID = 1L; @Override// ww w . j a va 2s. c o m protected void onInitialize() { super.onInitialize(); add(new AjaxPagingNavigationBehavior(this, pageable, "onclick") { /** * */ private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String onClickEvent = tag.getAttribute("onclick"); if (onClickEvent != null) { tag.put("onclick", dirtyFormJavaScript(onClickEvent)); } } }); } }; return link; }
From source file:au.org.theark.core.web.component.navigator.ArkAjaxPagingNavigator.java
License:Open Source License
@Override protected Link<?> newPagingNavigationLink(String id, IPageable pageable, int pageNumber) { AjaxPagingNavigationLink link = new AjaxPagingNavigationLink(id, pageable, pageNumber) { private static final long serialVersionUID = 1L; @Override/* ww w .j a v a 2 s. co m*/ protected void onInitialize() { super.onInitialize(); add(new AjaxPagingNavigationBehavior(this, pageable, "onclick") { private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String onClickEvent = tag.getAttribute("onclick"); if (onClickEvent != null) { tag.put("onclick", dirtyFormJavaScript(onClickEvent)); } } }); } }; return link; }