[fusion-users] How to add Tab Pages.... Help please!
Paul Spencer
pspencer at dmsolutions.ca
Thu Aug 21 08:51:50 EDT 2008
Hi Khalid,
the tabs are not specifically part of Fusion, but rather a component
of the Jx library that we are basing fusion on.
A tab in Jx is essentially a button that is linked to a content area
that is to be displayed when the tab is selected.
There are two ways to work with tabs - the first is using a tab box
and the second is not using a tab box.
Using tab box:
var tabBox = new Jx.TabBox('<contentId>', '<position>');
where <contentId> is the id of a <div> that you want the tab box to be
inside and <position> is one of 'top', 'right', 'bottom', and 'left'
which dictates where the tab bar will go (typically you want top).
Then creating tabs is simple:
var t1 = new Jx.Tab('<label>', {contentID: '<contentId>'});
var t2 = new Jx.Tab('<label>', {contentID: '<contentId>'});
// ...
tabBox.add(t1, t2 /*, ... */);
where <label> is the text on the tab and <contentId> is the id of a
<div> that will be displayed when that tab is active.
The non-tabbox case is more flexible because the tabs don't have to be
directly attached to the content area, but a bit more work to set up
(not a lot though)
var toolbar = new Jx.Toolbar('<contentId'>); // the id of the <div> to
put the toolbar in
var tabset = new Jx.TabSet('<contentId>'); // the id of the <div> to
put the tab content into
var t1 = new Jx.Tab('<label>', {contentID: '<contentId>'});
var t2 = new Jx.Tab('<label>', {contentID: '<contentId>'});
toolbar.add(t1, t2);
tabset.add(t1, t2);
Now to use this with Fusion, you set up your tabs then in the
ApplicationDefinition you can use the same <contentId> as you used for
a tab with a widget to have that widget appear inside the tab.
Cheers
Paul
On 20-Aug-08, at 6:32 PM, Khalid wrote:
> Hi,
>
> I am new to Fusion. I am using Fusion with Mapserver. I am trying to
> use Tab Pages fucntionality instead of Panels and found that we can
> use Jx.Tab to show layers and selection on Tab pages but I could not
> find any example. I am not sure if this feature has been implemented
> in Fusion for Mapserver. If somebody can give me an example about it
> that would be great.
>
> Thanks for your help.
>
> Regards,
>
> Khalid
>
>
>
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
__________________________________________
Paul Spencer
Chief Technology Officer
DM Solutions Group Inc
http://www.dmsolutions.ca/
More information about the fusion-users
mailing list