List of usage examples for org.apache.wicket.markup ComponentTag setAutoComponentTag
public void setAutoComponentTag(boolean auto)
From source file:net.jawr.web.wicket.JawrWicketLinkTagHandler.java
License:Apache License
@Override protected MarkupElement onComponentTag(ComponentTag tag) throws ParseException { if (tag == null) { return tag; }// w ww. java 2s .c om // Only xml tags not already identified as Wicket components will be // considered for autolinking. This is because it is assumed that Wicket // components like images or all other kind of Wicket Links will handle // it themselves. // Subclass analyzeAutolinkCondition() to implement you own // implementation and register the new tag handler with the markup // parser through Application.newMarkupParser(). if (analyzeAutolinkCondition(tag) == true) { // Just a dummy name. The ComponentTag will not be forwarded. tag.setId(AUTOLINK_ID); tag.setAutoComponentTag(true); tag.setModified(true); return tag; } return tag; }
From source file:org.apache.openmeetings.web.app.MessageTagHandler.java
License:Apache License
@Override protected final MarkupElement onComponentTag(ComponentTag tag) throws ParseException { if (tag.isClose()) { return tag; }/* ww w . jav a 2 s . co m*/ final String wicketMessageAttribute = tag.getAttributes().getString(getWicketMessageAttrName()); if (Strings.isEmpty(wicketMessageAttribute) == false) { // check if this tag is raw markup if (tag.getId() == null) { // if this is a raw tag we need to set the id to something so // that wicket will not merge this as raw markup and instead // pass it on to a resolver tag.setId(getWicketMessageIdPrefix()); tag.setAutoComponentTag(true); tag.setModified(true); } tag.addBehavior(new AttributeLocalizer(getWicketMessageAttrName())); } return tag; }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter startAutoComp(final String tag, final String id) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN); ctag.setAutoComponentTag(true); return start(ctag, id, id, new ComponentTag(tag, TagType.CLOSE)); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create open-close auto ComponentTag that has an id attribute but no wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter emptyAutoComp(final String tag, final String id) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN_CLOSE); ctag.setAutoComponentTag(true); return start(ctag, id, id, null); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter startAutoComp(final String tag, final String id, final String... attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN); ctag.setAutoComponentTag(true); return start(ctag, id, null, new ComponentTag(tag, TagType.CLOSE), attrs); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create open-close auto ComponentTag that has an id attribute but no wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter emptyAutoComp(final String tag, final String id, final String... attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN_CLOSE); ctag.setAutoComponentTag(true); return start(ctag, id, null, null, attrs); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create an auto ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter startAutoComp(final String tag, final String id, final IAttribute... attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN); ctag.setAutoComponentTag(true); return start(ctag, id, null, new ComponentTag(tag, TagType.CLOSE), IterableWrapper.wrap(attrs)); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create an auto open-close ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter emptyAutoComp(final String tag, final String id, final IAttribute... attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN_CLOSE); ctag.setAutoComponentTag(true); return start(ctag, id, null, null, IterableWrapper.wrap(attrs)); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create an auto ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter startAutoComp(final String tag, final String id, final Iterable<IAttribute> attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN); ctag.setAutoComponentTag(true); return start(ctag, id, null, new ComponentTag(tag, TagType.CLOSE), attrs); }
From source file:sf.wicklet.wicketext.markup.impl.WicketWriter.java
License:Apache License
/** Create an auto open-close ComponentTag without wicket:id attribute, eg. head, link, ...etc. */ public WicketWriter emptyAutoComp(final String tag, final String id, final Iterable<IAttribute> attrs) { final ComponentTag ctag = new ComponentTag(tag, TagType.OPEN_CLOSE); ctag.setAutoComponentTag(true); return start(ctag, id, null, null, attrs); }