jMaki 0.9.7: Using the Yahoo Tabbed View in a NetBeans Visual Web Application

Yesterday, in our blog entry about using the Spry Accordion widget, we mentioned that it uses the same data model as the tabbed view and that you would swap out widgets. Today I will show you how simple it is to do so.

First, complete the steps from yesterday's mini-tutorial.

Next, open your Base jMaki project, and drag a Yahoo Tabbed View widget into index.jsp. Run the project to ensure that all the necessary files are copied into the  resources/yahoo folder.

Copy the resources/yahoo folder from the Base jMaki project and paste it into the resources folder of your Visual Web project.

Click JSP to view the JSP tags for Page1. Replace the following line:

<a:widget name="spry.accordion" value="#{SessionBean1.tripContent}"/>

with:

<a:widget name="yahoo.tabbedview"
  value="#{SessionBean1.tripContent}" />

Now click the Run Main Project button. You should see a tabbed view instead of the accordion.

Comments:

Hi,

Iam using jmaki along with visual jsf. But, when I use yahoo tabbed view, I could not load my jsp page as content. The path is correct but still, the content is not showed. Any ideas please?

Thank you.
Regards,
Ajay

Posted by Ajay on January 02, 2008 at 06:40 PM PST #

Ajay,

This is how I do it. Not sure if there is a better way.

1. I add a regular (not a Visual Web) JSP page to the project.

2. I use code like the following to include it (not sure how this will get through the "no html" rule).

< a:widget name="yahoo.tabbedview"
value="{items:[
{id : 'tab1', label : 'Weather', include : 'faces/weather.jsp', selected : true },
{id : 'tabw', label : 'Tides', include : 'faces/tides.jsp' }
]
}" />

Posted by Diva #2 on January 03, 2008 at 10:22 AM PST #

Post a Comment:
Comments are closed for this entry.
About

divas

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today