/** * @see org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean) */ @Override public void setVersionPagesByDefault(final boolean pagesVersionedByDefault) { application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault); } }
/** * @see org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault() */ @Override public boolean getVersionPagesByDefault() { return application.getPageSettings().getVersionPagesByDefault(); }
/** * Construct. * * @param application * The application for this store * * @param pageStore * Page store for keeping page versions */ public SecondLevelCacheSessionStore(Application application, final IPageStore pageStore) { super(application); this.pageStore = pageStore; // turn automatic multi window support off by default, as we don't // really // need to be afraid to run out of history with this implementation. // note that the session store is created before Application#init is // called, so if users set this setting explicitly, it'll be overridden // (and that's exactly what we want: provide a better default, but not // forcing people to do away with this feature). Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); }
@Override public boolean canCallListenerAfterExpiry() { return getApplication().getPageSettings() .getCallListenerAfterExpiry() || isStateless(); } /**
@Override public boolean canCallListenerAfterExpiry() { return getApplication().getPageSettings() .getCallListenerAfterExpiry() || isStateless(); } /**
/** * Construct. * * @param application * The application for this store * * @param pageStore * Page store for keeping page versions */ public SecondLevelCacheSessionStore(Application application, final IPageStore pageStore) { super(application); this.pageStore = pageStore; // turn automatic multi window support off by default, as we don't // really // need to be afraid to run out of history with this implementation. // note that the session store is created before Application#init is // called, so if users set this setting explicitly, it'll be overridden // (and that's exactly what we want: provide a better default, but not // forcing people to do away with this feature). Application.get().getPageSettings().setAutomaticMultiWindowSupport(false); }
/** * Common code executed by constructors. */ private void commonInit() { // if automatic multi window support is on, add a page checker instance if (getApplication().getPageSettings().getAutomaticMultiWindowSupport()) { add(new PageMapChecker(this)); } }
/** * Common code executed by constructors. */ private void commonInit() { // if automatic multi window support is on, add a page checker instance if (getApplication().getPageSettings().getAutomaticMultiWindowSupport()) { add(new PageMapChecker(this)); } }
/** * Attempts to resolve a component via application registered resolvers. * * @param container * @param markupStream * @param tag * @param filter * @return Null, if no component was found */ public static Component resolveByApplication(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag, final ResolverFilter filter) { for (final IComponentResolver resolver : Application.get() .getPageSettings() .getComponentResolvers()) { if ((filter == null) || (filter.ignoreResolver(resolver) == false)) { Component component = resolver.resolve(container, markupStream, tag); if (component != null) { return component; } } } return null; }
/** * Attempts to resolve a component via application registered resolvers. * * @param container * @param markupStream * @param tag * @param filter * @return Null, if no component was found */ public static Component resolveByApplication(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag, final ResolverFilter filter) { for (final IComponentResolver resolver : Application.get() .getPageSettings() .getComponentResolvers()) { if ((filter == null) || (filter.ignoreResolver(resolver) == false)) { Component component = resolver.resolve(container, markupStream, tag); if (component != null) { return component; } } } return null; }
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }
/** * Initializes Page by adding it to the Session and initializing it. */ @Override void init() { if (isBookmarkable() == false) { setStatelessHint(false); } // Set versioning of page based on default setVersioned(getApplication().getPageSettings().getVersionPagesByDefault()); // All Pages are born dirty so they get clustered right away dirty(true); // this is a bit of a dirty hack, but calling dirty(true) results in isStateless called // which is bound to set the stateless cache to true as there are no components yet stateless = null; }
/** * Initializes Page by adding it to the Session and initializing it. */ @Override void init() { if (isBookmarkable() == false) { setStatelessHint(false); } // Set versioning of page based on default setVersioned(getApplication().getPageSettings().getVersionPagesByDefault()); // All Pages are born dirty so they get clustered right away dirty(true); // this is a bit of a dirty hack, but calling dirty(true) results in isStateless called // which is bound to set the stateless cache to true as there are no components yet stateless = null; }
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }
/** * Initializes Page by adding it to the Session and initializing it. * * @param pageMap * The page map to put this page in. */ private final void init(final IPageMap pageMap) { if (isBookmarkable()) setStatelessHint(true); // Set the page map if (pageMap != null) { setPageMap(pageMap); } else { throw new IllegalStateException("PageMap cannot be null"); } setNextAvailableId(); // Set versioning of page based on default setVersioned(Application.get().getPageSettings().getVersionPagesByDefault()); // All Pages are born dirty so they get clustered right away dirty(); }
application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); add(new Label("pageMapEvictionStrategy", "" + application.getSessionSettings().getPageMapEvictionStrategy()));
/** * Initializes Page by adding it to the Session and initializing it. * * @param pageMap * The page map to put this page in. */ private final void init(final IPageMap pageMap) { if (isBookmarkable()) { setStatelessHint(true); } // Set the page map if (pageMap != null) { setPageMap(pageMap); } else { throw new IllegalStateException("PageMap cannot be null"); } setNextAvailableId(); // Set versioning of page based on default setVersioned(Application.get().getPageSettings().getVersionPagesByDefault()); // All Pages are born dirty so they get clustered right away dirty(); }
PageSettings pageSettings = getPageSettings();
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT OVERRIDE OR CALL. * * Internal initialization. */ protected void internalInit() { settingsAccessible = true; IPageSettings pageSettings = getPageSettings(); // Install default component resolvers pageSettings.addComponentResolver(new ParentResolver()); pageSettings.addComponentResolver(new AutoComponentResolver()); pageSettings.addComponentResolver(new MarkupInheritanceResolver()); pageSettings.addComponentResolver(new HtmlHeaderResolver()); pageSettings.addComponentResolver(new WicketLinkResolver()); pageSettings.addComponentResolver(new WicketMessageResolver()); pageSettings.addComponentResolver(new WicketMessageTagHandler()); pageSettings.addComponentResolver(new FragmentResolver()); pageSettings.addComponentResolver(new RelativePathPrefixHandler()); pageSettings.addComponentResolver(new EnclosureResolver()); pageSettings.addComponentResolver(new WicketContainerResolver()); pageSettings.addComponentResolver(new BorderBodyResolver()); // Install button image resource factory getResourceSettings().addResourceFactory("buttonFactory", new DefaultButtonImageResourceFactory()); String applicationKey = getApplicationKey(); applicationKeyToApplication.put(applicationKey, this); sessionStore = newSessionStore(); converterLocator = newConverterLocator(); }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT OVERRIDE OR CALL. * * Internal initialization. */ protected void internalInit() { settingsAccessible = true; IPageSettings pageSettings = getPageSettings(); // Install default component resolvers pageSettings.addComponentResolver(new ParentResolver()); pageSettings.addComponentResolver(new AutoComponentResolver()); pageSettings.addComponentResolver(new MarkupInheritanceResolver()); pageSettings.addComponentResolver(new HtmlHeaderResolver()); pageSettings.addComponentResolver(new WicketLinkResolver()); pageSettings.addComponentResolver(new WicketMessageResolver()); pageSettings.addComponentResolver(new WicketMessageTagHandler()); pageSettings.addComponentResolver(new FragmentResolver()); pageSettings.addComponentResolver(new RelativePathPrefixHandler()); pageSettings.addComponentResolver(new EnclosureResolver()); pageSettings.addComponentResolver(new WicketContainerResolver()); pageSettings.addComponentResolver(new BorderBodyResolver()); // Install button image resource factory getResourceSettings().addResourceFactory("buttonFactory", new DefaultButtonImageResourceFactory()); String applicationKey = getApplicationKey(); applicationKeyToApplication.put(applicationKey, this); sessionStore = newSessionStore(); converterLocator = newConverterLocator(); }