/** * Called by {@link #onComponentTag(ComponentTag)} when the component is disabled. By default, * this method will add a disabled="disabled" attribute to the tag. Components may override this * method to tweak the tag as they think is fit. * * @param tag * the tag that is being rendered */ protected void onDisabled(final ComponentTag tag) { tag.put("disabled", "disabled"); }
/** * Called by {@link #onComponentTag(ComponentTag)} when the component is disabled. By default, * this method will add a disabled="disabled" attribute to the tag. Components may override this * method to tweak the tag as they think is fit. * * @param tag * the tag that is being rendered */ protected void onDisabled(final ComponentTag tag) { tag.put("disabled", "disabled"); }
@Override protected void onComponentTag(ComponentTag tag) { // WICKET-5644 prevent non-Ajax submit (similar to AjaxButton WICKET-5594) tag.put("type", "button"); } });
/** * Builds the src attribute * * @param tag * the component tag * @param srcModel * the model containing the src URL */ protected void buildSrcAttribute(final ComponentTag tag, IModel<?> srcModel) { tag.put("src", String.valueOf(srcModel.getObject())); }
/** * Builds the src attribute * * @param tag * the component tag * @param srcModel * the model containing the src URL */ protected void buildSrcAttribute(final ComponentTag tag, IModel<?> srcModel) { tag.put("src", String.valueOf(srcModel.getObject())); }
/** {@inheritDoc} */ @Override public void onComponentTag(Component component, ComponentTag tag) { tag.put("title", PagingNavigator.this.getString(resourceKey)); } }
@Override public void onComponentTag(final Component component, final ComponentTag tag) { // Make the XSLT processor happy and allow it to handle the wicket tags // and attributes that are in the wicket namespace tag.put("xmlns:wicket", MarkupResourceStream.WICKET_XHTML_DTD); super.onComponentTag(component, tag); }
@Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); // disable browser's autocomplete tag.put("autocomplete", "off"); }
/** * Adds random noise to the url every request to prevent the browser from caching the image. * * @param tag */ protected void addAntiCacheParameter(final ComponentTag tag) { String url = tag.getAttributes().getString("src"); url = url + (url.contains("?") ? "&" : "?"); url = url + "antiCache=" + System.currentTimeMillis(); tag.put("src", url); }
/** {@inheritDoc} **/ @Override public void onComponentTag(Component component, ComponentTag tag) { // get path final String path = contextRelativePath.getObject(); final String rewritten = UrlUtils.rewriteToContextRelative(path, RequestCycle.get()); tag.put("src", rewritten); }
@Override public void onComponentTag(final Component component, final ComponentTag tag) { tag.put("onfocus", getFocusTrackingHandler(component)); super.onComponentTag(component, tag); } });
@Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); tag.put("class", getTabContainerCssClass()); } };
@Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", (getIndex() % 2 == 0) ? getString(EVEN_CSS_CLASS_KEY) : getString(ODD_CSS_CLASS_KEY)); }
@Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", (getIndex() % 2 == 0) ? getString(EVEN_CSS_CLASS_KEY) : getString(ODD_CSS_CLASS_KEY)); }
@Override protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, "source"); super.onComponentTag(tag); if (getMedia() != null) { tag.put("media", getMedia()); } }
@Override protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, "source"); super.onComponentTag(tag); if (getMedia() != null) { tag.put("media", getMedia()); } }