Re: [T5] How create sub component

2007-07-04 Thread Hugo Palma

Regarding helping the web designers get around the templates, i have found
in the past that providing a master HTML file with server side includes to
include the component templates that you want them to edit worked fine. It
was actually a web designer that suggested this, I think they used
Dreamweaver to edit the templates which works fine with SSI.
This way they only see it as one template when in fact they are editing all
the component templates.

On 7/4/07, David Avenante [EMAIL PROTECTED] wrote:


Yes I can understand but this approach is a big constraint, with big
implication for my web designer who need to play in templates and need
to have a good understanding of my templates hierarchy

For me it's an issue with lot of limitation. A simple exemple :

I want to create a component who can generate a complex layout for my
page.
I want something like :

div t:type=myLayout
  div t:type=contentPanel name=north
  content a
  div

div t:type=contentPanel name=south
  content b
  div

/div

So as you can see I can have many contentPanel (like east west center...)
And each contentPanel can content a new layout.

It's crazy for me to let play a web designer in a hierarchy of template.
I need to have a flat view a this type of complex component.

So I don't see the origins of this technical limitation.

Cheers,
David

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




Re: [T5] How create sub component

2007-07-04 Thread David Avenante

Yes there is always  workaround but what I liked in the definition of
tapestry is :

Tapestry is organized around four key principles:

   * Simplicity
   * Consistency
   * Efficiency
   * Feedback

And I like the first term ;) I like to have SIMPLE  file, easy
readable and understandable.

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



Re: [T5] How create sub component

2007-07-04 Thread Hugo Palma

Well, i think the only way you could achieve that would be to use the Block
component.
You could create a master page where your component blocks are declared.
That would be the only page your web designer would edit. In the other pages
where you use the components you would would the RenderBlock component and
reference the blocks on the master page.
I think this might work.

On 7/4/07, David Avenante [EMAIL PROTECTED] wrote:


Yes there is always  workaround but what I liked in the definition of
tapestry is :

Tapestry is organized around four key principles:

* Simplicity
* Consistency
* Efficiency
* Feedback

And I like the first term ;) I like to have SIMPLE  file, easy
readable and understandable.

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




Re: [T5] How create sub component

2007-07-04 Thread David Avenante

Thank you  Hugo, I'll explore this way.

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



Re: [T5] How create sub component

2007-07-03 Thread Nick Westgate

All components declared in a template or class for a component/page are
embedded components. They all share the same parent component/page
which is returned by getContainer() as you've seen.

This is completely separate from the DOM hierarchy that T5 builds as it
renders. In that case you can navigate elements (but not components) e.g:

void beginRender(MarkupWriter writer)
{
Element element = writer.getElement();
Element parent = element.getParent();
...
}

At least, that is my undestanding so far.

Cheers,
Nick.


David Avenante wrote:

Hi,

I try to create sub compponent in T5 (5.0.5).

My template is :

div t:type=myComponent1
   div t:type=myCompopnent2
   h1Content/h1
   /div
/div

In myComponent2 class when i try to access to the Container :

@Inject
private ComponentResources componentResources;

componentResources.getContainer(), tapestry return to me my page and
not my component.

If I place :
div t:type=myCompopnent2
   h1Content/h1
/div

in myCompnent1 template it's works 

Why and what is the difference ?

Thank for any input.

-
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]