Hi,

although the example worked out with the suggestions Thiago and Taha made...

I kept wondering around on this:

consider I include or use a certain component on my Index.tml

<html t:type="layout" title="pruebaComponent Index" t:sidebarTitle="Current
> Time" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> xmlns:p="tapestry:parameter">
>
>     <p>${message:greeting}</p>
>
>     <t:comp1 t:id="comp1"/>
> ...
>

As it's not mandatory to have a @Component variable in Index.java I started
to think that including comp1 just as a tag in the tml may result in a more
difficult way of finding which pages
depend/include comp1.

Is there any recommendation you would give a tapestry newbie on how to
depend or include his own components into pages?


well, I hope I wasn't messy on my question
:)

cheers and thanks.


On Thu, Jul 7, 2011 at 12:55 PM, Nicolas Barrera <nbarr...@gmail.com> wrote:

> Thanks both, you just hit the note...,
>
> though I was pretty sure I had put it on the right place,... well... I
> didn't.
>
> Sorry for the buzz
>
> Nicolás.-
>
>
>
> On Thu, Jul 7, 2011 at 12:29 PM, Taha Hafeez <tawus.tapes...@gmail.com>wrote:
>
>> Hi
>>
>> Where have you placed the component template, it should go in
>> src/main/resources/testComponent/components in case your application
>> package
>> is testComponent.
>>
>> regards
>> Taha
>>
>> On Thu, Jul 7, 2011 at 8:24 PM, Nicolas Barrera <nbarr...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I just wanted to run this test..., I got a tapestry archetype and added
>> > this
>> > code in the components package:
>> >
>> > Comp1.java:
>> >
>> > package testComponent.components;
>> > >
>> > > public class Comp1 {
>> > >
>> > > }
>> > >
>> > >
>> > Comp1.tml
>> >
>> > <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>> > >     xmlns:p="tapestry:parameter">
>> > >
>> > >     <p>I 'm going crazy</p>
>> > >
>> > > </div>
>> > >
>> > >
>> >
>> > after that, I modified Index.tml this way:
>> >
>> >
>> > > <html t:type="layout" title="pruebaComponent Index"
>> > t:sidebarTitle="Current
>> > > Time" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>> > > xmlns:p="tapestry:parameter">
>> > >
>> > >         <p>${message:greeting}</p>
>> > >         <t:comp1 t:id="comp1"/>
>> > > ...
>> > >
>> >
>> >
>> > The result when I refresh the Index page is that I can't see the phrase
>> "I
>> > 'm going crazy"...
>> >
>> > Am I misunderstanding something about compoments?
>> >
>> > How should I include a component in my page?
>> >
>> > cheers, and thanks in advance
>> >
>> > Nicolás.-
>> >
>>
>
>

Reply via email to