You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/10/12 23:12:54 UTC

svn commit: r463432 - in /myfaces/tomahawk/trunk: examples/simple/src/main/webapp/ examples/simple/src/main/webapp/dojo/ sandbox/examples/src/main/webapp/ sandbox/examples/src/main/webapp/dojo/

Author: werpu
Date: Thu Oct 12 14:12:53 2006
New Revision: 463432

URL: http://svn.apache.org/viewvc?view=rev&rev=463432
Log:
dojo infrastructure moving TOMAHAWK-733: moving the examples

Added:
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsole.jsp
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsolejsfonly.jsp
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/dojoimporttest.jsp
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/textareatestjsfonly.jsp
Removed:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/dojo/debugconsole.jsp
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/dojo/debugconsolejsfonly.jsp
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/dojo/dojoimporttest.jsp
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/dojo/textareatestjsfonly.jsp
Modified:
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsole.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsole.jsp?view=auto&rev=463432
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsole.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsole.jsp Thu Oct 12 14:12:53 2006
@@ -0,0 +1,76 @@
+<%@ page session="false" contentType="text/html;charset=utf-8" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
+
+<html>
+<head>
+    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"/>
+    <title>MyFaces - the free JSF Implementation</title>
+
+    <link rel="stylesheet" type="text/css" href="css/basic.css"/>
+
+</head>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+
+<body>
+<f:view>
+    <h:panelGroup>
+        <t:dojoInitializer require="dojo.widget.Editor" debug="true"/>
+        <t:dojoInitializer require="dojo.widget.DebugConsole"/>
+        <t:dojoInitializer require="dojo.widget.ResizeHandle"/>
+        <t:dojoInitializer require="dojo.widget.Button"/>
+        <f:verbatim>
+            <script type="text/javascript">
+                function generateSomeDebuggingInfo() {
+                    for (var x = 0; x < 10; x++) {
+                        dojo.debug(x + ": Here is some debugging info, should be 10 new lines");
+                    }
+                }
+            </script>
+
+            <p>Debugging Console. This widget, once loaded, will have djConfig output all debugging information to its
+                floating pane. Some debugging information won't go to the debugConsole before it loads, but there isn't
+                much that can be done about that. If you set djConfig = {isDebug:true} it will log to the bottom of the
+                screen (or some div if you set that) until the debugConsole finishes loading.</p>
+            <button id="go" class="dojo-button" onClick="generateSomeDebuggingInfo();">Generate Debugging info
+            </button>
+
+            <div dojoType="DebugConsole"
+                 title="Debug Console"
+                 iconSrc="images/flatScreen.gif"
+                 constrainToContainer="1"
+                 style="width: 700px; height: 500px; left: 200px;"
+                 hasShadow="true"
+                 resizable="true"
+                 displayCloseAction="true"
+                 layoutAlign="client"
+                >
+            </div>
+
+
+        </f:verbatim>
+    </h:panelGroup>
+
+</f:view>
+<%@ include file="../inc/page_footer.jsp" %>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsolejsfonly.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsolejsfonly.jsp?view=auto&rev=463432
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsolejsfonly.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/debugconsolejsfonly.jsp Thu Oct 12 14:12:53 2006
@@ -0,0 +1,63 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<html>
+	<head>
+		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
+		<title>MyFaces - the free JSF Implementation</title>
+
+		<link rel="stylesheet" type="text/css" href="css/basic.css" />
+	
+	</head>
+
+	<!--
+/*
+ * 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.
+ */
+//-->
+
+
+
+	<body>
+		<f:view>
+			<h:panelGroup>
+				<t:dojoInitializer require="dojo.widget.Editor" debug="true"/>	
+				<t:dojoInitializer require="dojo.widget.DebugConsole" debugAtAllCosts="false"/>	
+				<t:dojoInitializer require="dojo.widget.ResizeHandle" />	
+				<t:dojoInitializer debugConsole="true" expanded="true"/>
+					
+				<f:verbatim>
+					<script type="text/javascript" >
+						function generateSomeDebuggingInfo() {
+							for (var x=0; x<10; x++) {
+								dojo.debug(x + ": Here is some debugging info, should be 10 new lines");
+							
+							}
+							dojo.debug("also note the usage of the expanded attribute");
+							dojo.debug("this attribute set to true loads the expanded version");
+							dojo.debug("otherwise the non expanded version is loaded");
+						}
+					</script>
+				</f:verbatim>
+				<h:form>	
+				<h:commandButton id="triggerdojo" onclick="javascript:generateSomeDebuggingInfo();return false;" value="[Press me for debug infos]"></h:commandButton>
+				</h:form>
+			</h:panelGroup>
+		</f:view>
+		<%@include file="../inc/page_footer.jsp"%>
+	</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/dojoimporttest.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/dojoimporttest.jsp?view=auto&rev=463432
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/dojoimporttest.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/dojoimporttest.jsp Thu Oct 12 14:12:53 2006
@@ -0,0 +1,183 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<html>
+	<head>
+		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
+		<title>MyFaces - the free JSF Implementation</title>
+
+		<link rel="stylesheet" type="text/css" href="css/basic.css" />
+		<style>
+		body {
+			font-family: Arial, Helvetica, sans-serif;
+			padding: 0;
+			margin: 0;
+		}
+
+		.page {
+			padding: 20px 20px 20px 20px;
+		}
+
+		#outerbar {
+			padding: 10px;
+			color: white;
+			background-color: #667;
+			text-align: center;
+			position: relative;
+			left: 0px;
+			top: 0px;
+			width: 100%;
+			/* height: 30px; */
+		}
+  </STYLE>
+	</head>
+
+	<!--
+/*
+ * 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.
+ */
+//-->
+
+
+
+	<body>
+		<f:view>
+			<h:panelGroup>
+				<f:verbatim>
+					<script language="JavaScript" type="text/javascript">
+				
+						var built = false;
+						function buildEditor(){
+							if(built){ 
+								return;
+								// built.onClose(false, true);
+							}
+							var groups = [];
+							var ob = document.getElementById("outerbar");
+							var eb = document.getElementById("scriptEditorBlock");
+							var inputs = ob.getElementsByTagName("input");
+							for(var x=0; x<inputs.length; x++){
+								if((inputs[x].type == "checkbox")&&(inputs[x].checked)){
+									groups.push(inputs[x].name);
+									groups.push("|");
+								}
+							}
+							if(groups.length){
+								groups.pop();
+							}
+							
+							built = dojo.widget.createWidget("Editor", { items: groups }, eb);
+							dojo.fx.wipeOut(ob, 750);
+						}
+					</script>
+				</f:verbatim>
+
+
+
+
+				<t:dojoInitializer require="dojo.fx.*"/>	
+				<t:dojoInitializer require="dojo.widget.Editor"/>	
+
+								
+				<h:outputText value="Dojo import tests, you now can setup dojo by using the s:dojoInitializer component." />
+				<h:outputText value="this component provides you with the DjConfig flags and also allows you to import via require" />
+				
+
+				<f:verbatim>
+					<div id="outerbar">
+						<input type="checkbox" name="commandGroup">
+						Save/Cancel
+						<input type="checkbox" checked name="blockGroup">
+						Block Formatting + Fonts
+						<input type="checkbox" checked name="textGroup">
+						Text Formatting
+						<input type="checkbox" name="listGroup">
+						Lists
+						<input type="checkbox" checked name="justifyGroup">
+						Justification
+						<input type="checkbox" name="indentGroup">
+						Indention
+						<input type="checkbox" name="linkGroup">
+						Links and Images
+						<input type="checkbox" name="colorGroup">
+						Colors
+						<input type="button" onclick="buildEditor();" value="Build It!">
+					</div>
+
+					<div class="page" id="scriptEditorBlock">
+						<h3>
+							Select Your Toolbar Items And Then Edit This!
+						</h3>
+						<p>
+							Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam facilisis enim. Pellentesque in elit et lacus euismod dignissim. Aliquam dolor pede, convallis eget, dictum a, blandit ac, urna. Pellentesque sed nunc ut justo volutpat egestas. Class
+							aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. In erat. Suspendisse potenti. Fusce faucibus nibh sed nisi. Phasellus faucibus, dui a cursus dapibus, mauris nulla euismod velit, a lobortis turpis arcu vel dui.
+							Pellentesque fermentum ultrices pede. Donec auctor lectus eu arcu. Curabitur non orci eget est porta gravida. Aliquam pretium orci id nisi. Duis faucibus, mi non adipiscing venenatis, erat urna aliquet elit, eu fringilla lacus tellus quis erat. Nam
+							tempus ornare lorem. Nullam feugiat.
+						</p>
+					</div>
+
+					<div class="page dojo-Editor">
+						<h3>
+							Editable Content With Default Toolbar
+						</h3>
+						<ul>
+							<li>
+								Sed congue.
+							</li>
+							<li>
+								Aenean blandit sollicitudin mi.
+							</li>
+							<li>
+								Maecenas pellentesque.
+							</li>
+							<li>
+								Vivamus ac urna.
+							</li>
+						</ul>
+						<p>
+							Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin suscipit porta magna. Duis accumsan nunc in velit. Nam et nibh. Nulla facilisi. Cras venenatis urna et magna. Aenean magna mauris, bibendum sit amet, semper quis, aliquet nec, sapien.
+							Aliquam aliquam odio quis erat. Etiam est nisi, condimentum non, lacinia ac, vehicula laoreet, elit. Sed interdum augue sit amet quam dapibus semper. Nulla facilisi. Pellentesque lobortis erat nec quam.
+						</p>
+						<p>
+							Sed arcu magna, molestie at, fringilla in, sodales eu, elit. Curabitur mattis lorem et est. Quisque et tortor. Integer bibendum vulputate odio. Nam nec ipsum. Vestibulum mollis eros feugiat augue. Integer fermentum odio lobortis odio. Nullam mollis
+							nisl non metus. Maecenas nec nunc eget pede ultrices blandit. Ut non purus ut elit convallis eleifend. Fusce tincidunt, justo quis tempus euismod, magna nulla viverra libero, sit amet lacinia odio diam id risus. Ut varius viverra turpis. Morbi urna
+							elit, imperdiet eu, porta ac, pharetra sed, nisi. Etiam ante libero, ultrices ac, faucibus ac, cursus sodales, nisl. Praesent nisl sem, fermentum eu, consequat quis, varius interdum, nulla. Donec neque tortor, sollicitudin sed, consequat nec,
+							facilisis sit amet, orci. Aenean ut eros sit amet ante pharetra interdum.
+						</p>
+						<p>
+							Fusce rutrum pede eget quam. Praesent purus. Aenean at elit in sem volutpat facilisis. Nunc est augue, commodo at, pretium a, fermentum at, quam. Nam sit amet enim. Suspendisse potenti. Cras hendrerit rhoncus justo. Integer libero. Cum sociis
+							natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam erat volutpat. Sed adipiscing mi vel ipsum.
+						</p>
+						<p>
+							Sed aliquam, quam consectetuer condimentum bibendum, neque libero commodo metus, non consectetuer magna risus vitae eros. Pellentesque mollis augue id libero. Morbi nonummy hendrerit dui. Morbi nisi felis, fringilla ac, euismod vitae, dictum mollis,
+							pede. Integer suscipit, est sed posuere ullamcorper, ipsum lectus interdum nunc, quis blandit erat eros hendrerit pede. Vestibulum varius, elit id mattis mattis, nulla est feugiat ante, eget vestibulum augue eros ut odio. Maecenas euismod purus quis
+							felis. Ut hendrerit tincidunt est. Fusce euismod, nunc eu tempus tempor, purus ligula volutpat tellus, nec lacinia sapien enim id risus. Aliquam orci turpis, condimentum sed, sollicitudin vel, placerat in, purus. Proin tortor nisl, blandit quis,
+							imperdiet quis, scelerisque at, nisl. Maecenas suscipit fringilla erat. Curabitur consequat, dui blandit suscipit dictum, felis lectus imperdiet tellus, sit amet ornare risus mauris non ipsum. Fusce a purus. Vestibulum sodales. Sed porta ultrices
+							nibh. Vestibulum metus.
+						</p>
+					</div>
+
+				</f:verbatim>
+			</h:panelGroup>
+		</f:view>
+
+		<%@include file="../inc/page_footer.jsp"%>
+
+	</body>
+
+</html>
+

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/textareatestjsfonly.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/textareatestjsfonly.jsp?view=auto&rev=463432
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/textareatestjsfonly.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/dojo/textareatestjsfonly.jsp Thu Oct 12 14:12:53 2006
@@ -0,0 +1,64 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+
+<html>
+	<head>
+		<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
+		<title>MyFaces - the free JSF Implementation</title>
+
+		<link rel="stylesheet" type="text/css" href="css/basic.css" />
+	
+	</head>
+
+	<!--
+/*
+ * 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.
+ */
+//-->
+
+
+
+	<body>
+		<f:view>
+			<h:panelGroup>
+				<t:dojoInitializer require="dojo.widget.Editor"/>	
+				<h:form id="myForm">
+					<h:inputTextarea id="editarea2" styleClass="dojo-Editor" value="hello world">
+						
+					</h:inputTextarea>
+					<h:commandLink action="submitted" id="submitted" value="[Submit]"/>
+					
+					<%/* Alternate way to do it */%>
+					<h:inputTextarea id="myInputTextarea" value="Customized Toolbars"/>
+					<f:verbatim>
+					<script type="text/javascript">
+					<!--
+						var editorArgs = {
+			    			items: ["textGroup", "blockGroup", "justifyGroup", "colorGroup", "listGroup", "indentGroup", "linkGroup"]
+						};
+						var editor = dojo.widget.createWidget("Editor", editorArgs,
+			                                    dojo.byId("myForm:myInputTextarea"));
+					//--></script>
+					</f:verbatim>
+				</h:form>
+			</h:panelGroup>
+		
+		</f:view>
+		<%@include file="../inc/page_footer.jsp"%>
+	</body>
+</html>

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp?view=diff&rev=463432&r1=463431&r2=463432
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp Thu Oct 12 14:12:53 2006
@@ -83,6 +83,18 @@
                 <h:outputLink value="collapsiblePanel.jsf" ><f:verbatim>Collapsible Panel</f:verbatim></h:outputLink>
                 <h:outputLink value="testExceptions.jsf" ><f:verbatim>Test the custom error page - not really jsf stuff, but a demonstration how to print the real exception</f:verbatim></h:outputLink>
 				<h:outputLink value="panelGroup.jsf" ><f:verbatim>Panel Group</f:verbatim></h:outputLink>
+                <h:outputText value="Dojo Integration" />
+                <h:panelGrid style="padding-left:25px">
+                	<h:outputLink value="dojo/dojoimporttest.jsf">
+                		<f:verbatim>Dojo Library Import via t:dojoInitializer</f:verbatim>
+                	</h:outputLink>
+                	<h:outputLink value="dojo/textareatestjsfonly.jsf">
+                		<f:verbatim>Simple Integration of the Dojo Toolkit example</f:verbatim>
+                	</h:outputLink>
+                	<h:outputLink value="dojo/debugconsolejsfonly.jsf">
+                		<f:verbatim>The dojo Debug Console</f:verbatim>
+                	</h:outputLink>
+                </h:panelGrid>
                 <h:outputText value="Schedule" />
                 <h:panelGrid style="padding-left:25px">
                     <h:outputLink value="schedule1.jsf">

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?view=diff&rev=463432&r1=463431&r2=463432
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Thu Oct 12 14:12:53 2006
@@ -96,8 +96,7 @@
             <h:panelGrid style="padding-left:25px">
 	 			<h:commandLink action="go_scope_shop"><f:verbatim>Scopeshop1, an extended saveState Example showing a wizard</f:verbatim></h:commandLink>
            		<h:outputLink value="effect.jsf" ><f:verbatim>Effect - DOJO and script.aculo.us effects</f:verbatim></h:outputLink>
-	            <h:outputLink value="dojo/textareatestjsfonly.jsf"><f:verbatim>Integration of Dojo Toolkit</f:verbatim></h:outputLink>
-                <h:outputLink value="killSession.jsf"><f:verbatim>Kill Session - refreshes state</f:verbatim></h:outputLink>
+	            <h:outputLink value="killSession.jsf"><f:verbatim>Kill Session - refreshes state</f:verbatim></h:outputLink>
                 <h:outputLink value="typedNumberConvert.jsf"><f:verbatim>automatically convert the number to the correct type</f:verbatim></h:outputLink>
 
             </h:panelGrid>