from the api, it looks like what we'd do is override getVariation() from Component
and then based on a param, or whatever we choose, we'd return a "_variation" string. On Sep 19, 2005, at 2:15 PM, Johan Compagner wrote: If it is really pure static parts that are changing: (that is odd in one sentence "static part and changing") BasePage. BasePage.html BasePage_variation2.html BasePage_variation3.html code: new BasePage(); == mapped to BasePage.html new BasePage().setVariation("variation2"); == mapped to BasePage_variation2.html If it isn't static then you need to define youre dynamic part somewhere you still only have to have 1 basepage. But the other dynamic parts have to be designed in a panel or sub page.
On 9/19/05, Alexandru Popescu <[EMAIL PROTECTED]> wrote: #: Eelco Hillenius changed the world a bit at a time by saying on 9/19/2005 7:10 PM :# > It is possible to plug in your own resource loading, e.g. by > overriding Application.getResourceStreamLocator(). So it is possible, > though probably not as easy as you want. When there is enough demand > (and I guess there is), we could take a look at how this could be > simplified. What would this look like in your opinions? Something like > an overridable method on Page? >
Hi Eelco!
I am not so familiar with Wicket to suggest internals, so I will just say that something simple like protected String getMarkupPageName() {} defaulting to class name would be enough for the beginning.
what do you developers think?
./alex -- .the_mindstorm.
> Btw, Juergen/ Jonathan in case you are reading with us, shouldn't > MarkupCache be an implementation detail of ResourceStreamLocator? > Looking at the code, I'm afraid the fact that the cache isn't, might > be a problem for people wanting to provide their custom versions of > ResourceStreamLocator. > > Eelco > > > On 9/19/05, Alexandru Popescu <[EMAIL PROTECTED]> wrote: >> #: Eelco Hillenius changed the world a bit at a time by saying on 9/19/2005 6:15 PM :# >> > On 9/19/05, Andrew Lombardi <[EMAIL PROTECTED]> wrote: >> >> So with multiple page definitions, I'd have a BasePage that all >> >> static pages extend from (which is what I'm doing now) ... >> >> >> >> so >> >> BasePage.class >> >> BasePage.html >> >> >> >> and then... >> >> AboutPage1.class >> >> AboutPage1.html >> >> >> >> AboutPage2.class >> >> AboutPage2.html >> >> >> >> etc, etc? I know there is no code duplication, but somehow having a >> >> class per html file seemed a bit, well, extra. >> > >> > But so is configuring the options in XML, isn't it? >> > >> > >> >> I was wondering if this is a 'heavy' condition: to always have the java class and html file named >> the same. Isn't possible for example in a class to give an alias of the html file to be used? This >> way it would be possible to associate the same class with different html files. >> >> ./alex >> -- >> .the_mindstorm. >> >> >> >> >> the replacing panels portion, I'm not quite understanding, don't you >> >> still need a separate class file per-panel? >> >> >> > >> > Yeah, you're right. What you could do is define everything you might >> > need in the same page and turn on/ off what you need by using the >> > visible property. Your page could end up looking rather ugly though, >> > so personally, I would prefer the normal definition-per-page way. >> > >> > Maybe you could provide some more in-detail info about what you want >> > to do/ what your app looks like? Like give us your web MVC >> > implementation. >> > >> > >> > Eelco >> > >> > >> >> Thanks! >> >> >> >> >> >> On Sep 19, 2005, at 8:16 AM, Eelco Hillenius wrote: >> >> >> >> > If you don't want to have multiple page definitions (though is that >> >> > really a problem, as using inheritance would factor out any >> >> > duplication?) you can have one page and apply the dynamic parts >> >> > well... dynamicly. E.g. by replacing panels. >> >> > >> >> > Eelco >> >> > >> >> > >> >> > On 9/19/05, Andrew Lombardi < [EMAIL PROTECTED]> wrote: >> >> > >> >> >> It seems that all pages in Wicket must have a different class backing >> >> >> it, is this correct? What happens if you just have 4 - 5 html pages >> >> >> that are static, and won't change, other than the navigation and >> >> >> surrounding which is dynamic (handled by <wicket:extend /> or the >> >> >> border classes). >> >> >> >> >> >> In WebWork 2 .. I would just define in the XML several aliases which >> >> >> all pointed to the same class returning SUCCESS, and put different >> >> >> url dispatchers to account for different pages. >> >> >> >> >> >> Is this possible in Wicket? >> >> >> >> >> >> >> >> >> ------------------------------------------------------- >> >> >> SF.Net email is sponsored by: >> >> >> Tame your development challenges with Apache's Geronimo App >> >> >> Server. Download >> >> >> it for free - -and be entered to win a 42" plasma tv or your very own >> >> >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> >> >> _______________________________________________ >> >> >> Wicket-user mailing list >> >> >> Wicket-user@lists.sourceforge.net >> >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> >> >> >> >> >> >> > >> >> > >> >> > ------------------------------------------------------- >> >> > SF.Net email is sponsored by: >> >> > Tame your development challenges with Apache's Geronimo App Server. >> >> > Download >> >> > it for free - -and be entered to win a 42" plasma tv or your very own >> >> > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> >> > _______________________________________________ >> >> > Wicket-user mailing list >> >> > Wicket-user@lists.sourceforge.net >> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> > >> >> >> >> >> >> >> >> ------------------------------------------------------- >> >> SF.Net email is sponsored by: >> >> Tame your development challenges with Apache's Geronimo App Server. Download >> >> it for free - -and be entered to win a 42" plasma tv or your very own >> >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> >> _______________________________________________ >> >> Wicket-user mailing list >> >> Wicket-user@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> >> > >> > >> > ------------------------------------------------------- >> > SF.Net email is sponsored by: >> > Tame your development challenges with Apache's Geronimo App Server. Download >> > it for free - -and be entered to win a 42" plasma tv or your very own >> > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> > _______________________________________________ >> > Wicket-user mailing list >> > Wicket-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. Download >> it for free - -and be entered to win a 42" plasma tv or your very own >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user >
------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
|