You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kk4Nabble <ka...@gmail.com> on 2009/06/16 08:55:30 UTC

Re: how to specify to say more than one java file to share same html

Hi all,
My problem is I have CalendarHome.java which extends Calendar.java.
But i want both the files to share Calendar.html
How do i do it?

basically when it sees CalendarHome.java it ll search for CalendarHome.html,
i wan it look for Calendar.html instead of CalendarHome.html.
Please suggest.

Thanks


kk4Nabble wrote:
> 
> Hi all.
> 
> I have 2 java pages and i want it to refer same html for both java files.
> How do I do it in .application file.
> 
>  <page name="Calendar" specification-path="Calendar.page"/>
>    <page name="CalendarHome" specification-path="Calendar.page"/>
> 
> The above does not work.
> By the way am using tapestry 4.1
> Please help.
> 
> Thanks in advance
> 

-- 
View this message in context: http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24048762.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: how to specify to say more than one java file to share same html

Posted by Andreas Andreou <an...@di.uoa.gr>.
Totally forgot that - but I do remember someone wanting to remove this
... hack :)
Good to see it's still useful !

On Tue, Jun 16, 2009 at 3:27 PM, kk4Nabble<ka...@gmail.com> wrote:
>
>
> Hi,
>
> Thank  you all for the reply.
> I specified
> <page name="CalendarHome" specification-path="Calendar.page"/>
> in .application file.
> And in Calendar.page
> <page-specification class="com.mypackage.page.Calendar">
>        <asset name="$template" path="Calendar.html"/>
>  </page-specification>
>
> And it works fine.
>
>
> Andreas Andreou-4 wrote:
>>
>> I dont remember this being possible...
>>
>> So, i guess the alternatives are to either:
>> - copy Calendar.html to CalendarHome.html, or
>> - have your build process do that for you
>>
>> On Tue, Jun 16, 2009 at 9:55 AM, kk4Nabble<ka...@gmail.com> wrote:
>>>
>>> Hi all,
>>> My problem is I have CalendarHome.java which extends Calendar.java.
>>> But i want both the files to share Calendar.html
>>> How do i do it?
>>>
>>> basically when it sees CalendarHome.java it ll search for
>>> CalendarHome.html,
>>> i wan it look for Calendar.html instead of CalendarHome.html.
>>> Please suggest.
>>>
>>> Thanks
>>>
>>>
>>> kk4Nabble wrote:
>>>>
>>>> Hi all.
>>>>
>>>> I have 2 java pages and i want it to refer same html for both java
>>>> files.
>>>> How do I do it in .application file.
>>>>
>>>>  <page name="Calendar" specification-path="Calendar.page"/>
>>>>    <page name="CalendarHome" specification-path="Calendar.page"/>
>>>>
>>>> The above does not work.
>>>> By the way am using tapestry 4.1
>>>> Please help.
>>>>
>>>> Thanks in advance
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24048762.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>> Tapestry / Tacos developer
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24053281.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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


Re: how to specify to say more than one java file to share same html

Posted by kk4Nabble <ka...@gmail.com>.

Hi,

Thank  you all for the reply.
I specified
<page name="CalendarHome" specification-path="Calendar.page"/>  
in .application file.
And in Calendar.page
<page-specification class="com.mypackage.page.Calendar">
	<asset name="$template" path="Calendar.html"/>
 </page-specification>

And it works fine.


Andreas Andreou-4 wrote:
> 
> I dont remember this being possible...
> 
> So, i guess the alternatives are to either:
> - copy Calendar.html to CalendarHome.html, or
> - have your build process do that for you
> 
> On Tue, Jun 16, 2009 at 9:55 AM, kk4Nabble<ka...@gmail.com> wrote:
>>
>> Hi all,
>> My problem is I have CalendarHome.java which extends Calendar.java.
>> But i want both the files to share Calendar.html
>> How do i do it?
>>
>> basically when it sees CalendarHome.java it ll search for
>> CalendarHome.html,
>> i wan it look for Calendar.html instead of CalendarHome.html.
>> Please suggest.
>>
>> Thanks
>>
>>
>> kk4Nabble wrote:
>>>
>>> Hi all.
>>>
>>> I have 2 java pages and i want it to refer same html for both java
>>> files.
>>> How do I do it in .application file.
>>>
>>>  <page name="Calendar" specification-path="Calendar.page"/>
>>>    <page name="CalendarHome" specification-path="Calendar.page"/>
>>>
>>> The above does not work.
>>> By the way am using tapestry 4.1
>>> Please help.
>>>
>>> Thanks in advance
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24048762.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24053281.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: how to specify to say more than one java file to share same html

Posted by Andreas Andreou <an...@di.uoa.gr>.
I dont remember this being possible...

So, i guess the alternatives are to either:
- copy Calendar.html to CalendarHome.html, or
- have your build process do that for you

On Tue, Jun 16, 2009 at 9:55 AM, kk4Nabble<ka...@gmail.com> wrote:
>
> Hi all,
> My problem is I have CalendarHome.java which extends Calendar.java.
> But i want both the files to share Calendar.html
> How do i do it?
>
> basically when it sees CalendarHome.java it ll search for CalendarHome.html,
> i wan it look for Calendar.html instead of CalendarHome.html.
> Please suggest.
>
> Thanks
>
>
> kk4Nabble wrote:
>>
>> Hi all.
>>
>> I have 2 java pages and i want it to refer same html for both java files.
>> How do I do it in .application file.
>>
>>  <page name="Calendar" specification-path="Calendar.page"/>
>>    <page name="CalendarHome" specification-path="Calendar.page"/>
>>
>> The above does not work.
>> By the way am using tapestry 4.1
>> Please help.
>>
>> Thanks in advance
>>
>
> --
> View this message in context: http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24048762.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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


Re: how to specify to say more than one java file to share same html

Posted by Onno Scheffers <on...@piraya.nl>.
It's been a while since I last used Tapestry 4, but maybe you can create a
custom TemplateLocator that loads the proper template for you?

regards,

Onno


On Tue, Jun 16, 2009 at 8:55 AM, kk4Nabble <ka...@gmail.com> wrote:

>
> Hi all,
> My problem is I have CalendarHome.java which extends Calendar.java.
> But i want both the files to share Calendar.html
> How do i do it?
>
> basically when it sees CalendarHome.java it ll search for
> CalendarHome.html,
> i wan it look for Calendar.html instead of CalendarHome.html.
> Please suggest.
>
> Thanks
>
>
> kk4Nabble wrote:
> >
> > Hi all.
> >
> > I have 2 java pages and i want it to refer same html for both java files.
> > How do I do it in .application file.
> >
> >  <page name="Calendar" specification-path="Calendar.page"/>
> >    <page name="CalendarHome" specification-path="Calendar.page"/>
> >
> > The above does not work.
> > By the way am using tapestry 4.1
> > Please help.
> >
> > Thanks in advance
> >
>
> --
> View this message in context:
> http://www.nabble.com/how-to-specify-2-java-file-to-same-html-tp24035378p24048762.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>