You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by miguel <mi...@thedeanda.com> on 2013/09/27 08:33:50 UTC

custom markup from db

i'm trying to be a proof-of-concept where I use wicket to use "styles" that
are loaded from the database. I've managed to get my custom markup to load
but it seems that its only loaded once then cached (even in dev mode). This
is what I've tried:

		IResourceSettings settings = getResourceSettings();
		settings.setResourcePollFrequency(Duration.seconds(10));
		settings.getResourceFinders().add(0, new SkinResourceFinder());

I searched for references to IResourceSettings.getResourcePollingFrequency()
and found this:


org.apache.wicket.devutils.inspector - src/main/java - wicket-devutils
ApplicationView
ApplicationView(String, Application)

org.apache.wicket.jmx - src/main/java - wicket-jmx
ResourceSettings
getResourcePollFrequency()

org.apache.wicket.settings.def - src/main/java - wicket-core
ResourceSettings
getResourcePollFrequency()
getResourceWatcher(boolean)

My guess is that getResourceWatcher(boolean) is where the polling value gets
used but I assume that since polling works in dev mode for normal resource
finder then there is something else going on. My implementation of
IResourceFinder basically returns:

return new StringResourceStream(sw.toString(), "text/html");

any ideas?

-m



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-markup-from-db-tp4661542.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: custom markup from db

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I think there shouldn't be caching involved here.
Put a breakpoint
at org.apache.wicket.core.util.resource.locator.caching.CachingResourceStreamLocator#locate
methods and see what happens.


On Fri, Sep 27, 2013 at 8:33 AM, miguel <mi...@thedeanda.com> wrote:

> i'm trying to be a proof-of-concept where I use wicket to use "styles" that
> are loaded from the database. I've managed to get my custom markup to load
> but it seems that its only loaded once then cached (even in dev mode). This
> is what I've tried:
>
>                 IResourceSettings settings = getResourceSettings();
>                 settings.setResourcePollFrequency(Duration.seconds(10));
>                 settings.getResourceFinders().add(0, new
> SkinResourceFinder());
>
> I searched for references to
> IResourceSettings.getResourcePollingFrequency()
> and found this:
>
>
> org.apache.wicket.devutils.inspector - src/main/java - wicket-devutils
> ApplicationView
> ApplicationView(String, Application)
>
> org.apache.wicket.jmx - src/main/java - wicket-jmx
> ResourceSettings
> getResourcePollFrequency()
>
> org.apache.wicket.settings.def - src/main/java - wicket-core
> ResourceSettings
> getResourcePollFrequency()
> getResourceWatcher(boolean)
>
> My guess is that getResourceWatcher(boolean) is where the polling value
> gets
> used but I assume that since polling works in dev mode for normal resource
> finder then there is something else going on. My implementation of
> IResourceFinder basically returns:
>
> return new StringResourceStream(sw.toString(), "text/html");
>
> any ideas?
>
> -m
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/custom-markup-from-db-tp4661542.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>