@Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); }
@Override // ensure that this component is embedded in a <span> ... </span> protected void onComponentTag(ComponentTag pTag) { super.onComponentTag(pTag); pTag.setName("span"); // Remove non-conformant <span> attributes IValueMap attribMap = pTag.getAttributes(); Iterator<Map.Entry<String, Object>> attrIterator = attribMap.entrySet().iterator(); while (attrIterator.hasNext()) { Map.Entry<String, Object> entry = attrIterator.next(); String key = entry.getKey().toLowerCase(); if (!ALLOWED_SPAN_ATTRIBUTES.contains(key)) { attrIterator.remove(); } } }
/** * @see org.apache.wicket.markup.html.form.FormComponentPanel#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); // remove the name attribute added by the FormComponent if (tag.getAttributes().containsKey(NAME_ATTR)) { tag.getAttributes().remove(NAME_ATTR); } }
/** * @see org.apache.wicket.markup.html.form.FormComponentPanel#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); // remove the name attribute added by the FormComponent if (tag.getAttributes().containsKey(NAME_ATTR)) { tag.getAttributes().remove(NAME_ATTR); } }
/** * @see org.apache.wicket.markup.html.form.FormComponentPanel#onComponentTag(org.apache.wicket.markup.ComponentTag) */ protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); // remove the name attribute added by the FormComponent if (tag.getAttributes().containsKey(NAME_ATTR)) { tag.getAttributes().remove(NAME_ATTR); } }
/** * @see org.apache.wicket.markup.html.form.FormComponentPanel#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); // remove the name attribute added by the FormComponent if (tag.getAttributes().containsKey(NAME_ATTR)) { tag.getAttributes().remove(NAME_ATTR); } }
@Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); // rename input tag to span tag tag.setName("span"); tag.remove("type"); tag.remove("value"); tag.remove("name"); }