I have a few components and pages that I extend, and I put them in a
directory called "base", at the same level as the pages and components
packages.

For instance I have an AbstractReportPage that references Tapestry
ASOs, Injects things and Persists things.  Then I have a few report
page classes that implement different flavors of very similar things.

It could be done differently for sure--This is just one way that works for me.

I also use the base directory for concrete Tapestry related classes
that don't belong in pages, components, services or mixins.  One
example is a class than has the injected paths to all my css files and
some images that are used across several border classes.
Then I can do

public class Border extends AssetContainer{
}



On Jan 8, 2008 5:03 PM, Shing Hing Man <[EMAIL PROTECTED]> wrote:
> Have you tried the following ?
>
> Suppose org.man.tapestry5.components will hold the new
> components.
>
> 1) add the following to AppModule
>
>
>     public static void
> contributeComponentClassResolver(Configuration<LibraryMapping>
> configuration)
>     {
>         // Creates a virtual root pacakge for
> pages,components.
>         configuration.add(new LibraryMapping("man",
> "org.man.tapestry5"));
>     }
>
> 2) Suppose in  org.man.tapestry5.components, we have
> component PageLinkPopup.java.
>
> Usage :
>
> <a href="#" t:type="man/pagelinkPopup" t:page="home"
>    windowName="literal:my windown" features="literal:
> 'resizable,scrollbars,top=100,left=200,height=300,width=500'"
> >Home</a>
>
> or
>
>
> <t:man.pagelinkPopup page="test/sum"
>    windowName="literal:sum" features="literal:
> 'resizable,scrollbars,top=100,left=200,height=300,width=500'"
> >Sum</t:man.pagelinkPopup>
>
> Shing
>
>
>
> --- Steph <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> >
> > I need to import in my tap5 project a library which
> > includes tap5 pages
> > and components.
> > But when i try to extend a page from the library in
> > my project, i get
> > the following exception :
> >
> > java.lang.RuntimeException: Base class
> > com.mylibrary.pages.FramePage
> > (super class of com.myproject.pages.Start) is not in
> > a controlled
> > package and is therefore not valid. You should try
> > moving the class to
> > package com.myproject.base.
> >
> > Should i declare the 'pages' and 'components'
> > directories of my library
> > in the tapestry.app-package context of my web.xml ?
> > If yes, what is the
> > syntax to do such a declaration ?
> >
> > Thanks in advance.
> >
> > Stephane
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> Home page : http://www.lombok.demon.co.uk/
>
>
>
>       ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
> now.
> http://uk.answers.yahoo.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to