SunQuest
 
       Web Services
  Home arrow Web Services arrow Page 8 - Dynamic Data Analysis on the Web-a Des...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
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? 
WEB SERVICES

Dynamic Data Analysis on the Web-a Design Approach
By: developerWorks
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2004-12-29

    Table of Contents:
  • Dynamic Data Analysis on the Web-a Design Approach
  • Data analysis concepts
  • Dimensions and measures
  • Filtering and ordering
  • Dimension, measure, and slice dimension tags
  • Presenting data
  • Value formatting tags
  • Use of JavaBeans to provide dynamic values
  • Reporting common errors
  • Tag containment
  • Custom tags: lightweight, cheap, replaceable
  • Benefits of this design approach
  • In conclusion

  • 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Dynamic Data Analysis on the Web-a Design Approach - Use of JavaBeans to provide dynamic values


    (Page 8 of 13 )

    A common way to transfer information within and between JSPs is by using JavaBeans. Bean attribute values might be set using HTML form submission, or a variety of other means. Once set, those attribute values can be used to control aspects of the data-related tags.

    Listing 4. Controlling filtering using a JavaBean


    <%@ taglib uri="/WEB-INF/tlds/dd.tld" prefix="dd" %>
    <jsp:useBean class="package.beanClass" id="salesChoices" scope="page"/%>

    <dd:data id="sales">
      ...
      <dd:filters>
        <dd:includeFilter>
          <dd:dimension>Sales Region</dd:dimension>
          <dd:value
            ><jsp:getProperty name="salesChoices" property="region"/>
          </dd:value>
        </dd:includeFilter>
      </dd:filters>
    </dd:data>

    In Listing 4, a JavaBean is given an id of salesChoices and given page scope. This bean might support a number of properties that have been set by various means, but in this case, we assume that the region attribute has been set by user input using an HTML form control. The includeFilter tag filters on the sales region dimension, and the value to be included is taken from the region attribute of our salesChoices bean.

    Populating form fields with dynamic values

    To make the example shown in Listing 4, the page author will need to construct a page where the user can select the region from a list of current regions. The page author might choose to hard code a set of known sales region values. This is an acceptable strategy if the set of valid sales regions is fixed. However, if the list of current regions is volatile, or the list of regions that will be returned in the data varies according to other selections, the page author will wish to present the user with region choices that reflect the current state.

    To meet this requirement, provide custom JSP tags can that produce HTML form controls populated with the appropriate values. You can obtain these values from the data source by leveraging the existing data definition.

    More Web Services Articles
    More By developerWorks


     

       

    WEB SERVICES ARTICLES

    - Dynamic Data Analysis on the Web-a Design Ap...
    - Use collection types with SOAP and JAX-RPC
    - Blogging Away To Glory (A bBlog Primer)
    - Introduction to Service Oriented Architectur...
    - Connecting Smart Devices on the Internet
    - An Embeddable Standards Compliant Web Servic...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway