JavaScript
  Home arrow JavaScript arrow Page 5 - JSP Libraries and AJAX
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

JSP Libraries and AJAX
By: Mamun Zaman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2007-08-29

    Table of Contents:
  • JSP Libraries and AJAX
  • AjaxTags Tags
  • jMaki
  • jMaki widgets
  • jMaki Menu, Data Table and More

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    JSP Libraries and AJAX - jMaki Menu, Data Table and More


    (Page 5 of 5 )

    The following code example shows how easy to create a multi-level Yahoo-like menu.

    <a:widget name="yahoo.menu" value="{menu: [ 
            { label:'Must Read',
            menu: [ 
            { label:'Slashdot', url:'http://www.slashdot.org' },
            { label:'dev.java.net', menu: [ 
            {label : 'jMaki',url:'http://ajax.dev.java.net'}, {label : 'Glass',url:'http://glassfish.dev.java.net'} 
            ] }
            ]
            }, 
            { label:'Click me for fun!',style:{strongemphasis:true} },
            { label:'Disabled!',style:{disabled:true} },
            { label:'Yahoo!', url:'http://www.yahoo.com' },
            { label:'Sun Microsystems', url:'http://www.sun.com',style:{checked:true} },
            { label:'Oracle', url:'http://www.oracle.com' }
            ]}" />

    Here is the output.

    Using the Yahoo Datatable widget, you can create a nice sortable data table like the one here.

    The code generates this output is:

    <a:widget name="yahoo.dataTable" args="{
           
    columns :[
           
    {title : 'Company', width : 200, locked:false},
           
    {title : 'Price', width : 75, renderer: 'usMoney'}, 
            {title : 'Change', width : 75, renderer: 'change'}, 
            {title : '% Change', width : 75, renderer: 'pctChange'}, 
            {title : 'Last Updated', width : 85, renderer: 'italic'}
            ]}"
            value="[
            ['A Co',71.72,0.02,0.03,'9/1 12:00am'],
            ['B Inc',29.01,0.42,1.47,'9/1 12:00am'],
            ['C Group Inc',83.81,0.28,0.34,'9/1 12:00am'],
            ['D Company',52.55,0.01,0.02,'9/1 12:00am']
            ]" />

    A Yahoo like calendar can be added using the following tag.

    <a:widget name="yahoo.calendar" />

    You can also add a nice dialog box like this one into your code by just dragging the Yahoo Dialog widget from palate.

    Here is the code generated by dragging.

    <a:widget name="yahoo.simpledlg"/>

    We can change the properties of this dialog box by clicking the jMaki button at the top middle of Netbeans IDE.

    Here it is:

    A window will be opened if you click the jMaki button.

    I changed text value to 'Are you sure?' then clicked OK. The source code will be changed automatically. You can change other arguments also.

    <a:widget name="yahoo.simpledlg" args="{text:'Are you sure?'}" value="{}"/>

    And the modified dialog box is as below.

    You can also add Google Search or Yahoo Search by simply dragging and dropping. You can add a Google Map to your web application. You can add menus, calendars, trees, an editor, an editable table and lots of other cool widgets to your web application very easily. Install it and give it a try; you will definitely love the experience.

    I tried to describe different Ajax techniques in this article. There are lots of other techniques. Try them and then decide which one suits your requirements.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    JAVASCRIPT ARTICLES

    - Comparing Fields and Customizing Error Messa...
    - Checking Numbers and File Extensions with jQ...
    - Validating Digits and Dates with jQuery`s Va...
    - Validating Ranges, Emails, and URLs with jQu...
    - More Uses for the jQuery Tooltip Plug-in`s b...
    - Building Image-Based Tooltips with the jQuer...
    - Using the jQuery Tooltip Plug-in`s bodyHandl...
    - Using Rangelength, Min and Max with the Vali...
    - Using Minlength and Maxlength with the Valid...
    - Modifying Tooltip Coordinates with the jQuer...
    - Applying a Fade Out Effect with the jQuery T...
    - Tracking Mouse Movements with the jQuery Too...
    - Checking Online Forms with the Validator jQu...
    - Nested JavaScript Functions as Objects
    - The jQuery Tooltip Plug-in







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek