Hello David and others,
I was searching through Tapestry archives for tab panel components and
found your posting. The thing that got my immediate attention was that
you used CSS (sliding doors) for tab display purposes. This CSS is, as I
saw a week ago pointed out by my co-worker, very clean and the HTML to
display it is the shortest I have ever seen.
I tried to download your example, but the link does not exist any more.
Is by your (or anyone's on this list) knowledge this CSS integrated in
any public Tapestry tab component? That would be awesome.
Regards,
Borut
David Wellington wrote:
I have been working with Tapestry for a few weeks and did not
find an example of a stateful tab panel implementation, so I rolled my own
'limping' implementation. Here are some characteristics:
Pros:
(1) uses CSS for tab generation thru text (courtesy of Douglas Bowman,
http://www.alistapart.com/articles/slidingdoors/)
(2) uses a tabpanel component to do some of the (slightly) tricky work (but
the rest is done in an enclosing page - so this is mainly a 'con')
(3) Preserves state across tab clicks (and hence for the form submit)
Cons:
(1) All panes are contained in the enclosing page - this can make
for a large html page, as some pointed out
(2) Not fully componentized (see #2 above)
(3) can be improved upon greatly, and hopefully will be (maybe this
is a 'pro')
My roadblocks may be old hat to the experienced Tapestry users out there,
but the following were the cause of of quite a few hours of head-banging:
(1) in order to get state preserved across the tabs (i.e. a form rewind on a
tab change),
I ended up using LinkSubmit and FormConditional - the Block/RenderBlock
example
in the docs does not seem to lend itself to stateful tabs - OTOH, if
someone can do it that way, it would be cleaner.
(2) I needed a separate listener for the LinkSubmit in order to inform the
form
submit listener that this particular rewind was the result of a tab click
(3) I finally figured out that the way to get the current tab to display
correctly
was to use @Any - I, too, will probably learn to love @Any
There is a zip file with a build tree you can use to deploy the example,
along with an example.png image which you can look at to see if such
deployment is useful. These may be found at
http://www.crosswind.com/tapestry.html.
Extract the zip image, edit build.properties, and do an 'ant deploy'.
Then, point your browser to http://hostname:8080/tabpanel/start (or whatever
...)
If anyone cares to suggest improvements, I look forward to getting them.
David Wellington
-----Original Message-----
From: Andreas Pardeike [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 10:19 AM
To: Tapestry users
Subject: Re: Tab-based menu component question.
Hi,
on a similar topic one of my questions is if it's easy to make each
page know it's own menu item and have the menu ask all pages for their
items, collect them and display them (including hilighting the current
item). What would be the basics for that?
Andreas Pardeike
---------------------------------------------------------------------
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]