You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by do...@apache.org on 2005/02/22 23:49:06 UTC
svn commit: r154903 - in
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml: ./
Controller.jpf Template.jsp Test.jsp
Author: dolander
Date: Tue Feb 22 14:49:04 2005
New Revision: 154903
URL: http://svn.apache.org/viewcvs?view=rev&rev=154903
Log:
Repo for Jira 273 -- Templates writing out in a mix of HTML/XHTML
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Template.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Test.jsp
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Controller.jpf
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Controller.jpf?view=auto&rev=154903
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Controller.jpf (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Controller.jpf Tue Feb 22 14:49:04 2005
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package template.xhtml;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
+@Jpf.Controller
+public class Controller extends PageFlowController
+{
+ private String _hiddenIn = "hidden input";
+ private String[] _selectOptions = {"Select One", "Select Two", "Select Three"};
+ private String _selectedValue;
+ private String _hiddenValue;;
+ private String _search;
+
+ public String getHiddenIn() {
+ return _hiddenIn;
+ }
+ public String[] getSelectOptions() {
+ return _selectOptions;
+ }
+
+ public String getSelectedValue() {
+ return _selectedValue;
+ }
+ public void setSelectedValue(String value) {
+ _selectedValue = value;
+ }
+
+ public String getHiddendValue() {
+ return _hiddenValue;
+ }
+ public void setHiddenValue(String value) {
+ _hiddenValue = value;
+ }
+
+ public String getSearch() {
+ return _search;
+ }
+ public void setSearch(String value) {
+ _search = value;
+ }
+
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="Test.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success", path = "Test.jsp")
+ })
+ protected Forward post() {
+ Forward forward = new Forward("success");
+
+ return forward;
+ }
+
+ @Jpf.Action(forwards = {
+ @Jpf.Forward(name = "success", path = "Test.jsp")
+ })
+ protected Forward search() {
+ Forward forward = new Forward("success");
+
+ return forward;
+ }
+}
+
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Template.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Template.jsp?view=auto&rev=154903
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Template.jsp (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Template.jsp Tue Feb 22 14:49:04 2005
@@ -0,0 +1,32 @@
+<%@ page language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="temp" %>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui" %>
+<netui:html documentType="xhtml1-transitional">
+ <head>
+ <title><temp:attribute name="title"/></title>
+ <netui:base />
+ </head>
+ <netui:body>
+ <h1><temp:attribute name="title"/></h1>
+ <p><netui:form action="search" style="display:inline">
+ <netui:textBox dataSource="pageFlow.search"/>
+ <netui:button value="Search"/>
+ </netui:form></p>
+ <table width="100%">
+ <tr><td valign="top">
+ <div style="height="200px">
+ <h4>'left' Section</h4>
+ <temp:includeSection name="left"/>
+ </div>
+ </td><td valign="top">
+ <div style="height="200px">
+ <h4>'right Section</h4>
+ <temp:includeSection name="right"/>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <hr>
+ Selected Value: <netui:span value="${pageFlow.selectedValue}"/>
+ </netui:body>
+</netui:html>
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Test.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Test.jsp?view=auto&rev=154903
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Test.jsp (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/template/xhtml/Test.jsp Tue Feb 22 14:49:04 2005
@@ -0,0 +1,16 @@
+<%@ page language="java"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="temp" %>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui" %>
+<temp:template templatePage="Template.jsp">
+ <temp:setAttribute name="title" value="Simple Test"/>
+ <temp:section name="left">
+ <netui:form action="post">
+ <netui:select dataSource="pageFlow.selectedValue"
+ optionsDataSource="${pageFlow.selectOptions}" /><br />
+ <netui:button value="submit"/>
+ </netui:form>
+ </temp:section>
+ <temp:section name="right">
+ Enter some value in the form fool....
+ </temp:section>
+</temp:template>