Apache
  Home arrow Apache arrow Page 5 - Introducing Simple Components in Apach...
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

Introducing Simple Components in Apache Tapestry
By: Alexander Kolesnikov
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 22
    2007-04-23

    Table of Contents:
  • Introducing Simple Components in Apache Tapestry
  • What is OGNL?
  • Implicit vs. declared components
  • GuessTheWord project
  • Creating mock ups
  • Which components shall we need?

  • 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

    Introducing Simple Components in Apache Tapestry - Creating mock ups


    (Page 5 of 6 )

    Let me repeat this: it makes sense to start a Tapestry project from a series of mock ups, as they can be converted into Tapestry pages very easily. So let’s visualize first what we want to do in the new project.

    The default page should display a very simple HTML form with a text field to enter a word and a button to submit it. It might look like this:

    And here is the HTML code for the Home page mock up:

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

    <html>

      <head>

        <title>Guess the Word</title>

      </head>

      <body>

          <h2>Guess the Word</h2>

          <form action="">

              Enter the secret word:

              <input type="text"/>

              <input type="submit" value="Submit">

          </form>

      </body>

    </html>

    The Secret page is going to be very simple. It will either greet the user if the word was guessed correctly or inform him or her of failure and provide a link to the Home page to go and try again. So the same page will contain two views but only one of them will be shown at a time. However, the mock up will display both views as it doesn’t contain any dynamic functionality yet:

    Here is the HTML code for the Secret page mock up:

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

    <html>

      <head>

        <title>Guess Result</title>

      </head>

      <body>

          <!-- This will be shown if the guess was successful -->

          <h2>Congratulations!</h2>

          <p>You have guessed the secret word properly,

          and here is the hidden wisdom:</p>

          <p><i>Lorem ipsum dolor sit amet, consectetur

            adipisicing elit, sed do eiusmod tempor

            incididunt ut labore et dolore magna aliqua.</i></p>    

         

          <!-- And this will be shown if case of failure -->

          <h2>This was a wrong word</h2>

          <p><a href="">Go back and try again.</a></p>

      </body>

    </html>

    More Apache Articles
    More By Alexander Kolesnikov


       · We are gradually going into the nitty-gritty of Tapestry, and there were no...
       · Very clear. I'm only wondering why you put the .html and .page files inside...
       · Thanks, Jasen,I think their proper place is in WEB-INF. Do you want your...
       · Hi Alex,First of all I would like to express my sincere thanks for writing the...
       · Hi Alex,I got the solution to the problem about not getting the current html...
     

       

    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