And there is an example of it in Wicket-examples called 'custom
template loading'. But yes, it is recommended to use the defaults
instead; that auto discovery pattern is there to save you precious
development time, make things easier to look up (at least for
developers) and to make packaging components in different jars without
needing extra configuration/ deployment simple.

Eelco


On 1/22/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> yes, all newbies start to do this and eventually go back, but oh well
>
> if you still want to shoot yourself in the foot what you do is this:
>
> implement IResourceStreamLocator and make it take a delegate
>
> then in your app's init do this
>
> application.init() {
> MyResourceStreamLocator locator=new
> MyResourceStreamLocator(getResourceSettings().getResourceStreamLocator());
> getResourceSettings().setResourceStreamLocator(locator);
> }
>
> -igor
>
>
>
> On 1/22/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > We advise you to not do this until you are absolutely sure you need
> > it, especially as a newbie to the framework. "Obvious" reasons are not
> > so obvious in a Wicket context.
> >
> > - packaging your components in a jar
> > - having to mimick the package/directory structure
> > - looking up your HTML (which is tightly coupled to your Java file)
> > in a separate directory
> > - other resources such as properties files, where should they go?
> >
> > Martijn
> >
> > On 1/22/07, nilo.de.roock <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I am very newbie on Wicket. I am reading the Pro Wicket book. I want the
> > > .java and .html page files in two different directories for obvious
> reasons.
> > > I read the following in the book:
> > >
> > > "The HTML template needs to be in the same package as the corresponding
> Page
> > > class.
> > > An internal Wicket component that is entrusted with the job of locating
> the
> > > HTML markup
> > > corresponding to a Page looks for the markup in the same place as the
> Page
> > > class. Wicket
> > > allows you to easily customize this default behavior though. ... "
> > >
> > > I get completely lost here:
> > >
> > > "... All user pages typically extend
> > > Wicket's WebPage-a subclass of Wicket's Page class. There needs to be a
> > > one-to-one correspondence
> > > between the HTML elements with a wicket:id attribute and the Page
> > > components. The
> > > HTML template could in fact be termed as a view with the actual
> component
> > > hierarchy being
> > > described in the Page class. Wicket components need to be supplied with
> an
> > > id parameter and
> > > an IModel implementation during construction (some exceptions will be
> > > discussed in the section
> > > "How to Specify a CompoundPropertyModel for a Page." The component's id
> > > value must
> > > match the wicket:id attribute value of the template's corresponding HTML
> > > element. Essentially,
> > > if the template contains an HTML text element with a wicket:id value of
> > > name, then the
> > > corresponding wicket's TextField instance with an id of name needs to be
> > > added to the Page
> > > class. Wicket supplies components that correspond to basic HTML elements
> > > concerned with
> > > user interaction. Examples of such elements are HTML input fields of
> type
> > > text, HTML select,
> > > HTML link, etc. The corresponding Wicket components would be TextField,
> > > DropDownChoice,
> > > and Link, respectively. ..."
> > >
> > > What I would like to know is in a For Dummies sort of explanation what I
> > > have to do to be able to seperate .html and .java.
> > >
> > > Thanks in advance.
> > >
> > > kind regards,
> > > nilo de roock
> > >
> > > --
> > > View this message in context:
> http://www.nabble.com/Best-practice-for-seperating-.java-and-.html---tf3060190.html#a8509215
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > --
> > Vote for Wicket at the
> http://www.thebeststuffintheworld.com/vote_for/wicket
> > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> > http://wicketframework.org
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to