Hi Robert,

Thanks for that, it's encouraging to hear you don't miss $content$.  I have
no desire to patch the document parser so I'll give the reloading
capabilities a go and see where I end up.

Cheers
Andrew

On Tue, Jun 3, 2008 at 1:31 AM, Robert Zeigler <[EMAIL PROTECTED]> wrote:

> I switched from T3 (which also had $content$) to T5, and here is what I've
> found:
> I don't miss $content$. :)
> $content$ was a constant source of headaches.  The part of the point of
> components (like layouts) is to be able to make a change in one place, and
> have it propagate throughout the system.  With T3 and $content$, to get my
> "WYSIWYG" preview, I found myself duplicating all of the information, or at
> least static versions of it, throughout components and pages.  I think T5
> nicely solved that issue with component class and template reloading.
>  What's better than a WYSIWYG component (which, in reality, becomes near
> impossible for very complex components)? A live application using your
> component, where you can /still/ change the markup, etc. AND catch stupid
> typos (eg: in property expressions), all as fast as you could WYSIWYG
> preview the thing before.
>
> To duplicate the $content$ functionality properly would probably require
> patching the document parser (not really a task for the faint of heart :).
>  But there may be a way to provide a working, albeit less-than-ideal
> solution without patching.  I have some ideas, but I'll have to look into
> the feasibility of any of them before I'll suggest them, lest I sent you
> barking up the wrong tree.
>
> Robert
>
>
> On Jun 2, 2008, at 6/23:03 AM , Andrew Pietsch wrote:
>
>  Hi Robert,
>>
>> Is there a long answer?  It would be nice if there were at least a
>> solution
>> or pattern I could use to migrate my current 4.x code to 5 without having
>> to
>> loose their functionality as standalone pages.
>>
>> Thanks for your help.
>>
>> Cheers
>> Andrew
>>
>> On Mon, Jun 2, 2008 at 11:39 AM, Robert Zeigler <[EMAIL PROTECTED]>
>> wrote:
>>
>>  t:container doesn't exclude it's children.  Tapestry templates have to be
>>> valid xml documents.  That means there has to be a single root element.
>>> It's
>>> often inconvenient to have to have such a single root element in
>>> components.
>>> Imagine, for example, a component that renders a subset of cells of a
>>> table
>>> row; you don't want to surround that with, eg, a div, because the div
>>> will
>>> be output, as well, and that would result in invalid (x)html (or, at the
>>> very least, semantically incorrect (x)html), along the lines of:
>>> <tr><div><td></td>...</div></tr> (div's aren't supposed to go around
>>> td's).
>>>
>>> <t:container> was created to circumvent the problem, by providing a
>>> "root"
>>> element which won't be rendered (so you would do:
>>> <t:container><td>...</td>...</t:container> in the above example).   As a
>>> side effect, some users have reported that content outside of the
>>> <t:container> element isn't rendered.  I haven't duplicated that
>>> behavior.
>>> And it's quite contrary to what <t:container> is supposed to do, since
>>> it's
>>> supposed to be a root element.
>>>
>>> Short answer is that there is currently /no/ equivalent in T5 of
>>> $content$
>>>
>>> Robert
>>>
>>>
>>> On Jun 1, 2008, at 6/17:50 PM , Andrew Pietsch wrote:
>>>
>>> Hi Robert,
>>>
>>>>
>>>> Thanks for that.  As I see it <t:container> seems to be the inverse of
>>>> what
>>>> I want.  It excludes it's children from the output, whereas $content$
>>>> excludes everything but its children from the output.
>>>>
>>>> Does anyone know if the equivalent functionality is planned?
>>>>
>>>> Cheers
>>>> Andrew
>>>>
>>>>
>>>> On Mon, Jun 2, 2008 at 9:51 AM, Robert Zeigler <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>> $content$ is NOT the same as <t:body />
>>>>
>>>>>
>>>>> <t:body> is the equivalent to the T3 "RenderBody" component.
>>>>>
>>>>> The closest thing to $content$ is <t:container>, but even that isn't
>>>>> quite
>>>>> the same thing as $content$.
>>>>>
>>>>> Robert
>>>>>
>>>>>
>>>>> On Jun 1, 2008, at 6/16:07 PM , Marcus wrote:
>>>>>
>>>>> Hi Andrew,
>>>>>
>>>>>
>>>>>> $content$  = <t:body />  (
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/templates.html
>>>>>> )
>>>>>>
>>>>>> for $remove$ you can use t5components/remove or search on list for
>>>>>> "public
>>>>>> class Remove"
>>>>>>
>>>>>>
>>>>>> Marcus
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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]
>
>

Reply via email to