On the use of proper indentation
Norrman Per <[email protected]> Sun, 19 Jan 2003 01:52:22 +0100
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <[email protected]> |
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