You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jean-Philippe Steinmetz <st...@ISI.EDU> on 2007/09/28 20:54:02 UTC

Default package file

So part of my app has a series of packages for pages to make URLs (and life)
easier. My question is how do I create an index-like class for these
packages? I have tried creating a new Start.java in each of them and that
seems to have not made a difference. Thanks.

 

Jean-Philippe Steinmetz


Re: Default package file

Posted by Chris Lewis <ch...@bellsouth.net>.
I agree with Jean-Philippe that a standard default page should be 
supported. The package name may work, but I suspect that's actually a 
bug rather than a feature. Even if it is a feature it is, in my opinion, 
cumbersome. A standard default page name would be immediately 
recognizable by a developer, so the less confusion the better. I like 
the idea of using Start since that is tapestry's default page.

Jean-Philippe, unless Howard chimes in with a different suggestion, I'd 
suggest looking at TapestryModule.java - specifically the contributions 
to the MasterDispatcher service (I think the method name is 
contributeMasterDispatcher, but I don't have it in front of me). The 
logic to locate a default page name should be obvious once you look at 
that method, as it shows the other request processors and how they 
handle the resolution of a page/component. Assuming you contribute a new 
Dispatcher implementation, adding it just after the PageRender should do 
the trick...

sincerely,
chris

Ted Steen wrote:
> If you give your page the same name as your package pages/product/Product.java
> then you will be able to access it with "http://host/product/".
> You cant access it with "http://host/product" tho, and in my opinion
> you should be able to do that
> See my JIRA
> http://issues.apache.org/jira/browse/TAPESTRY-1541
>
> 2007/9/28, Jean-Philippe Steinmetz <st...@isi.edu>:
>   
>> Would be glad to provide both... where in the source code should I start
>> looking to add?
>>
>>     
>>> -----Original Message-----
>>> From: Howard Lewis Ship [mailto:hlship@gmail.com]
>>> Sent: Friday, September 28, 2007 12:11 PM
>>> To: Tapestry users
>>> Subject: Re: Default package file
>>>
>>> That's not a feature currently supported. If interested, add a JIRA issue
>>> (and a patch would be nice).
>>>
>>> On 9/28/07, Jean-Philippe Steinmetz <st...@isi.edu> wrote:
>>>       
>>>> So part of my app has a series of packages for pages to make URLs (and
>>>> life)
>>>> easier. My question is how do I create an index-like class for these
>>>> packages? I have tried creating a new Start.java in each of them and
>>>>         
>>> that
>>>       
>>>> seems to have not made a difference. Thanks.
>>>>
>>>>
>>>>
>>>> Jean-Philippe Steinmetz
>>>>
>>>>
>>>>         
>>> --
>>> Howard M. Lewis Ship
>>> Partner and Senior Architect at Feature50
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>   


Re: Default package file

Posted by Ted Steen <te...@gmail.com>.
If you give your page the same name as your package pages/product/Product.java
then you will be able to access it with "http://host/product/".
You cant access it with "http://host/product" tho, and in my opinion
you should be able to do that
See my JIRA
http://issues.apache.org/jira/browse/TAPESTRY-1541

2007/9/28, Jean-Philippe Steinmetz <st...@isi.edu>:
> Would be glad to provide both... where in the source code should I start
> looking to add?
>
> > -----Original Message-----
> > From: Howard Lewis Ship [mailto:hlship@gmail.com]
> > Sent: Friday, September 28, 2007 12:11 PM
> > To: Tapestry users
> > Subject: Re: Default package file
> >
> > That's not a feature currently supported. If interested, add a JIRA issue
> > (and a patch would be nice).
> >
> > On 9/28/07, Jean-Philippe Steinmetz <st...@isi.edu> wrote:
> > >
> > > So part of my app has a series of packages for pages to make URLs (and
> > > life)
> > > easier. My question is how do I create an index-like class for these
> > > packages? I have tried creating a new Start.java in each of them and
> > that
> > > seems to have not made a difference. Thanks.
> > >
> > >
> > >
> > > Jean-Philippe Steinmetz
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > Partner and Senior Architect at Feature50
> >
> > Creator Apache Tapestry and Apache HiveMind
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: Default package file

Posted by Jean-Philippe Steinmetz <st...@ISI.EDU>.
Would be glad to provide both... where in the source code should I start
looking to add?

> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Friday, September 28, 2007 12:11 PM
> To: Tapestry users
> Subject: Re: Default package file
> 
> That's not a feature currently supported. If interested, add a JIRA issue
> (and a patch would be nice).
> 
> On 9/28/07, Jean-Philippe Steinmetz <st...@isi.edu> wrote:
> >
> > So part of my app has a series of packages for pages to make URLs (and
> > life)
> > easier. My question is how do I create an index-like class for these
> > packages? I have tried creating a new Start.java in each of them and
> that
> > seems to have not made a difference. Thanks.
> >
> >
> >
> > Jean-Philippe Steinmetz
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
> 
> Creator Apache Tapestry and Apache HiveMind


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Default package file

Posted by Howard Lewis Ship <hl...@gmail.com>.
That's not a feature currently supported. If interested, add a JIRA issue
(and a patch would be nice).

On 9/28/07, Jean-Philippe Steinmetz <st...@isi.edu> wrote:
>
> So part of my app has a series of packages for pages to make URLs (and
> life)
> easier. My question is how do I create an index-like class for these
> packages? I have tried creating a new Start.java in each of them and that
> seems to have not made a difference. Thanks.
>
>
>
> Jean-Philippe Steinmetz
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind