Now let’s try another example. Pick the clock widget from the palette and drop it in your JSP code. Your code should look like this.
<div class="content" style="height:400px"> <a:widget name="dojo.clock" /> </div> <!-- content -->
You can change the outlook of this widget also. To do this click within the code of the widget and then click jMaki button from Netbeans IDE as shown here.
Change the clockType value to Gray. The changed JSP would be like –
<div class="content" style="height:400px"> <a:widget name="dojo.clock" args="{clockType:'gray'}"/></div>
Save the changes and refresh the browser. The output would be –
Here is a nice Yahoo slide bar for you.
<a:widget name="yahoo.slider" />
Just add the above tag or drag it from palette. The output would be a nice simple slide bar.
Now add a Tabbed View widget from the palette in your code. The JSP code would be:
<div class="content" style="height:400px"> <a:widget name="yahoo.tabbedview"value="{tabs:[{label:'My Tab', content: 'Some Content'},{label:'My Tab 2', content: 'Tab 2 Content'}]}" /></div> <!-- content -->
You can change the labels from ‘My Tab’ to anything you need. You can also have as many tabs as required. The above code will create two tabs with labels and contents as described in the above code segment. Here is the output of this.
Isn’t jMaki cool?! There are lots of other cool widgets for you. Explore all the widgets, you will love jMaki definitely. You can also add Google Search or Yahoo Search by simply just dragging and dropping. Also you can add Google Maps very easily in your web pages. You can have menus, calendars, trees, editor, editable table and lots of other cool widgets in your web application very easily.
There is good news for PHP developers. That is they can also use jMaki with PHP. I tried to describe different ways and techniques here in this article to use AJAX with JSP. You choose which one better fits your need. Now, go try out these solutions and learn AJAX.