You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/01/19 02:18:59 UTC

Re: [Tapestry-developer] On the use of proper indentation

Fun little story; I wonder if there's something we can do in the Inspector
to assist with seeing this?  Perhaps we could do some kind of mouse-over
shading for tags that would indicate their extent within the template?

----- Original Message -----
From: "Norrman Per" <pe...@canovia.se>
To: <ta...@lists.sourceforge.net>
Sent: Saturday, January 18, 2003 7:52 PM
Subject: [Tapestry-developer] On the use of proper indentation


A true tale from the trenches:

So I´m trying to learn tapestry.  I look at my application,
I see something I call a Track, something that´s like a lead,
a follow-up, a continuing series of  activities. I think: maybe i could
focus all Track related stuff in a Track page and use a
Block component for each view, track list, track detail, etc.

So I look to the Inspector for some examples and guidelines. I see this:

<span jwcid="specificationBlock">
<span jwcid="showSpecification"/>
</span>

<span jwcid="templateBlock">
<span jwcid="showTemplate"/>
</span>

<span jwcid="propertiesBlock">
<span jwcid="showProperties"/>
</span>

<span jwcid="engineBlock">
<span jwcid="showEngine"/>
</span>

Good! I copy the concept and do this:

<span jwcid="renderBlockForView"/>

<span jwcid="trackListBlock"/>
<span jwcid="showTrackList"/>

<span jwcid="trackDetailBlock"/>
<span jwcid="showTrackDetail"/>

You probably do see it immediately. I didn't. I spent a first ten
confusing minutes wondering why the hell the detail
view rendered, although I obvioulsy told it not to. Then I spent
another hour to re-design my showTrackDetail class to accommodate for
null pointers and such. Still didn't work. Then another hour studying
Tapestry source in order to understand the call sequence. Then I saw it!

<span jwcid="renderBlockForView"/>

<span jwcid="trackListBlock">
<span jwcid="showTrackList"/>
</span>

<span jwcid="trackDetailBlock">
<span jwcid="showTrackDetail"/>
</span>


Anyways, during the journey I probably learned more Tapestry stuff
than I deserve. Was it on purpose?

/Per Norrman

###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your
clients even if they use browsers that are limited to 40 bit encryption.
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
_______________________________________________
Tapestry-developer mailing list
Tapestry-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tapestry-developer