Thanks.  I see, so if I were to return a random value with getVariation,
that would effectively defeat reusing the complied version.

Could you give me more details on markupresourcestreamprovider I couldn't
find anything like that in the api, what should I extend / implement and how
do I use it?

j

On 10/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> On 10/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> >
> > newMarkupResourceStream is only called on the first time the page loads
> > when
> > it's compiled with the HTML i suppose.  Is there any way to prevent that
> > for
> > one class / page?
>
>
> not as far as i know, this is why we added IMarkupCacheKeyProvider
>
> what you can do is use your own markupresourcestreamprovider, but use it
> in
> conjunection with getvariation(). so when you pull out that database id
> return it from getvariation() and that way you will get one call to your
> markupresourcestreamprovider for every database id instead of just a
> single
> one.
>
> -igor
>
>
> J
> >
> > On 10/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > >
> > > see IMarkupResourceStreamProvider and IMarkupCacheKeyProvider. make
> that
> > > page implement both and suck the markup in from the db.
> > >
> > > -igor
> > >
> > >
> > > On 10/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Will that work if the content includes a form?
> > > >
> > > > I would like to be able to have a page which includes a form but
> have
> > a
> > > > couple of different versions of the HTML and be able to select the
> one
> > I
> > > > want based on the param...
> > > >
> > > > In otherwords the HTML will contain form elements with wicket:id
> > > > attributes
> > > > which I want to be associated with elements I've added in the form
> > > class.
> > > > The reason is I want to have radically different layouts for a
> > page/form
> > > > which I don't want to have to update any java code to enable, only
> add
> > > the
> > > > new HTML file and update my database.
> > > >
> > > > Swapping in different style sheets which would seem to make the most
> > > sense
> > > > isn't going to work in this case..
> > > >
> > > > j
> > > >
> > > > On 10/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > stick a content into a label and call label.setescapemodelstrings
> > > (false)
> > > > >
> > > > > -igor
> > > > >
> > > > >
> > > > > On 10/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > I'm attempting to load the markup for a page based on values
> that
> > > are
> > > > > > available when the page is constructed.  For example, I want to
> be
> > > > able
> > > > > to
> > > > > > pass a parameter into a page and then lookup the name of the
> > content
> > > > > file
> > > > > > in
> > > > > > my database based on this parameter and then have the page load
> > and
> > > > > > display
> > > > > > the appropriate content.
> > > > > >
> > > > > > I've tried looking at the custom resource loading example in the
> > > > > examples
> > > > > > package but that seems to work by loading content based on the
> > class
> > > > > name
> > > > > > and I didn't see a way to extend it.
> > > > > >
> > > > > > I've tried overwriting the newMarkupResourceStream method, but
> it
> > > > seems
> > > > > to
> > > > > > be called before the constructor is called as well as before the
> > > > session
> > > > > > is
> > > > > > available.
> > > > > >
> > > > > > Any suggestions?
> > > > > >
> > > > > > j
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to