[jifty-devel] re: Re: using TabView

Steve H s_t_e_v_e_h at hotmail.com
Tue Nov 6 22:11:45 EST 2007

> Subject: Re: [jifty-devel] using TabView
>> I was wondering if there are any examples using TabView. Googling only seems to refer to the code base... and back to the doco, which doesn't provide a great deal to say where/when/what should be coded for it... i.e. per:
>> use Jifty::Plugin::TabView::View;
>> template 'index.html' => page {
>> my $self = shift;
>> $self->render_tabs('foo', [qw(id)], qw( foo bar_tab ) );
>> };
>> template 'foo' => sub { ... };
>> template 'bar' => sub { ... };
>> ...similarly, there was nothing in the List archives.
>> I use the 'out of the box' Mason, with a bunch of files under .../templates (and fragments). Are there any caveats on TabView use, e.g. the number of page regions in a tab/view... or other design considerations for using it?

> This is meant to be used by TD views, as it's calling the methods for
> $self as tabs. even so, one caveat is your view class must implement
> the fragment_for method that returns the full path for the guven
> argument, which should be handled by some menchaisn in TD view mounting.

Hi CLK.  Thanks for the reply.  I'm still not sure though what/where to code to use TabView.  I understood that Mason and TD could be intermixed -- if so, how might I do it in order to use TabView?
Presently I use fragments to do a similar thing.  I have a page region that gets replaced when a given Tab-selecting link is clicked.  It works sufficiently, although I'd need to work on some CSS to make it look more like tabs.  I have to get better at using the out-of-the-box solutions rather than coding from ground up... the benefit of using Jifty in the first place.
If I mention the background for this particular tab-set,
hopefully you/someone might be able to advise the best way to proceed.
- 1st tab will be to input some search criteria; when submitted, it will cause the results to appear in a different page region/fragment.
- 2nd tab will display a scrollable div/table showing a 'hot list' of criteria to select items that will be displayed in the other page region as per 1st tab.
- 3rd tab will include a JavaScript-driven expandable Menu (for example like the directory pane of the Windows file explorer that is familiar to many people);  When selecting a node on that menu, associated items will similarly display like the other tabs.  I was looking at using something like treeview from http://www.treemenu.net/ for it.
The tabs function as a means of grouping together the means of searching/ navigating the items to display in the other fragment.
What I was hoping for was the optimal mix of visually/aesthetically pleasing and straight-forward and clean to code... hence the thought of using the TabView component.  Given what I was proposing to do above, you may even have some other/better suggestion of tools to use.
Any feedback welcome... whether/how to use TabView for this... or whether my current means is more suited... whether the treemenu library I referred to above (or similar such libs) are compatible with Jifty in this manner (or whether there's something in the YUI/scriptaculous/etc libs that are already known to interface to Jifty that may be better for this)...


New music from the Rogue Traders - listen now!

More information about the jifty-devel mailing list