Hmmm... But Howard did I hear you right the other day that the
        resources/myapp/pages/start.html 
concept has been relaxed somewhat? I was thinking you showed the concept
of having the html pages right inside the webapps/WEB-INF directory
without the matching directory/package pathing ... did I hear that
right?

Hmmm2 ... ok so how in the world would that work?  It would I guess
require unique page names throughout the application?

OK, I'm now doubting my sanity!  (probably my best decision so far)


-----Original Message-----
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 06, 2007 3:02 PM
To: Tapestry users
Subject: Re: (T 5.0.5 snapshot) "No root element has been defined"

Yes .. the idea is to strip out redundant junk in the URL (i.e., the
class name recapitulating the package name).  The bug is that it goes
too far!

On 6/6/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
> Here is an enumeration of what I believe to be true.  First are the
> class and its matching template.  Next are a couple of the possible
> url mappings.
>
> java/myapp/pages/start.java
> resources/myapp/pages/start.html
> ->  /
> ->  /start
> ->  /START
>
> java/myapp/pages/red/shoes.java
> resources/myapp/pages/red/shoes.html
> ->  /red/shoes
> ->  /rEd/shOES
>
> java/myapp/pages/red/redshoes.java
> resources/myapp/pages/red/redshoes.html
> ->  /red/shoes
> ->  /red/shoeS
>
> java/myapp/pages/red/shoesred.java
> resources/myapp/pages/red/shoesred.html
> ->  /red/shoes
> ->  /reD/sHoes
>
>
>
>
>
>
> On 6/6/07, Steven Coco <[EMAIL PROTECTED]> wrote:
> > On Wed June 6 2007 11:56:28 am Howard Lewis Ship wrote:
> > > Please add an issue to JIRA.  I think what's happening is that
> > > pagetwo/PageTwo.class is being aliased to the logical name
"pagetwo/"
> > > which is useless ... the code that does the mapping needs to be
> > > careful not to alias down to nothing!
> >
> > I wonder if I am reading the intended behavior correctly: [barring
the bug,]
> > naming pages in this manner is actually the intended usage?
> >
> > That is to say, I'm supposed to use the concept that a
subdirectory's default
> > page in that directory is again named just like the directory; and
then my
> > links refer simply to t:page="pagetwo/" so I get pretty URLs.
Essentially,
> > naming the default page for a directory the same as the directory
gives the
> > effect of the welcome page for that directory. Do I actually have
all that
> > right?
> >
> > That's at least what I read from the canonical link behavior in the
> > documentation. pagetwo/PageTwoHelp would canonicalize to
pagetwo/Help, etc.
> > And it seems the default page should be named to match the
directory.
> >
> > Thanks for the help.
> >
> > >
> > > On 6/6/07, Hugo Palma <[EMAIL PROTECTED]> wrote:
> > > > I think i might have found an "interesting" behavior in
component
> > > > resolution. It seems that if you have a directory with the same
name as
> > > > the page itself, Tapestry won't find that page.
> > > > So, it won't find pagetwo/PageTwo but it will find
somepages/PageTwo.
> > > >
> > > > At least this is the behavior i'm getting. I'll report an issue
for this.
> > > > In the mean time, i think renaming the folder or the page will
solve
> > > > your problem.
> > > >
> > > > Steven Coco wrote:
> > > > > Hi.
> > > > >
> > > > > [I got my project building fine again with T 5.0.5]. And I'm
still a
> > > > > complete newbie!
> > > > >
> > > > > I'm having a blocker of a problem. I have the simplest webapp
I can
> > > > > think of, and I am getting an IllegalStateException: "No root
element
> > > > > has been defined."
> > > > >
> > > > > I've found a thread in the archives about this, and a
reference to a
> > > > > bug ID, but I still can't get it to run! Perhaps it's because
my second
> > > > > page lives in a subpackage? I've tried moving the templates
everywhere
> > > > > I can think of too.
> > > > >
> > > > > The project was created via the Maven quickstart, and the only
change I
> > > > > made to the POM is to use version 5.0.5-SNAPSHOT. I removed
the content
> > > > > and made my own. I have only this structure:
> > > > >
> > > > > src/main/webapp/WEB-INF
> > > > >     Start.html
> > > > >     web.xml
> > > > >     /pagetwo
> > > > >         PageTwo.html
> > > > > src/main/java/org/example/myapp/pages
> > > > >     Start.java
> > > > >     /pagetwo
> > > > >         PageTwo.java
> > > > >
> > > > > Both java class bodies are empty, and both html templates are
nothing
> > > > > more than empty html head/title/body tags with the tap
namespace
> > > > > declared. I can visit the start page without error, but if I
try to
> > > > > visit "pagetwo/" I get this exception. Where am I supposed to
put files
> > > > > and templates?
> > > > >
> > > > > I'm missing something simple, but I've been all around the
> > > > > documentation and bunches of tutorials, and I thought I was on
the
> > > > > right track.
> > > > >
> > > > > Any help? The simple webapp is attached. Sorry for the
extremely
> > > > > fundamental difficulty!
> > > > >
> > > > > Thanks in advance for any help.
> > > > >
> > > > > -Steven Coco.
> > > > >
> > > > >
-----------------------------------------------------------------------
> > > > >-
> > > > >
> > > > >
---------------------------------------------------------------------
> > > > > 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]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 

Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.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