/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking() */ @Override public boolean getAutomaticLinking() { return application.getMarkupSettings().getAutomaticLinking(); }
/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments() */ @Override public boolean getStripComments() { return application.getMarkupSettings().getStripComments(); }
/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean) */ @Override public void setAutomaticLinking(final boolean automaticLinking) { application.getMarkupSettings().setAutomaticLinking(automaticLinking); }
/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean) */ @Override public void setCompressWhitespace(final boolean compressWhitespace) { application.getMarkupSettings().setCompressWhitespace(compressWhitespace); }
/** * @throws UnsupportedEncodingException * @see org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String) */ @Override public void setDefaultMarkupEncoding(final String encoding) throws UnsupportedEncodingException { // test encoding is available "".getBytes(encoding); application.getMarkupSettings().setDefaultMarkupEncoding(encoding); }
/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding() */ @Override public String getDefaultMarkupEncoding() { return application.getMarkupSettings().getDefaultMarkupEncoding(); }
/** * @see org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean) */ @Override public void setStripWicketTags(final boolean stripWicketTags) { application.getMarkupSettings().setStripWicketTags(stripWicketTags); } }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT. * * @return The markup cache associated with the application * @deprecated please use {@link IMarkupSettings#getMarkupCache()} instead */ @Deprecated public final IMarkupCache getMarkupCache() { return getMarkupSettings().getMarkupCache(); }
/** * configure wicket markup settings * * @param application current application */ private static void configureMarkupSettings(Application application) { MarkupSettings markupSettings = application.getMarkupSettings(); // wicket markup leads to ui problems because css selectors doesn't match. markupSettings.setStripWicketTags(true); }
/** * @return Gets the markup factory registered with the Wicket application */ public static MarkupFactory get() { return Application.get().getMarkupSettings().getMarkupFactory(); }
@Override protected void onBeforeRender() { super.onBeforeRender(); // Set default for before/after link text if (beforeDisabledLink == null) { final Application app = getApplication(); beforeDisabledLink = app.getMarkupSettings().getDefaultBeforeDisabledLink(); afterDisabledLink = app.getMarkupSettings().getDefaultAfterDisabledLink(); } }
/** * Says if the given tag can be handled as a raw markup. * * @param tag * the current tag. * @return true if the tag can be handled as raw markup, false otherwise. */ private boolean canRenderRawTag(MarkupElement tag) { boolean isWicketTag = tag instanceof WicketTag; boolean stripTag = isWicketTag ? Application.get().getMarkupSettings().getStripWicketTags() : false; return !stripTag; }
/** * @return Gets the markup factory registered with the Wicket application */ public static MarkupFactory get() { return Application.get().getMarkupSettings().getMarkupFactory(); }
@Override public void onConfigure(Component component) { super.onConfigure(component); if (!Application.get().getMarkupSettings().getStripWicketTags()) { LOG.warn("Application > MarkupSettings > StripWicketTags: setting is currently set to false. It is highly recommended to set it to true to prevent widget misbehaviors."); } }
public WicketLinkTagHandler(MarkupResourceStream resourceStream) { super(resourceStream); setAutomaticLinking(Application.get().getMarkupSettings().getAutomaticLinking()); }
/** * A convenient helper to get the markup cache registered with the application. * * @see {@link Application#getMarkupSettings()} * @see {@link MarkupFactory#getMarkupCache()} * * @return The markup cache registered with the {@link Application} */ public static IMarkupCache get() { return Application.get().getMarkupSettings().getMarkupFactory().getMarkupCache(); }
public WicketLinkTagHandler(MarkupResourceStream resourceStream) { super(resourceStream); setAutomaticLinking(Application.get().getMarkupSettings().getAutomaticLinking()); }
/** * A convenient helper to get the markup cache registered with the application. * * @see {@link Application#getMarkupSettings()} * @see {@link MarkupFactory#getMarkupCache()} * * @return The markup cache registered with the {@link Application} */ public static IMarkupCache get() { return Application.get().getMarkupSettings().getMarkupFactory().getMarkupCache(); }
/** * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache() */ @Override public void clearMarkupCache() throws IOException { application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); }
@Override public void init(Application application) { application.getMarkupSettings().setStripWicketTags(true); JQueryUILibrarySettings.get().setStyleSheetReference(new CssResourceReference(Initializer.class, "jquery-ui.css")); }