Java
  Home arrow Java arrow Page 2 - 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  
Mobile Linux 
App Generation ROI 
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 - Navigating to Chicago.jsp by clicking a link on the NewYork.jsp


    (Page 2 of 4 )

    From the Palette drag and drop a hyperlink control to the NewYork.jsp page. If you right click this hyperlink you will get a drop-down menu from which you can do a lot of things. You can edit the text, the JSP source, and so forth. For this example the text was edited to read "Go to Chicago."

    Now go back to the Page Navigation designer and click on the NewYork.jsp page. The size of the page increases and shows the hyperlink you created in the previous paragraph as shown.

    Now click on the hyperlink in NewYork.jsp in the designer of the Page Navigation (in the previous picture) and drag the line that follows the mouse towards the Chicago.jsp page as shown.

    When you terminate the line on Chicago.jsp, the design view appears as shown. This ensures that when you click on the link in NewYork.jsp you will bring up the Chicago.jsp page in the browser.

    This design information transforms to the XML navigation definition as shown in the Source View of Page Navigation as shown. The file is pretty intuitive about what it does.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD 
    JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-
    facesconfig_1_1.dtd"> <faces-config> <navigation-rule> <from-view-id>/NewYork.jsp</from-view-id> <navigation-case> <from-outcome>case1</from-outcome> <to-view-id>/Chicago.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config>

    The root element of this XML configuration file is <faces-config/> and there can be any number of <navigation-rule/> nodes. Each node consists of a <navigation-case/> defining the navigation. In this case, case1 defines going from NewYork.jsp and navigating to Chicago.jsp.

    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 3 hosted by Hostway
    Stay green...Green IT