Java
  Home arrow Java arrow Page 3 - 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 - Build and run the project


    (Page 3 of 4 )

    When I run the project after building, the browser display is as shown in the next picture. When I keep my mouse on the link, the status bar displays that this is a hyperlink to another page in this project.

    When I click on the hyperlink the browser displays the following. The hyperlink binds to the NewYork.jsp page and the action attribute is assigned the value Case1 which is the same one defined in the XML navigation rule definition.

    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:jsp="http://java.sun.com/JSP/Page" 
    xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" 
    pageEncoding="UTF-8"/> <f:view> <ui:page binding="#{NewYork.page1}" id="page1"> <ui:html binding="#{NewYork.html1}" id="html1"> <ui:head binding="#{NewYork.head1}" id="head1"> <ui:link binding="#{NewYork.link1}" id="link1" url="/resources/stylesheet.css"/> </ui:head> <ui:body binding="#{NewYork.body1}" id="body1" style="-rave-layout: grid"> <ui:form binding="#{NewYork.form1}" id="form1"> <ui:hyperlink action="case1" binding="#{NewYork.
    hyperlink1
    }" id="hyperlink1" style="left: 50px; top: 60px;
    position: absolute" text="Go to Chicago"/> <ui:staticText binding="#{NewYork.staticText1}"
    id="staticText1" style="color: #cc0066; font-family: Verdana,Arial,
    Helvetica,sans-serif; font-size: 18px; font-weight: bold; left: 50px;
    top: 10px; position: absolute; width: 150px" text="New York  "/> </ui:form> </ui:body> </ui:html> </ui:page> </f:view> </jsp:root>

    The next picture shows a button on the Chicago page being linked to the NewYork.jsp page as shown. In this case also it is case1, but it is now from Chicago.jsp to NewYork.jsp.

    The binding in this case is as shown with rest of the code abbreviated.

    <ui:form binding="#{Chicago.form1}" id="form1">
    <ui:staticText binding="#{Chicago.staticText1}" id="staticText1"
    style="color: #990000; font-family: Verdana,Arial,Helvetica,
    sans-serif; font-size: 36px; font-style: oblique; left: 60px; top: 10px; position: absolute" text="Chicago "/> <ui:staticText binding="#{Chicago.staticText2}" id="staticText2" style="color: rgb(51, 0, 204); font-size: 36px; font-style:
    oblique; font-weight: bolder; left: 170px; top: 50px; position: absolute" text="Chicago"/> <ui:button action="case1" binding="#{Chicago.button1}" id="button1" style="left: 89px; top: 120px; position:
    absolute" text="Go to New York"/> </ui:form>

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