i dont know how well this is supported, you can probably hack it.

afaik this is how it works now:
the component asks the markup cache for the markup, the markup cache looks for the IResourceStream, if its not found an IResourceStreamLocator is used. If it is found the cache first calls IResourceStream.getlatsmodified() and only reloads the markup if that is later then the time the stream was loaded.

so i guess to achieve what you want you can create an IResourceStreamLocator that returns an IResourceStream that can load the markup from the database. the getlastmodified() will have to return new Date()  or something similar to trick the cache into always reloading the stream.

this is all speculation and i dont really know if it will work. and even if it does i dont know how performant this would be since the stream would have be parsed every time its loaded.

maybe someone else can answer better.

-Igor



On 1/9/06, pepone pepone <[EMAIL PROTECTED]> wrote:
I need my component can choose a diferent template at run time
depending of a RequestParameter

is posible to handle this in wicket-1.2?



then


On 1/9/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> you would need to implement IResourceStreamLocator that can pull the markup
> from the database and set it with
> getResourceSettings().setResourceStreamLocator(...)
>
> you might want to write your locator as a wrapper that can delegate to the
> default locator in case it cannot locate markup. that way all other lookups
> will work as usual.
>
> getResourceSettings().setResourceStreamLocator(new
> MyLocator(getResourceSettings().getResourceStreamLocator());
>
> -Igor
>
>
>
> On 1/9/06, pepone pepone <[EMAIL PROTECTED]> wrote:
> >
> > I want  Store Wicket (1.2)  Markup templates in my application database
> >
> > can you give any advice for do it?
> >
> > thanks in advantage
> > --
> > play tetris http://pepone.on-rez.com/tetris
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>


--
play tetris http://pepone.on-rez.com/tetris


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to