Convertibles.jsp Sample

This topic inludes the source code for the Convertibles.jsp Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/navigation/selectTagNavigation/

Sample Source Code


001 <!--Generated by Weblogic Workshop-->
002 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
003 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
004 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
005 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
006 <html>
007     <head>
008         <link href="../../resources/css/style.css" type="text/css" rel="stylesheet"/>
009         <title>
010             Convertible Cars Index
011         </title>
012     </head>
013     <netui:base/>
014     <body style="margin:0">
015         <jsp:include page="/resources/jsp/header.jsp"/>
016         <br/>
017   
018       <table width=100% align=left border=cellspacing=cellpadding=0>
019     
020     <tr>
021         
022     <td width=5>&nbsp;</td>
023     
024     <td width=296 valign="top">
025   
026     <!-- Royalty-free images used in this sample are from Artville,
027        Digital Vision, EyeWire, PhotoDisc.  
028        http://creative.gettyimages.com -->
029   
030         <netui:image src="../../resources/images/convertibleCars1.jpg" width="280" height="187" />
031 
032     </td>
033     
034     <td valign="top">
035         
036         <p><b>Convertibles!</b></p>
037     
038         <blockquote>
039         
040         <p>Spring is finally here, and it's a gorgeous day ... time to put the top down,
041     and hit the road in your own convertible...  [more text...</p>
042     
043     <p>&nbsp;</p>
044     
045     <hr width=200 align=left>
046     
047     <!-- In SelectCarsController.jpf, note how the "goAgain" action 
048           uses return-to="page". This action returns to the last page 
049         executed before this page -->
050     
051          <p><b>Return to Car Selections</b>&nbsp;&nbsp;
052           <netui:form action="goAgain">
053             <netui:button value="More Cars" type="submit"/>
054           </netui:form> 
055         </p>
056         
057     <!-- In SelectCarsController.jpf, note how the "done" action
058           uses return-action="begin". This action returns to the
059         calling page flow and then runs its begin() method. -->    
060 
061         <p><b>Return to Home Page</b>&nbsp;&nbsp;
062           <netui:form action="done">
063             <netui:button value="Home" type="submit"/>
064           </netui:form> 
065           </p>
066       
067          </blockquote>
068 
069         
070       </td>
071     </tr>
072   
073   <tr>
074   <td width=5>&nbsp;</td>
075   <td width=296>&nbsp;</td>
076   <td class="white-text" bgcolor=navy>
077     &nbsp;Implementation Notes
078   </td>  
079   </tr>  
080   
081   <tr>
082   <td width=5>&nbsp;</td>
083   <td width=296>&nbsp;</td>
084   <td class="white-text" bgcolor="#8fc5ff">
085   
086     <p>The <b>More Cars</b> button is in a form that
087   raises an action named <b>goAgain</b>. In the controller class,
088   SelectCarsController.jpf, notice how the "goAgain" method has a
089   @jpf:forward return-to="previousPage" annotation. This forwards
090   the flow to the prior page; in this case, to the index.jsp page
091   with the pull-down menu.</p>
092 
093   <p>      
094   The <b>Home</b> button is in a form that raises an action
095   named <b>done</b>. In SelectCarsController.jpf, notice how
096   the <b>done</b> method uses @jpf:forward return-action="begin".
097   This forwards the flow from this nested page flow
098   to the calling page flow, /Controller.jpf, and runs
099   its <b>begin</b> method. In this case, the <b>begin</b> forwards to 
100   the webapp project's index.jsp.
101   </p>
102   </td>
103   </tr>  
104   
105   </table>
106 
107 </body>
108 </html>