You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/03/29 03:18:56 UTC

svn commit: r928557 - in /myfaces/tomahawk/trunk/examples/simple20/src/main/webapp: META-INF/templates/ dojo/

Author: lu4242
Date: Mon Mar 29 01:18:56 2010
New Revision: 928557

URL: http://svn.apache.org/viewvc?rev=928557&view=rev
Log:
update dojo examples to facelets

Added:
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/META-INF/templates/dojofooter.xhtml
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.xhtml
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.xhtml
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.xhtml
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.xhtml
Removed:
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.jsp
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.jsp
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.jsp
    myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.jsp

Added: myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/META-INF/templates/dojofooter.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/META-INF/templates/dojofooter.xhtml?rev=928557&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/META-INF/templates/dojofooter.xhtml (added)
+++ myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/META-INF/templates/dojofooter.xhtml Mon Mar 29 01:18:56 2010
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:h="http://java.sun.com/jsf/html"
+        xmlns:ui="http://java.sun.com/jsf/facelets"
+        xmlns:t="http://myfaces.apache.org/tomahawk">
+<body>
+<ui:composition>
+  <br/>
+  <br/>
+  <a href="../home.jsf">[HOME]</a>
+  &nbsp;
+  <a href="#{request.requestURI}.source">[SOURCE]</a>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.xhtml?rev=928557&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.xhtml (added)
+++ myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsole.xhtml Mon Mar 29 01:18:56 2010
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:h="http://java.sun.com/jsf/html"
+        xmlns:ui="http://java.sun.com/jsf/facelets"
+        xmlns:t="http://myfaces.apache.org/tomahawk">
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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>
+ <ui:composition template="/META-INF/templates/template.xhtml">
+  <ui:define name="body">
+    <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>
+  </ui:define>
+  <ui:define name="footer">
+     <ui:include src="/META-INF/templates/dojofooter.xhtml"/>
+  </ui:define>
+ </ui:composition>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.xhtml?rev=928557&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.xhtml (added)
+++ myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/debugconsolejsfonly.xhtml Mon Mar 29 01:18:56 2010
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:h="http://java.sun.com/jsf/html"
+        xmlns:ui="http://java.sun.com/jsf/facelets"
+        xmlns:t="http://myfaces.apache.org/tomahawk">
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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>
+ <ui:composition template="/META-INF/templates/template.xhtml">
+  <ui:define name="body">
+			<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>
+  </ui:define>
+  <ui:define name="footer">
+     <ui:include src="/META-INF/templates/dojofooter.xhtml"/>
+  </ui:define>
+ </ui:composition>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.xhtml?rev=928557&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.xhtml (added)
+++ myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/dojoimporttest.xhtml Mon Mar 29 01:18:56 2010
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:h="http://java.sun.com/jsf/html"
+        xmlns:ui="http://java.sun.com/jsf/facelets"
+        xmlns:t="http://myfaces.apache.org/tomahawk">
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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>
+ <ui:composition template="/META-INF/templates/template.xhtml">
+  <ui:define name="head">
+        <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>
+  </ui:define>
+  <ui:define name="body">
+			<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="true" name="blockGroup"/>
+						Block Formatting + Fonts
+						<input type="checkbox" checked="true" name="textGroup"/>
+						Text Formatting
+						<input type="checkbox" name="listGroup"/>
+						Lists
+						<input type="checkbox" checked="true" 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>
+  </ui:define>
+  <ui:define name="footer">
+     <ui:include src="/META-INF/templates/dojofooter.xhtml"/>
+  </ui:define>
+ </ui:composition>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.xhtml?rev=928557&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.xhtml (added)
+++ myfaces/tomahawk/trunk/examples/simple20/src/main/webapp/dojo/textareatestjsfonly.xhtml Mon Mar 29 01:18:56 2010
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:t="http://myfaces.apache.org/tomahawk">
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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>
+<ui:composition template="/META-INF/templates/template.xhtml">
+ <ui:define name="body">
+  <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>
+ </ui:define>
+  <ui:define name="footer">
+     <ui:include src="/META-INF/templates/dojofooter.xhtml"/>
+  </ui:define>
+</ui:composition>
+</body>
+</html>
\ No newline at end of file