Java
  Home arrow Java arrow Page Navigation using Sun Java Studio Crea...
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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
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? 
JAVA

Page Navigation using Sun Java Studio Creator 2
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2006-12-20

    Table of Contents:
  • Page Navigation using Sun Java Studio Creator 2
  • Navigating to Chicago.jsp by clicking a link on the NewYork.jsp
  • Build and run the project
  • Navigating between three pages: example 2

  • 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


    Page Navigation using Sun Java Studio Creator 2


    (Page 1 of 4 )

    Site navigation should not be an afterthought, but it can be difficult and tedious to set up correctly. Sun Java Studio Creator 2 helps take the pain out of this important part of site building. Keep reading to learn how.

    Page navigation is an important aspect of web development which cannot be overemphasized. It can make or break a web site. Once the navigation structure is defined, a scheme for going from one page to another is required. This is achieved by implementing a linking mechanism. Depending on the size of the site, the links have to be carefully set up and optimized to reach any part of the site with the smallest number of clicks possible while providing a clear route back to the home page. This is especially important for the common visitor who surfs to your side guided by a search engine which casts him on any page that was searched. Links between the pages are therefore of greatest importance.

    Sun Java Studio Creator 2 makes it extremely easy to build the navigation by creating a design interface that creates the navigation model, an XML-based resource configuration file. This tutorial takes you through the steps involved in creating a navigation scheme that will link three Java server pages using the Page Navigation UI, an integral part of a Sun Java Studio Creator web project.

    Mechanics of creating a navigation scheme: example 1

    This example with only two pages illustrates very clearly how the scheme works. You will appreciate the fact that no code is needed for the success of this scheme. We create a Java Server faces web application project from File -->New Project and choose the Web option in the categories pane and the JSF Web Application in the projects pane. Here a project named Navigation was created. This adds the folder with several other folders and files to the project as shown in the next picture.

    In this folder you can easily identify the Page Navigation icon which leads to the UI that actually contains the defining rule for the way in which navigation has to take place between the pages in this project. The defining rule is in the XML format, but Creator 2 provides a visual designer to carry out the navigation set up.

    Add two Java server pages to the project by right clicking the Web Pages node and clicking on the page drop-down menu item as shown.

    In this way two pages, NewYork.jsp and Chicago.jsp, were added to the project. After adding the pages to the project, click on the Page Navigation icon in the Navigation project. This opens the Page Navigation window as shown. When you add JSP they get added to this window as well. You can move these page objects in the designer by holding down the shift key and dragging the page by the mouse (by default they line up side by side horizontally). If there are any controls that can evoke events for navigation, such as a hyperlink or a button, they should be visible on the pages in this view. Currently the pages are empty.

    More Java Articles
    More By Jayaram Krishnaswamy


       · Compared to last version the GUI is much better. It is quite easy to set up the...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...







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