You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ap...@apache.org on 2007/10/31 21:35:03 UTC
svn commit: r590812 [4/48] - in /struts/struts2/trunk: apps/blank/
apps/blank/src/main/java/example/ apps/blank/src/main/resources/
apps/blank/src/main/resources/example/ apps/blank/src/main/webapp/
apps/mailreader/ apps/mailreader/src/main/java/ apps/...
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp Wed Oct 31 13:32:54 2007
@@ -1,76 +1,76 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<pre style="font-style: normal;">
-<span class="kw">package</span> org.apache.struts2.showcase.action;
-
-<span class="kw">import</span> java.util.Arrays;
-<span class="kw">import</span> java.util.Date;
-<span class="kw">import</span> java.util.HashMap;
-<span class="kw">import</span> java.util.List;
-<span class="kw">import</span> java.util.Map;
-
-<span class="kw">import</span> com.opensymphony.xwork2.ActionSupport;
-
-<span class="kw">public class</span> ExampleAction <span class="kw">extends</span> ActionSupport {
- <span class="kw">public static final</span> String CONSTANT = "Struts Rocks!";
-
- <span class="kw">public static</span> Date getCurrentDate() {
- return new Date();
- }
-
- <span class="kw">public</span> String getName() {
- return "John Galt";
- }
-
- <span class="kw">public</span> String[] getBands() {
- return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
- }
-
- <span class="kw">public</span> List<String> getMovies() {
- return Arrays.asList("Lord of the Rings", "Matrix");
- }
-
- <span class="kw">public</span> Book getBook() {
- <span class="kw">return</span> new Book("Iliad", "Homer");
- }
-
- <span class="kw">public</span> Map<String, Book> getBooks() {
- Map<String, Book> books = new HashMap<String, Book>();
- books.put("Iliad", new Book("Iliad", "Homer"));
- books.put("The Republic", new Book("The Replublic", "Plato"));
- books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
- "Friedrich Nietzsche"));
- return books;
- }
-}
-
-<span class="kw">class</span> Book {
- <span class="kw">private</span> String title;
- <span class="kw">private</span> String author;
-
- <span class="kw">public</span> Book(String title, String author) {
- this.title = title;
- this.author = author;
- }
-
- <span class="kw">public</span> String getTitle() {
- <span class="kw">return</span> title;
- }
-
- <span class="kw">public void</span> setTitle(String title) {
- this.title = title;
- }
-
- <span class="kw">public</span> String getAuthor() {
- return author;
- }
-
- <span class="kw">public void</span> setAuthor(String author) {
- this.author = author;
- }
-}
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<pre style="font-style: normal;">
+<span class="kw">package</span> org.apache.struts2.showcase.action;
+
+<span class="kw">import</span> java.util.Arrays;
+<span class="kw">import</span> java.util.Date;
+<span class="kw">import</span> java.util.HashMap;
+<span class="kw">import</span> java.util.List;
+<span class="kw">import</span> java.util.Map;
+
+<span class="kw">import</span> com.opensymphony.xwork2.ActionSupport;
+
+<span class="kw">public class</span> ExampleAction <span class="kw">extends</span> ActionSupport {
+ <span class="kw">public static final</span> String CONSTANT = "Struts Rocks!";
+
+ <span class="kw">public static</span> Date getCurrentDate() {
+ return new Date();
+ }
+
+ <span class="kw">public</span> String getName() {
+ return "John Galt";
+ }
+
+ <span class="kw">public</span> String[] getBands() {
+ return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
+ }
+
+ <span class="kw">public</span> List<String> getMovies() {
+ return Arrays.asList("Lord of the Rings", "Matrix");
+ }
+
+ <span class="kw">public</span> Book getBook() {
+ <span class="kw">return</span> new Book("Iliad", "Homer");
+ }
+
+ <span class="kw">public</span> Map<String, Book> getBooks() {
+ Map<String, Book> books = new HashMap<String, Book>();
+ books.put("Iliad", new Book("Iliad", "Homer"));
+ books.put("The Republic", new Book("The Replublic", "Plato"));
+ books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
+ "Friedrich Nietzsche"));
+ return books;
+ }
+}
+
+<span class="kw">class</span> Book {
+ <span class="kw">private</span> String title;
+ <span class="kw">private</span> String author;
+
+ <span class="kw">public</span> Book(String title, String author) {
+ this.title = title;
+ this.author = author;
+ }
+
+ <span class="kw">public</span> String getTitle() {
+ <span class="kw">return</span> title;
+ }
+
+ <span class="kw">public void</span> setTitle(String title) {
+ this.title = title;
+ }
+
+ <span class="kw">public</span> String getAuthor() {
+ return author;
+ }
+
+ <span class="kw">public void</span> setAuthor(String author) {
+ this.author = author;
+ }
+}
</pre>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/example-action.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp Wed Oct 31 13:32:54 2007
@@ -1,247 +1,247 @@
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
-
-<html>
-<head>
- <title>OGNL and tags demo</title>
- <s:url var="struts" value="/struts" includeParams="none"/>
- <s:url var="jspEval" action="jspEval" namespace="/nodecorate" includeParams="none"/>
- <s:url var="viewClass" value="/interactive/example-action.jsp" includeParams="none"/>
- <s:url var="ognlBase" value="/interactive/ognl_" includeParams="none"/>
- <s:url var="jspBase" value="/interactive/jsp_" includeParams="none"/>
-
- <script src="${struts}/webconsole.js"></script>
- <sx:head/>
- <script>
- var index = -1;
- var runningOgnl = true;
- var ognlBase = "${ognlBase}";
- var jspBase = "${jspBase}";
- var ognlCount = 10;
- var jspCount = 5;
-
- dojo.addOnLoad(function() {
- var classSrc = dojo.byId("classSrc");
- dojo.io.updateNode(classSrc, "${viewClass}");
- dojo.html.hide("previous");
- dojo.html.hide("next");
- });
-
- dojo.event.topic.subscribe("/reloadGuide", function() {
- next();
- });
-
- function startOgnl() {
- selectOGNLTab();
- index = -1;
- runningOgnl = true;
- change(1);
- updateNavigation();
- }
-
- function startJSP() {
- selectJSPTab();
- index = -1;
- runningOgnl = false;
- change(1);
- updateNavigation();
- }
-
- function execOgnl(id) {
- var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
- dojo.byId("wc-command").value = exp;
-
- keyEvent({keyCode : 13}, '${jspEval}');
- }
-
- function execJSP(id) {
- var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
- dojo.byId("jsp").value = unscape(exp);
-
- dojo.event.topic.publish("/evalJSP")
- }
-
- function unscape(str) {
- return str.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, '"');
- }
-
- function selectClassSrcTab() {
- dojo.widget.byId("mainTabContainer").selectTab("classTab");
- }
-
- function selectJSPTab() {
- dojo.widget.byId("mainTabContainer").selectTab("jspTab");
- }
-
- function selectOGNLTab() {
- dojo.widget.byId("mainTabContainer").selectTab("ognlTab");
- }
-
- function change(delta) {
- index+=delta;
-
- var url = (runningOgnl ? ognlBase : jspBase) + index + ".jsp";
- var bind = dojo.widget.byId("guideBind");
- bind.href = url;
- dojo.event.topic.publish("/loadContent");
- updateNavigation();
- }
-
- function updateNavigation() {
- if(index <= 0) {
- dojo.html.hide("previous");
- } else {
- dojo.html.show("previous");
- }
-
- var top = runningOgnl ? ognlCount : jspCount;
-
- if(index == top - 1) {
- dojo.html.hide("next");
- } else {
- dojo.html.show("next");
- }
- }
- </script>
-
- <style type="">
- .wc-results {
- overflow: auto;
- margin: 0px;
- padding: 5px;
- font-family: courier;
- color: white;
- background-color: black;
- height: 200px;
- }
- .wc-results pre {
- display: inline;
- }
- .wc-command {
- margin: 1px 0 0 0;
- border-style: none;
- font-family: courier;
- color: white;
- background-color: black;
- width: 100%;
- padding: 0px;
- }
- .shell {
- width: 100%;
- }
-
- .jsp {
- border-style: solid;
- width: 100%;
- height: 200px;
- }
- .jspResult {
- border-style: none;
- width: 100%;
- height: 200px;
- padding: 5px;
- }
- .jspResultHeader {
- background-color: #818EBD;
- color: white;
- width: 100%;
- height: 15px;
- }
- .jspResultHeader span {
- padding: 5px;
- }
- .classSrc {
- font-family:Courier;
- font-size:11px;
- line-height:13px;
- overflow: auto;
- height: 400px;
- width: 100%;
- }
- .tabContainer {
- width: 1000px;
- margin: 0 auto;
- }
- .guideContainer {
- width: 600px;
- border-width: 1px;
- border-style: solid;
- margin: 0 auto;
- }
- .guide {
- padding: 5px;
- }
- pre {
- font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;
- font-style: italic;
- }
- span.kw {
- color: rgb(127, 0, 85);
- font-weight: bold;;
- }
- </style>
-</head>
-
-<sx:bind id="guideBind" targets="guide" listenTopics="/loadContent"/>
-
-<body>
- <sx:tabbedpanel id="mainTabContainer" cssClass="tabContainer">
- <sx:div label="OGNL Console" id="ognlTab">
- <div id="shell" class="shell">
- <form onsubmit="return false" id="wc-form">
- <div class="wc-results" id="wc-result">
- Welcome to the OGNL console!
- <br />
- :->
- </div>
- <input type="hidden" name="debug" value="command" />
- OGNL Expression <input name="expression" onkeyup="keyEvent(event, '${jspEval}')" class="wc-command" id="wc-command" type="text" />
- </form>
- </div>
- </sx:div>
- <sx:div label="JSP Console" id="jspTab">
- <table style="width: 100%" cellpadding="1">
- <tr valign="top">
- <td width="50%">
- <form theme="simple" namespace="/nodecorate" action="jspEval" method="post">
- <s:textarea cssClass="jsp" theme="simple" name="jsp" />
- <sx:submit
- value="Eval JSP Fragment"
- href="%{#jspEval}"
- targets="jspResult"
- listenTopics="/evalJSP"/>
- </form>
- </td>
- <td width="50%">
- <div class="jspResultHeader">
- <span>JSP Eval Result</span>
- </div>
- <div id="jspResult" class="jspResult">
- </div>
- </td>
- </tr>
- </table>
- </sx:div>
- <sx:div label="Class on top of the Value Stack" id="classTab">
- <div id="classSrc" class="classSrc">
- </div>
- </sx:div>
- </sx:tabbedpanel>
- <br/><br/>
- <div class="guideContainer">
- <div class="jspResultHeader">
- <span>Interactive Guide</span>
- </div>
- <sx:div id="guide" listenTopics="/reloadGuide" cssClass="guide">
- <p><a href="#" onclick="startOgnl()">Start OGNL Interactive Demo</a></p>
- <p><a href="#" onclick="startJSP()">Start JSP Interactive Demo</a></p>
- </sx:div>
- <div>
- <a href="#" id="previous" onclick="change(-1)" style="float: left"><< Previous</a>
- <a href="#" id="next" onclick="change(1)" style="float: right">Next >></a>
- </div>
- </div>
-</body>
-
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
+
+<html>
+<head>
+ <title>OGNL and tags demo</title>
+ <s:url var="struts" value="/struts" includeParams="none"/>
+ <s:url var="jspEval" action="jspEval" namespace="/nodecorate" includeParams="none"/>
+ <s:url var="viewClass" value="/interactive/example-action.jsp" includeParams="none"/>
+ <s:url var="ognlBase" value="/interactive/ognl_" includeParams="none"/>
+ <s:url var="jspBase" value="/interactive/jsp_" includeParams="none"/>
+
+ <script src="${struts}/webconsole.js"></script>
+ <sx:head/>
+ <script>
+ var index = -1;
+ var runningOgnl = true;
+ var ognlBase = "${ognlBase}";
+ var jspBase = "${jspBase}";
+ var ognlCount = 10;
+ var jspCount = 5;
+
+ dojo.addOnLoad(function() {
+ var classSrc = dojo.byId("classSrc");
+ dojo.io.updateNode(classSrc, "${viewClass}");
+ dojo.html.hide("previous");
+ dojo.html.hide("next");
+ });
+
+ dojo.event.topic.subscribe("/reloadGuide", function() {
+ next();
+ });
+
+ function startOgnl() {
+ selectOGNLTab();
+ index = -1;
+ runningOgnl = true;
+ change(1);
+ updateNavigation();
+ }
+
+ function startJSP() {
+ selectJSPTab();
+ index = -1;
+ runningOgnl = false;
+ change(1);
+ updateNavigation();
+ }
+
+ function execOgnl(id) {
+ var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
+ dojo.byId("wc-command").value = exp;
+
+ keyEvent({keyCode : 13}, '${jspEval}');
+ }
+
+ function execJSP(id) {
+ var exp = dojo.string.trim(dojo.byId(id ? id : "example").innerHTML);
+ dojo.byId("jsp").value = unscape(exp);
+
+ dojo.event.topic.publish("/evalJSP")
+ }
+
+ function unscape(str) {
+ return str.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, '"');
+ }
+
+ function selectClassSrcTab() {
+ dojo.widget.byId("mainTabContainer").selectTab("classTab");
+ }
+
+ function selectJSPTab() {
+ dojo.widget.byId("mainTabContainer").selectTab("jspTab");
+ }
+
+ function selectOGNLTab() {
+ dojo.widget.byId("mainTabContainer").selectTab("ognlTab");
+ }
+
+ function change(delta) {
+ index+=delta;
+
+ var url = (runningOgnl ? ognlBase : jspBase) + index + ".jsp";
+ var bind = dojo.widget.byId("guideBind");
+ bind.href = url;
+ dojo.event.topic.publish("/loadContent");
+ updateNavigation();
+ }
+
+ function updateNavigation() {
+ if(index <= 0) {
+ dojo.html.hide("previous");
+ } else {
+ dojo.html.show("previous");
+ }
+
+ var top = runningOgnl ? ognlCount : jspCount;
+
+ if(index == top - 1) {
+ dojo.html.hide("next");
+ } else {
+ dojo.html.show("next");
+ }
+ }
+ </script>
+
+ <style type="">
+ .wc-results {
+ overflow: auto;
+ margin: 0px;
+ padding: 5px;
+ font-family: courier;
+ color: white;
+ background-color: black;
+ height: 200px;
+ }
+ .wc-results pre {
+ display: inline;
+ }
+ .wc-command {
+ margin: 1px 0 0 0;
+ border-style: none;
+ font-family: courier;
+ color: white;
+ background-color: black;
+ width: 100%;
+ padding: 0px;
+ }
+ .shell {
+ width: 100%;
+ }
+
+ .jsp {
+ border-style: solid;
+ width: 100%;
+ height: 200px;
+ }
+ .jspResult {
+ border-style: none;
+ width: 100%;
+ height: 200px;
+ padding: 5px;
+ }
+ .jspResultHeader {
+ background-color: #818EBD;
+ color: white;
+ width: 100%;
+ height: 15px;
+ }
+ .jspResultHeader span {
+ padding: 5px;
+ }
+ .classSrc {
+ font-family:Courier;
+ font-size:11px;
+ line-height:13px;
+ overflow: auto;
+ height: 400px;
+ width: 100%;
+ }
+ .tabContainer {
+ width: 1000px;
+ margin: 0 auto;
+ }
+ .guideContainer {
+ width: 600px;
+ border-width: 1px;
+ border-style: solid;
+ margin: 0 auto;
+ }
+ .guide {
+ padding: 5px;
+ }
+ pre {
+ font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;
+ font-style: italic;
+ }
+ span.kw {
+ color: rgb(127, 0, 85);
+ font-weight: bold;;
+ }
+ </style>
+</head>
+
+<sx:bind id="guideBind" targets="guide" listenTopics="/loadContent"/>
+
+<body>
+ <sx:tabbedpanel id="mainTabContainer" cssClass="tabContainer">
+ <sx:div label="OGNL Console" id="ognlTab">
+ <div id="shell" class="shell">
+ <form onsubmit="return false" id="wc-form">
+ <div class="wc-results" id="wc-result">
+ Welcome to the OGNL console!
+ <br />
+ :->
+ </div>
+ <input type="hidden" name="debug" value="command" />
+ OGNL Expression <input name="expression" onkeyup="keyEvent(event, '${jspEval}')" class="wc-command" id="wc-command" type="text" />
+ </form>
+ </div>
+ </sx:div>
+ <sx:div label="JSP Console" id="jspTab">
+ <table style="width: 100%" cellpadding="1">
+ <tr valign="top">
+ <td width="50%">
+ <form theme="simple" namespace="/nodecorate" action="jspEval" method="post">
+ <s:textarea cssClass="jsp" theme="simple" name="jsp" />
+ <sx:submit
+ value="Eval JSP Fragment"
+ href="%{#jspEval}"
+ targets="jspResult"
+ listenTopics="/evalJSP"/>
+ </form>
+ </td>
+ <td width="50%">
+ <div class="jspResultHeader">
+ <span>JSP Eval Result</span>
+ </div>
+ <div id="jspResult" class="jspResult">
+ </div>
+ </td>
+ </tr>
+ </table>
+ </sx:div>
+ <sx:div label="Class on top of the Value Stack" id="classTab">
+ <div id="classSrc" class="classSrc">
+ </div>
+ </sx:div>
+ </sx:tabbedpanel>
+ <br/><br/>
+ <div class="guideContainer">
+ <div class="jspResultHeader">
+ <span>Interactive Guide</span>
+ </div>
+ <sx:div id="guide" listenTopics="/reloadGuide" cssClass="guide">
+ <p><a href="#" onclick="startOgnl()">Start OGNL Interactive Demo</a></p>
+ <p><a href="#" onclick="startJSP()">Start JSP Interactive Demo</a></p>
+ </sx:div>
+ <div>
+ <a href="#" id="previous" onclick="change(-1)" style="float: left"><< Previous</a>
+ <a href="#" id="next" onclick="change(1)" style="float: right">Next >></a>
+ </div>
+ </div>
+</body>
+
</html>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/index.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp Wed Oct 31 13:32:54 2007
@@ -1,62 +1,62 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>String Attributes</b>
-</p>
-<p>
- Some tag attributes are expected to be Strings in which case String literals
- can be passed as the value, like the <i>href</i> attribute in the <i>a</i> tag.
-</p>
-<p>
- <i>
- <s:a href="http://struts.apache.org/" />
- </i>
-</p>
-<p>
- If the value that you want to use in one of these string literal attributes is stored on the Value Stack,
- then the <i>%{#name}</i> syntax (alternative syntax) needs to be used. Assuming there is a value
- with the name "url" stored on the stack:
-</p>
-<p>
- <i>
- <s:a href="%{#url}" />
- </i>
-</p>
-<p>
- will create an anchor and use the value of "url" for the <i>href</i> attribute.
-</p>
-<p>
- <b>Value Attributes</b>
-</p>
-<p>
- Other attributes expect an object as their value(not an string literal). In these attributes you can specify
- the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the
- <i>value</i> attribute in the <i>property</i> tag. Assuming there is an object stored on the Value Stack with
- the name "movie", then:
-</p>
-<p>
- <i>
- <s:property value="movie" />
- </i>
-</p>
-<p>
- will print the value to the page. To pass an String literal to an attribute that expects a value use the <i>%{'string'}</i>
- notation.
-</p>
-<p>
- If you don't remember if an attribute expects an string literal or a value, you can always use the <i>%{value}</i> notation:
-</p>
-<p>
- <i>
- <s:a href="%{'http://struts.apache.org/'}" />
- <br />
- <s:property value="%{#movie}" />
- </i>
-</p>
-<p>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/tag-syntax.html')">[More details]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>String Attributes</b>
+</p>
+<p>
+ Some tag attributes are expected to be Strings in which case String literals
+ can be passed as the value, like the <i>href</i> attribute in the <i>a</i> tag.
+</p>
+<p>
+ <i>
+ <s:a href="http://struts.apache.org/" />
+ </i>
+</p>
+<p>
+ If the value that you want to use in one of these string literal attributes is stored on the Value Stack,
+ then the <i>%{#name}</i> syntax (alternative syntax) needs to be used. Assuming there is a value
+ with the name "url" stored on the stack:
+</p>
+<p>
+ <i>
+ <s:a href="%{#url}" />
+ </i>
+</p>
+<p>
+ will create an anchor and use the value of "url" for the <i>href</i> attribute.
+</p>
+<p>
+ <b>Value Attributes</b>
+</p>
+<p>
+ Other attributes expect an object as their value(not an string literal). In these attributes you can specify
+ the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the
+ <i>value</i> attribute in the <i>property</i> tag. Assuming there is an object stored on the Value Stack with
+ the name "movie", then:
+</p>
+<p>
+ <i>
+ <s:property value="movie" />
+ </i>
+</p>
+<p>
+ will print the value to the page. To pass an String literal to an attribute that expects a value use the <i>%{'string'}</i>
+ notation.
+</p>
+<p>
+ If you don't remember if an attribute expects an string literal or a value, you can always use the <i>%{value}</i> notation:
+</p>
+<p>
+ <i>
+ <s:a href="%{'http://struts.apache.org/'}" />
+ <br />
+ <s:property value="%{#movie}" />
+ </i>
+</p>
+<p>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/tag-syntax.html')">[More details]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_0.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp Wed Oct 31 13:32:54 2007
@@ -1,52 +1,52 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Print property value, using the <i>property tag</i></b>
-</p>
-<p>
- On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions.
- The <i>property</i> tag is used to print to the page the result of an OGNL expression. The expression
- is specified in the <i>value</i> attribute.
-</p>
-<p>To print the value of the expression <i>name</i> to the page type:
-<p>
- <i id="example0">
- <s:property value="name" />
- </i>
-</p>
-<p>
- on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
-</p>
-<p>
- As you saw in the OGNL demo, to print a property of an object that is not on top of the stack,
- use the <i>#object.property</i> notation.
-</p>
-<p>To print the value for the key "struts.view_uri" in <i>request</i> to the page type:
-<p>
- <i id="example1">
- <s:property value="#request['struts.view_uri']" />
- </i>
-</p>
-<p>
- on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
-</p>
-<p>
- <b>Print property value, using the <i>$</i> operator</b>
-</p>
-<p>Use the <i>${name}</i> notation to print values from the Value Stack to the page.
-<p>To print the value of the expression <i>name</i> to the page type:
-<p>
- <i id="example2">
- ${name}
- </i>
-</p>
-<p>
- on the JSP console and hit enter. <a href="#" onclick="execJSP('example2')">Do it for me</a>
-</p>
-<p>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More details]</a>
-</p>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Print property value, using the <i>property tag</i></b>
+</p>
+<p>
+ On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions.
+ The <i>property</i> tag is used to print to the page the result of an OGNL expression. The expression
+ is specified in the <i>value</i> attribute.
+</p>
+<p>To print the value of the expression <i>name</i> to the page type:
+<p>
+ <i id="example0">
+ <s:property value="name" />
+ </i>
+</p>
+<p>
+ on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
+</p>
+<p>
+ As you saw in the OGNL demo, to print a property of an object that is not on top of the stack,
+ use the <i>#object.property</i> notation.
+</p>
+<p>To print the value for the key "struts.view_uri" in <i>request</i> to the page type:
+<p>
+ <i id="example1">
+ <s:property value="#request['struts.view_uri']" />
+ </i>
+</p>
+<p>
+ on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
+</p>
+<p>
+ <b>Print property value, using the <i>$</i> operator</b>
+</p>
+<p>Use the <i>${name}</i> notation to print values from the Value Stack to the page.
+<p>To print the value of the expression <i>name</i> to the page type:
+<p>
+ <i id="example2">
+ ${name}
+ </i>
+</p>
+<p>
+ on the JSP console and hit enter. <a href="#" onclick="execJSP('example2')">Do it for me</a>
+</p>
+<p>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More details]</a>
+</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_1.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp Wed Oct 31 13:32:54 2007
@@ -1,54 +1,54 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b><i>if</i> tag</b>
-</p>
-<p>
- The <i>if</i> tag allows you to optionally execute a JSP section. Multiple <i>elseif</i> tags
- and one <i>else</i> tag can be associated to an <i>if tag</i>.
-</p>
-<p>
- To say hello to John Galt type:
-</p>
-<p>
- <pre id="example0">
- <s:if test="name == 'John Galt'">
- Hi John
- </s:if>
- <s:else>
- I don't know you!
- </s:else>
- </pre>
-</p>
-<p>
- on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
-</p>
-<p>
- <b><i>iterator</i> tag</b>
-</p>
-<p>
- The <i>iterator</i> tag loops over an <i>Iterable</i> object one object at a time into
- the Value Stack (the value will be on top of the stack).
-</p>
-<p>
- To print the all the elements in the "bands" property type:
-</p>
-<p>
- <pre id="example1">
- <s:iterator value="bands">
- <s:property />
- <br />
- </s:iterator>
- </pre>
-</p>
-<p>
- on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
-</p>
-<p>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More on the <i>if</i> tag]</a>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/iterator.html')">[More on the <i>iterator</i> tag]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b><i>if</i> tag</b>
+</p>
+<p>
+ The <i>if</i> tag allows you to optionally execute a JSP section. Multiple <i>elseif</i> tags
+ and one <i>else</i> tag can be associated to an <i>if tag</i>.
+</p>
+<p>
+ To say hello to John Galt type:
+</p>
+<p>
+ <pre id="example0">
+ <s:if test="name == 'John Galt'">
+ Hi John
+ </s:if>
+ <s:else>
+ I don't know you!
+ </s:else>
+ </pre>
+</p>
+<p>
+ on the JSP console and hit enter. <a href="#" onclick="execJSP('example0')">Do it for me</a>
+</p>
+<p>
+ <b><i>iterator</i> tag</b>
+</p>
+<p>
+ The <i>iterator</i> tag loops over an <i>Iterable</i> object one object at a time into
+ the Value Stack (the value will be on top of the stack).
+</p>
+<p>
+ To print the all the elements in the "bands" property type:
+</p>
+<p>
+ <pre id="example1">
+ <s:iterator value="bands">
+ <s:property />
+ <br />
+ </s:iterator>
+ </pre>
+</p>
+<p>
+ on the JSP console and hit enter. <a href="#" onclick="execJSP('example1')">Do it for me</a>
+</p>
+<p>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/property.html')">[More on the <i>if</i> tag]</a>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/iterator.html')">[More on the <i>iterator</i> tag]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_2.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp Wed Oct 31 13:32:54 2007
@@ -1,65 +1,65 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b><i>set</i> tag</b>
-</p>
-<p>
- The <i>set</i> tag sets the variable with the name specified in the <i>name</i> attribute to
- the value specified in the <i>value</i> attribute in the scope
- entered in the <i>scope</i> attribute. The available scopes are:
- <ul>
- <li>application - application scope according to servlet spec</li>
- <li>session - session scope according to servlet spec</li>
- <li>request - request scope according to servlet spec</li>
- <li>page - page scope according to servlet sepc</li>
- <li>action - the value will be set in the request scope and Struts' action context</li>
-
- </ul>
-</p>
-<p>
- This example sets <i>favouriteBand</i> in the request scope to the first element of the <i>bands</i> property:
-</p>
-<p>
- <pre id="example0">
- <s:set name="favouriteBand" value="bands[0]" />
- <s:property value="#favouriteBand" />
- </pre>
-</p>
-<p>
- <a href="#" onclick="execJSP('example0')">Do it for me</a>
-</p>
-<p>
- <b><i>url</i> tag</b>
-</p>
-<p>
- The <i>url</i> tag is used to build urls (who would have guessed!). To build an url mapping to
- an action, set the <i>namespace</i> and <i>action</i> attributes. The url will be stored under
- the name specified in the <i>id</i> attribute. <b>url tag uses the <i>id</i> attribute while
- the <i>set</i> tag uses name</b>. To specify a value (no action lookup), just use the <i>value</i>
- attribute. <i>param</i> tags can be nested inside the <i>url</i> tag to add parameters to the url.
-</p>
-<p>
- First link creates a url that maps to an action, second one creates a url to google, passing one parameter:
-</p>
-<p>
- <pre id="example1">
- <s:url id="evalAction" namespace="/nodecorate" action="jspEval" />
- <s:a href="%{#evalAction}" >Eval</s:a>
-
- <s:url id="google" value="http://www.google.com" >
- <s:param name="q" value="%{'Struts 2'}" />
- </s:url>
- <s:a href="%{#google}" >Eval</s:a>
- </pre>
-</p>
-<p>
- <a href="#" onclick="execJSP('example1')">Do it for me</a>
-</p>
-<p>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/set.html')">[More on the <i>set</i> tag]</a>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/url.html')">[More on the <i>url</i> tag]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b><i>set</i> tag</b>
+</p>
+<p>
+ The <i>set</i> tag sets the variable with the name specified in the <i>name</i> attribute to
+ the value specified in the <i>value</i> attribute in the scope
+ entered in the <i>scope</i> attribute. The available scopes are:
+ <ul>
+ <li>application - application scope according to servlet spec</li>
+ <li>session - session scope according to servlet spec</li>
+ <li>request - request scope according to servlet spec</li>
+ <li>page - page scope according to servlet sepc</li>
+ <li>action - the value will be set in the request scope and Struts' action context</li>
+
+ </ul>
+</p>
+<p>
+ This example sets <i>favouriteBand</i> in the request scope to the first element of the <i>bands</i> property:
+</p>
+<p>
+ <pre id="example0">
+ <s:set name="favouriteBand" value="bands[0]" />
+ <s:property value="#favouriteBand" />
+ </pre>
+</p>
+<p>
+ <a href="#" onclick="execJSP('example0')">Do it for me</a>
+</p>
+<p>
+ <b><i>url</i> tag</b>
+</p>
+<p>
+ The <i>url</i> tag is used to build urls (who would have guessed!). To build an url mapping to
+ an action, set the <i>namespace</i> and <i>action</i> attributes. The url will be stored under
+ the name specified in the <i>id</i> attribute. <b>url tag uses the <i>id</i> attribute while
+ the <i>set</i> tag uses name</b>. To specify a value (no action lookup), just use the <i>value</i>
+ attribute. <i>param</i> tags can be nested inside the <i>url</i> tag to add parameters to the url.
+</p>
+<p>
+ First link creates a url that maps to an action, second one creates a url to google, passing one parameter:
+</p>
+<p>
+ <pre id="example1">
+ <s:url id="evalAction" namespace="/nodecorate" action="jspEval" />
+ <s:a href="%{#evalAction}" >Eval</s:a>
+
+ <s:url id="google" value="http://www.google.com" >
+ <s:param name="q" value="%{'Struts 2'}" />
+ </s:url>
+ <s:a href="%{#google}" >Eval</s:a>
+ </pre>
+</p>
+<p>
+ <a href="#" onclick="execJSP('example1')">Do it for me</a>
+</p>
+<p>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/set.html')">[More on the <i>set</i> tag]</a>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/url.html')">[More on the <i>url</i> tag]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_3.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp Wed Oct 31 13:32:54 2007
@@ -1,16 +1,16 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>More on JSP tags</b>
-</p>
-<p>
- Struts 2 provides many more tags which you can learn about
- <a href="#" onclick="window.open('http://cwiki.apache.org/confluence/display/WW/Tag+Reference')">here</a>
-</p>
-<br/>
-You can keep playing with the JSP console or
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>More on JSP tags</b>
+</p>
+<p>
+ Struts 2 provides many more tags which you can learn about
+ <a href="#" onclick="window.open('http://cwiki.apache.org/confluence/display/WW/Tag+Reference')">here</a>
+</p>
+<br/>
+You can keep playing with the JSP console or
<a href="#" onclick="startOgnl()">Start OGNL Interactive Demo</a>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/jsp_4.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp Wed Oct 31 13:32:54 2007
@@ -1,30 +1,30 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Accessing properties</b>
-</p>
-<p>
- The framework uses a standard naming context to evaluate OGNL expressions.
- The top level object dealing with OGNL is a Map (usually referred as a context map or context).
- OGNL has a notion of there being a root (or default) object within the context.
- In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion.
- References to other objects are marked with a pound sign (#).
-
- In this example (and in your JSP pages) the last action executed will be on the top of the stack.
-</p>
-<p>
- <a href="#" onclick="selectClassSrcTab()">This action</a> is available on the third tab above.
- To access the <i>name</i> field type:
-</p>
-<p>
- <i id="example">
- name
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Accessing properties</b>
+</p>
+<p>
+ The framework uses a standard naming context to evaluate OGNL expressions.
+ The top level object dealing with OGNL is a Map (usually referred as a context map or context).
+ OGNL has a notion of there being a root (or default) object within the context.
+ In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion.
+ References to other objects are marked with a pound sign (#).
+
+ In this example (and in your JSP pages) the last action executed will be on the top of the stack.
+</p>
+<p>
+ <a href="#" onclick="selectClassSrcTab()">This action</a> is available on the third tab above.
+ To access the <i>name</i> field type:
+</p>
+<p>
+ <i id="example">
+ name
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_0.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp Wed Oct 31 13:32:54 2007
@@ -1,28 +1,28 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Accessing nested properties</b>
-</p>
-<p>
- To access nested properties, use the dot "." operator to concatenate the property names. The action
- class has a <i>book</i> field, with <i>title</i> and <i>author</i> fields.
-</p>
-<p>
- To access the name of the book type:
-</p>
-<p>
- <i id="example">
- book.title
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/properties.html')">[More details]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Accessing nested properties</b>
+</p>
+<p>
+ To access nested properties, use the dot "." operator to concatenate the property names. The action
+ class has a <i>book</i> field, with <i>title</i> and <i>author</i> fields.
+</p>
+<p>
+ To access the name of the book type:
+</p>
+<p>
+ <i id="example">
+ book.title
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/properties.html')">[More details]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_1.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp Wed Oct 31 13:32:54 2007
@@ -1,43 +1,43 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Accessing properties inside Arrays</b>
-</p>
-<p>
- To access properties inside arrays, use the brackets "[]" operators with the desired index(starting from 0). The action
- class has an array of String in the field <i>bands</i>.
-</p>
-<p>
- To access the second element in the <i>bands</i> array type:
-</p>
-<p>
- <i id="example0">
- bands[1]
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
-</p>
-<p>
- <b>Accessing properties inside Lists</b>
-</p>
-<p>Lists can be accessed on the same way. The action class has a List of String on the field <i>movies</i>.</p>
-<p>
- To access the first element in the <i>movies</i> list type:
-</p>
-<p>
- <i id="example1">
- movies[0]
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/indexing.html#N10184')">[More details]</a>
-</p>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Accessing properties inside Arrays</b>
+</p>
+<p>
+ To access properties inside arrays, use the brackets "[]" operators with the desired index(starting from 0). The action
+ class has an array of String in the field <i>bands</i>.
+</p>
+<p>
+ To access the second element in the <i>bands</i> array type:
+</p>
+<p>
+ <i id="example0">
+ bands[1]
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
+</p>
+<p>
+ <b>Accessing properties inside Lists</b>
+</p>
+<p>Lists can be accessed on the same way. The action class has a List of String on the field <i>movies</i>.</p>
+<p>
+ To access the first element in the <i>movies</i> list type:
+</p>
+<p>
+ <i id="example1">
+ movies[0]
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/indexing.html#N10184')">[More details]</a>
+</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_2.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp Wed Oct 31 13:32:54 2007
@@ -1,54 +1,54 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Accessing properties inside Maps</b>
-</p>
-<p>
- To access properties inside maps, use the brackets "[]" operators with the desired key. The action
- class has a map of Book objects in the field <i>books</i>.
-</p>
-<p>
- To access the book with key "Iliad" in the <i>books</i> map type:
-</p>
-<p>
- <i id="example0">
- books['Iliad']
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
-</p>
-<p>If the key does not have spaces in it, you can access an element in the map, using the dot "." operator.</p>
-<p>
- To access the book with key "Iliad" in the <i>books</i> map type:
-</p>
-<p>
- <i id="example1">
- books.Iliad
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
-</p>
-<p>
- Note that the object returned is of type Book. If you want to access one of its properties, you can do so using the dot
- "." operator as you did before.</p>
-<p>
- To access the <i>author</i> property of the book with key "Iliad" in the <i>books</i> map type:
-</p>
-<p>
- <i id="example2">
- books['Iliad'].author
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/indexing.html#N10184')">[More details]</a>
-</p>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Accessing properties inside Maps</b>
+</p>
+<p>
+ To access properties inside maps, use the brackets "[]" operators with the desired key. The action
+ class has a map of Book objects in the field <i>books</i>.
+</p>
+<p>
+ To access the book with key "Iliad" in the <i>books</i> map type:
+</p>
+<p>
+ <i id="example0">
+ books['Iliad']
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
+</p>
+<p>If the key does not have spaces in it, you can access an element in the map, using the dot "." operator.</p>
+<p>
+ To access the book with key "Iliad" in the <i>books</i> map type:
+</p>
+<p>
+ <i id="example1">
+ books.Iliad
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
+</p>
+<p>
+ Note that the object returned is of type Book. If you want to access one of its properties, you can do so using the dot
+ "." operator as you did before.</p>
+<p>
+ To access the <i>author</i> property of the book with key "Iliad" in the <i>books</i> map type:
+</p>
+<p>
+ <i id="example2">
+ books['Iliad'].author
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/indexing.html#N10184')">[More details]</a>
+</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_3.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp Wed Oct 31 13:32:54 2007
@@ -1,32 +1,32 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Accessing properties on the stack</b>
-</p>
-<p>
- Object that are not on the top of the Value Stack are accessed using the "#name" notation.
- Some objects are always pushed into the stack by Struts, like:
-</p>
-<ul>
- <li>#application</li>
- <li>#session</li>
- <li>#request</li>
- <li>#parameters</li>
-</ul>
-<p>To see the value of the first parameter type:</p>
-<p>
- <i id="example">
- #parameters['debug'][0]
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/ognl.html')">[More details]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Accessing properties on the stack</b>
+</p>
+<p>
+ Object that are not on the top of the Value Stack are accessed using the "#name" notation.
+ Some objects are always pushed into the stack by Struts, like:
+</p>
+<ul>
+ <li>#application</li>
+ <li>#session</li>
+ <li>#request</li>
+ <li>#parameters</li>
+</ul>
+<p>To see the value of the first parameter type:</p>
+<p>
+ <i id="example">
+ #parameters['debug'][0]
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://struts.apache.org/2.x/docs/ognl.html')">[More details]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_4.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp Wed Oct 31 13:32:54 2007
@@ -1,37 +1,37 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Static fields</b>
-</p>
-<p>
- Static fields can easily be accessed in OGNL expressions using the notation
- <i>@some.package.ClassName@PROPERTY_NAME</i> for properties, and <i>@some.package.ClassName@METHOD_NAME()</i>
- for methods.
-</p>
-<p>To access the value of the <i>CONSTANT</i> field in the ExampleAction type:</p>
-<p>
- <i id="example0">
- @org.apache.struts2.showcase.action.ExampleAction@CONSTANT
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
-</p>
-<p>To execute the static method <i>getCurrentDate</i> in the ExampleAction type:</p>
-<p>
- <i id="example1">
- @org.apache.struts2.showcase.action.ExampleAction@getCurrentDate()
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/staticFields.html')">[More details on static fields]</a>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/staticMethods.html')">[More details on static methods]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Static fields</b>
+</p>
+<p>
+ Static fields can easily be accessed in OGNL expressions using the notation
+ <i>@some.package.ClassName@PROPERTY_NAME</i> for properties, and <i>@some.package.ClassName@METHOD_NAME()</i>
+ for methods.
+</p>
+<p>To access the value of the <i>CONSTANT</i> field in the ExampleAction type:</p>
+<p>
+ <i id="example0">
+ @org.apache.struts2.showcase.action.ExampleAction@CONSTANT
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
+</p>
+<p>To execute the static method <i>getCurrentDate</i> in the ExampleAction type:</p>
+<p>
+ <i id="example1">
+ @org.apache.struts2.showcase.action.ExampleAction@getCurrentDate()
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/staticFields.html')">[More details on static fields]</a>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/staticMethods.html')">[More details on static methods]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_5.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp Wed Oct 31 13:32:54 2007
@@ -1,25 +1,25 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Calling methods</b>
-</p>
-<p>
- OGNL follows Java's syntax to execute a method.
-</p>
-<p>To execute the <i>getTitle()</i> method on the <i>book</i> object type:</p>
-<p>
- <i id="example">
- book.getTitle()
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/methods.html')">[More details]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Calling methods</b>
+</p>
+<p>
+ OGNL follows Java's syntax to execute a method.
+</p>
+<p>To execute the <i>getTitle()</i> method on the <i>book</i> object type:</p>
+<p>
+ <i id="example">
+ book.getTitle()
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/methods.html')">[More details]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_6.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp Wed Oct 31 13:32:54 2007
@@ -1,43 +1,43 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>Expressions</b>
-</p>
-<p>
- OGNL supports expressions using primitive values.
-</p>
-<p>Arithmetic:</p>
-<p>
- <i id="example0">
- (6 - 2)/2
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
-</p>
-<p>Logical:</p>
-<p>
- <i id="example1">
- (true || false) and true
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
-</p>
-<p>Equality:</p>
-<p>
- <i id="example2">
- 'a' == 'a'
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
-</p>
-<p>
- OGNL supports many more operators and expressions, see <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/apa.html#operators')">[Operators Reference]</a>
- for more details.
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>Expressions</b>
+</p>
+<p>
+ OGNL supports expressions using primitive values.
+</p>
+<p>Arithmetic:</p>
+<p>
+ <i id="example0">
+ (6 - 2)/2
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
+</p>
+<p>Logical:</p>
+<p>
+ <i id="example1">
+ (true || false) and true
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
+</p>
+<p>Equality:</p>
+<p>
+ <i id="example2">
+ 'a' == 'a'
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
+</p>
+<p>
+ OGNL supports many more operators and expressions, see <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/apa.html#operators')">[Operators Reference]</a>
+ for more details.
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_7.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp Wed Oct 31 13:32:54 2007
@@ -1,55 +1,55 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p><b>Creating arrays</b></p>
-<p>
- OGNL follows Java syntax to create arrys.
-</p>
-<p>
- Create an array of integers:
-</p>
-<p>
- <i id="example0">
- new int[] {0, 1, 2}
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
-</p>
-<p><b>Creating lists</b></p>
-<p>
- To create a list, enclose a list of comma separated expression in a pair of braces.
-</p>
-<p>
- Create a list of Strings:
-</p>
-<p>
- <i id="example1">
- {'Is', 'there', 'any', 'body', 'out', 'there?'}
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
-</p>
-<p><b>Creating maps</b></p>
-<p>
- To create a map, use the syntax #@MAP_TYPE@{key:value}.
-</p>
-<p>
- Create a LinkedHashMap:
-</p>
-<p>
- <i id="example2">
- #@java.util.LinkedHashMap@{'name': 'John Galt', 'job' : 'Engineer'}
- </i>
-</p>
-<p>
- on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
-</p>
-<br/>
-<p>
- <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/collectionConstruction.html#listConstruction')">[More details]</a>
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p><b>Creating arrays</b></p>
+<p>
+ OGNL follows Java syntax to create arrys.
+</p>
+<p>
+ Create an array of integers:
+</p>
+<p>
+ <i id="example0">
+ new int[] {0, 1, 2}
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example0')">Do it for me</a>
+</p>
+<p><b>Creating lists</b></p>
+<p>
+ To create a list, enclose a list of comma separated expression in a pair of braces.
+</p>
+<p>
+ Create a list of Strings:
+</p>
+<p>
+ <i id="example1">
+ {'Is', 'there', 'any', 'body', 'out', 'there?'}
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example1')">Do it for me</a>
+</p>
+<p><b>Creating maps</b></p>
+<p>
+ To create a map, use the syntax #@MAP_TYPE@{key:value}.
+</p>
+<p>
+ Create a LinkedHashMap:
+</p>
+<p>
+ <i id="example2">
+ #@java.util.LinkedHashMap@{'name': 'John Galt', 'job' : 'Engineer'}
+ </i>
+</p>
+<p>
+ on the OGNL console and hit enter. <a href="#" onclick="execOgnl('example2')">Do it for me</a>
+</p>
+<br/>
+<p>
+ <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/collectionConstruction.html#listConstruction')">[More details]</a>
</p>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_8.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp Wed Oct 31 13:32:54 2007
@@ -1,18 +1,18 @@
-<%
- request.setAttribute("decorator", "none");
- response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
- response.setHeader("Pragma","no-cache"); //HTTP 1.0
- response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
-%>
-<p>
- <b>More on OGNL</b>
-</p>
-<p>
- There are a lot of OGNL features that we have not covered on this short tutorial.
-</p>
-<br/>
-<p>
- To learn more see the <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/index.html')">[OGNL Documentation]</a>
-</p>
-You can keep playing with the OGNL console or
+<%
+ request.setAttribute("decorator", "none");
+ response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+ response.setHeader("Pragma","no-cache"); //HTTP 1.0
+ response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+<p>
+ <b>More on OGNL</b>
+</p>
+<p>
+ There are a lot of OGNL features that we have not covered on this short tutorial.
+</p>
+<br/>
+<p>
+ To learn more see the <a href="#" onclick="window.open('http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/index.html')">[OGNL Documentation]</a>
+</p>
+You can keep playing with the OGNL console or
<a href="#" onclick="startJSP()">Start JSP Interactive Demo</a>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/interactive/ognl_9.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/person/listPeople.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/person/newPerson.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/forms.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/forms.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout-navtop-1col.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout-navtop-1col.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout-navtop-localleft.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout-navtop-localleft.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/layout.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/main.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/main.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/nav-horizontal.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/nav-horizontal.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/tools.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/tools.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/typo.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/styles/typo.css
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefix.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/actionPrefixExample.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/methodPrefix.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/normalSubmit.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/actionPrefix/redirectActionPrefix.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/debug.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/non-ui/ifTag/testIf.ftl
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp?rev=590812&r1=590811&r2=590812&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp Wed Oct 31 13:32:54 2007
@@ -1,25 +1,25 @@
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
-
-<html>
-<head>
- <title>UI Tags Example</title>
- <sx:head extraLocales="en-us,nl-nl,de-de" />
-</head>
-<body>
-<table>
-<sx:datetimepicker label="toggleType='wipe'" value="%{'2006-10-31'}" toggleType="wipe" toggleDuration="300" name="test"/>
-<sx:datetimepicker label="toggleType='explode'" value="%{'2006-07-22'}" toggleType="explode" toggleDuration="500" id="dp2"/>
-<sx:datetimepicker label="toggleType='fade'" value="%{'2006-06-30'}" toggleType="fade" toggleDuration="500"/>
-<sx:datetimepicker label="With value='today'" name="dddp1" value="%{'today'}" />
-<sx:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
-<sx:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="%{'2006-06-26'}" language="en-us" />
-<sx:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="%{'25/04/1969'}" displayFormat="dd/MM/yyyy" />
-<sx:datetimepicker label="In German" name="dddp7" value="%{'2006-06-28'}" language="de-de" />
-<sx:datetimepicker label="In Dutch" name="dddp8" value="%{'2006-06-28'}" language="nl-nl" />
-<sx:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="%{'2006-06-26'}" formatLength="long" language="en-us" />
-<sx:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="%{'2006-06-26'}" formatLength="long" language="de" />
-</table>
-</body>
-</html>
+
+<html>
+<head>
+ <title>UI Tags Example</title>
+ <sx:head extraLocales="en-us,nl-nl,de-de" />
+</head>
+<body>
+<table>
+<sx:datetimepicker label="toggleType='wipe'" value="%{'2006-10-31'}" toggleType="wipe" toggleDuration="300" name="test"/>
+<sx:datetimepicker label="toggleType='explode'" value="%{'2006-07-22'}" toggleType="explode" toggleDuration="500" id="dp2"/>
+<sx:datetimepicker label="toggleType='fade'" value="%{'2006-06-30'}" toggleType="fade" toggleDuration="500"/>
+<sx:datetimepicker label="With value='today'" name="dddp1" value="%{'today'}" />
+<sx:datetimepicker label="US format, empty" name="dddp2" language="en-us" />
+<sx:datetimepicker label="US format with initial date of 2006-06-26" name="dddp3" value="%{'2006-06-26'}" language="en-us" />
+<sx:datetimepicker label="With initial date of 1969-04-25 and a custom format dd/MM/yyyy" name="dddp5" value="%{'25/04/1969'}" displayFormat="dd/MM/yyyy" />
+<sx:datetimepicker label="In German" name="dddp7" value="%{'2006-06-28'}" language="de-de" />
+<sx:datetimepicker label="In Dutch" name="dddp8" value="%{'2006-06-28'}" language="nl-nl" />
+<sx:datetimepicker label="US format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp12" value="%{'2006-06-26'}" formatLength="long" language="en-us" />
+<sx:datetimepicker label="German format with initial date of 2006-06-26 and long formatting (parse not supported)" name="dddp13" value="%{'2006-06-26'}" formatLength="long" language="de" />
+</table>
+</body>
+</html>
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL