You don't have to worry about the path.

You should name your file like YourWebPage_variation.html and place the file
where you would place it in normal case.

For example If the variants of the page are

YourWebPage_1.html, YourWebPage_2.html, YourWebPage_n.html
,.....,YourWebPage_n.html

 String getVariation()
 {
    // add the logic as it fits your need, hope you get the idea
     if(conditon1)
              return "1";
     else if(conditon2)
              return "2";
     else if(conditon3)
              return "3";
      .................
      ................
      else
              return "";
}

regards
dipu



For example, if you have a Page called YourWebPage, and if you want to have
man
On Dec 14, 2007 10:22 AM, qinyi lai <[EMAIL PROTECTED]> wrote:

> Thanks, I will try it!
> But any example for this!
>
> I find in the wicket.Component.java
>
> public String getVariation() {
>
>    return null;//how to override it, return the HTML file path+filename?
>
> }
>
>
> and any one have wicket offline API, documents!
>
>
>
>
>
> > From: [EMAIL PROTECTED]
> > To: users@wicket.apache.org
> > Subject: Re: How to dynamic load a HTML file
> >
> > override getVariation() in your page to get the appropriate html/markup
> > picked.
> >
> > regards
> > -dipu
> >
> >
> > On Dec 14, 2007 9:43 AM, qinyi lai <[EMAIL PROTECTED]> wrote:
> >
> > > Hi
> > >   I wanne to dynamic load a HTML file to mapping a JAVA class page!
> > > a JAVA class file will have many HTML files(1:n mapping), and in the
> > > running time,
> > > the JAVA class file will select a  HTML file to display a different
> Page
> > > layout to User!
> > > How to carry it out?
> > >
> > > I found a article about this,
> > >
> > >
> http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
> > > but it just define the new IResourceStreamLocator class:
> > > Than, override Application.init() method to add the new
> > > IResourceStreamLocator
> > > It only load the file int init of Application! and It 1:1 (java
> class:html
> > > file) mapping in the program!
> > >
> > > Thanks for U suggestion!
> > > Best Regards,
> > > Mead
> > > [EMAIL PROTECTED]
> > > [EMAIL PROTECTED]
> > >
> > > _________________________________________________________________
> > > Express yourself instantly with MSN Messenger! Download today it's
> FREE!
> > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>

Reply via email to