SunQuest
 
       Apache
  Home arrow Apache arrow Page 3 - Tapestry and AJAX: Autocompleter and I...
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? 
APACHE

Tapestry and AJAX: Autocompleter and InlineEditBox
By: Alexander Kolesnikov
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2007-06-18

    Table of Contents:
  • Tapestry and AJAX: Autocompleter and InlineEditBox
  • The IAutocompleteModel interface
  • Enabling JavaScript
  • Meet InlineEditBox

  • 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

    Tapestry and AJAX: Autocompleter and InlineEditBox - Enabling JavaScript


    (Page 3 of 4 )

    Before running the application, don't forget to provide the required support for JavaScript, otherwise Autocompleter won't work:

    1. Turn the <html> element of the Web page into a Shell component. This will ensure that the required JavaScript libraries are available for the page. In the current version of Tapestry we also need to disable debugging (I would say it should be disabled by default, but it isn't), otherwise Dojo will print ugly error messages straight across the page. Here is how everything should look:

    <html jwcid="@Shell" title="Celebrity Collector: Celebrities List" debugEnabled="false">

    2. Turn the <body> element into the Body component. This will show Tapestry where to place any JavaScript it might want to write for us:

    <body jwcid="@Body">

    3. Mark the existing <DOCTYPE> and <head> elements for removal as they will be added by the Shell component and we don't want them to be duplicated:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

        jwcid="$remove$">

    ...

      <head jwcid="$remove$">

        ...

      </head>

    Now, the moment of truth has arrived. Run the application and navigate to the page with the table of celebrities. You will see that the text box that we've used in the mock up became something different, something which looks like a drop-down list:

    Try typing the character g into this fancy control (well, that's because we have two celebrities with surnames starting with "G") and you should see how Autocompleter works. It's AJAX in action!

    More Apache Articles
    More By Alexander Kolesnikov


       · I think this is one of the greatest features of Tapestry: you can make use of AJAX...
       · Very cool!Autocompleter is awesome but the InlineEditBox didn't seem to work...
       · Well, I do have InlineEdit running successfully, as screenshots show. Did you try...
       · Yes. I download the src, create a new net beans web app from existing source, add...
       · Okay, I've got a demonstration for you. I have deployed CelebrityCollector to my...
       · I tested it out in IE 6 and Firefox 2 on your site (sundraw) and it behaves (for me)...
       · Ufff... So this is what you meant by not working InlineEdit. Well, the problem you...
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





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