myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r910205 - in /myfaces/tobago/trunk/example/demo/src/main/webapp: WEB-INF/tags/layout/overview.tag WEB-INF/tags/layout/overview.tagx WEB-INF/tags/layout/overview_xml.tagx menu.jsp
Date Mon, 15 Feb 2010 11:13:10 GMT
Author: lofwyr
Date: Mon Feb 15 11:13:09 2010
New Revision: 910205

URL: http://svn.apache.org/viewvc?rev=910205&view=rev
Log:
Demo: Fixing subView and integrate menu to have no problems with doublicate ids (occure with
JSPs and MyFaces 1.2).

Added:
    myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag   (contents,
props changed)
      - copied, changed from r909523, myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx
    myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx
  (contents, props changed)
      - copied, changed from r909523, myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx
Removed:
    myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx
    myfaces/tobago/trunk/example/demo/src/main/webapp/menu.jsp

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag
(from r909523, myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag&p1=myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx&r1=909523&r2=910205&rev=910205&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag Mon
Feb 15 11:13:09 2010
@@ -1,61 +1,90 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
 <!--
- * 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.
+* 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.
 -->
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
+<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
+
+<f:view locale="#{clientConfigController.locale}">
+  <tc:loadBundle basename="overview" var="overviewBundle"/>
+  <tc:page applicationIcon="icon/favicon.ico" label="#{overviewBundle.pageTitle} - #{title}"

+           id="page" width="1000px" height="750px">
+    <%-- fixme: #{title} will not evaluated correctly, because it will be evaluated "late",
but too late
+         fixme: and ${title} is not allowed, because it can't be provided with JSF 1.2 
+         fixme: With facelets this works. --%>
+    <f:facet name="menuBar">
+      <tc:menuBar>
+        <tc:menu label="#{overviewBundle.menu_config}">
+          <tc:menu label="#{overviewBundle.menu_themes}">
+            <tc:menuCommand action="#{clientConfigController.submit}">
+              <f:facet name="items">
+                <tc:selectOneRadio value="#{clientConfigController.theme}">
+                  <f:selectItems value="#{clientConfigController.themeItems}"/>
+                </tc:selectOneRadio>
+              </f:facet>
+            </tc:menuCommand>
+          </tc:menu>
+          <tc:menu label="#{overviewBundle.menu_locale}">
+            <tx:menuRadio action="#{clientConfigController.submit}"
+                          value="#{clientConfigController.locale}">
+              <f:selectItems value="#{clientConfigController.localeItems}"/>
+            </tx:menuRadio>
+          </tc:menu>
+          <%-- todo: may have something like immediate="true", but in this case, the value
will not switched --%>
+          <tx:menuCheckbox action="#{clientConfigController.submit}"
+                           label="#{overviewBundle.menu_debug}"
+                           value="#{clientConfigController.debugMode}"/>
+          <tc:menuCommand action="#{demo.resetSession}" label="Reset"/>
+        </tc:menu>
+
+        <tc:menu label="#{overviewBundle.menu_help}">
+          <tc:menuCommand
+              onclick="alert('#{overviewBundle.pageTitle}' + String.fromCharCode(10) + '#{info.version}'
+ String.fromCharCode(10) + '#{overviewBundle.tobago_url}' + String.fromCharCode(10))"
+              label="#{overviewBundle.menu_about}"/>
+          <tc:menuCommand onclick="LOG.show();" label="#{overviewBundle.menu_showLog}"
+                          rendered="#{clientConfigController.debugMode}"/>
+          <tc:menuCommand action="server-info" immediate="true"
+                          label="Server Info" disabled="#{! info.enabled}"/>
+        </tc:menu>
+      </tc:menuBar>
+
+    </f:facet>
+    <f:facet name="layout">
+      <tc:gridLayout border="0" columns="*;4*" margin="10px" rows="100px;fixed;*;fixed"/>
+    </f:facet>
+
+    <tc:cell spanX="2">
+      <jsp:include page="/header.jsp"/>
+    </tc:cell>
+
+    <tc:cell spanY="3">
+      <jsp:include page="/navigation.jsp"/>
+    </tc:cell>
+
+    <tc:messages/>
 
-<jsp:root version="2.0"
-          xmlns:tc="http://myfaces.apache.org/tobago/component"
-          xmlns:tx="http://myfaces.apache.org/tobago/extension"
-          xmlns:jsp="http://java.sun.com/JSP/Page"
-          xmlns:h="http://java.sun.com/jsf/html"
-          xmlns:layout="/WEB-INF/tags/layout"
-          xmlns:ui="http://java.sun.com/jsf/facelets"
-          xmlns:f="http://java.sun.com/jsf/core">
-  <jsp:directive.attribute name="title"/>
-  <f:view locale="#{clientConfigController.locale}">
-    <tc:loadBundle basename="overview" var="overviewBundle"/>
-    <tc:page applicationIcon="icon/favicon.ico" label="#{overviewBundle.pageTitle} - #{title}"
id="page" width="1000px"
-             height="750px">
-      <!-- fixme: #{title} will not evaluated correctly, because it will be evaluated
"late", but too late
-           fixme: and ${title} is not allowed, because it can't be provided with JSF 1.2
-->
-      <jsp:include page="/menu.jsp"/>
-      <f:facet name="layout">
-        <tc:gridLayout border="0" columns="*;4*"
-                       margin="10px" rows="100px;fixed;*;fixed"/>
-      </f:facet>
-
-      <tc:cell spanX="2">
-        <jsp:include page="/header.jsp"/>
-      </tc:cell>
-
-      <tc:cell spanY="3">
-        <jsp:include page="/navigation.jsp"/>
-      </tc:cell>
-
-      <tc:messages/>
-      
-      <tc:cell>
+    <tc:cell>
+      <f:subview id="content">
         <jsp:doBody/>
-      </tc:cell>
+      </f:subview>
+    </tc:cell>
+
+    <tc:cell>
+      <jsp:include page="/footer.jsp"/>
+    </tc:cell>
 
-      <tc:cell>
-        <jsp:include page="/footer.jsp"/>
-      </tc:cell>
-
-    </tc:page>
-  </f:view>
-</jsp:root>
+  </tc:page>
+</f:view>

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tag
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx
(from r909523, myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx?p2=myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx&p1=myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx&r1=909523&r2=910205&rev=910205&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview.tagx (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx
Mon Feb 15 11:13:09 2010
@@ -31,8 +31,45 @@
     <tc:page applicationIcon="icon/favicon.ico" label="#{overviewBundle.pageTitle} - #{title}"
id="page" width="1000px"
              height="750px">
       <!-- fixme: #{title} will not evaluated correctly, because it will be evaluated
"late", but too late
-           fixme: and ${title} is not allowed, because it can't be provided with JSF 1.2
-->
-      <jsp:include page="/menu.jsp"/>
+           fixme: and ${title} is not allowed, because it can't be provided with JSF 1.2

+           fixme: With facelets this works.-->
+      <f:facet name="menuBar">
+        <tc:menuBar>
+          <tc:menu label="#{overviewBundle.menu_config}">
+            <tc:menu label="#{overviewBundle.menu_themes}">
+              <tc:menuCommand action="#{clientConfigController.submit}">
+                <f:facet name="items">
+                  <tc:selectOneRadio value="#{clientConfigController.theme}">
+                    <f:selectItems value="#{clientConfigController.themeItems}"/>
+                  </tc:selectOneRadio>
+                </f:facet>
+              </tc:menuCommand>
+            </tc:menu>
+            <tc:menu label="#{overviewBundle.menu_locale}">
+              <tx:menuRadio action="#{clientConfigController.submit}"
+                            value="#{clientConfigController.locale}">
+                <f:selectItems value="#{clientConfigController.localeItems}"/>
+              </tx:menuRadio>
+            </tc:menu>
+            <!-- todo: may have something like immediate="true", but in this case, the
value will not switched -->
+            <tx:menuCheckbox action="#{clientConfigController.submit}"
+                             label="#{overviewBundle.menu_debug}"
+                             value="#{clientConfigController.debugMode}"/>
+            <tc:menuCommand action="#{demo.resetSession}" label="Reset"/>
+          </tc:menu>
+
+          <tc:menu label="#{overviewBundle.menu_help}">
+            <tc:menuCommand
+                onclick="alert('#{overviewBundle.pageTitle}' + String.fromCharCode(10) +
'#{info.version}' + String.fromCharCode(10) + '#{overviewBundle.tobago_url}' + String.fromCharCode(10))"
+                label="#{overviewBundle.menu_about}"/>
+            <tc:menuCommand onclick="LOG.show();" label="#{overviewBundle.menu_showLog}"
+                            rendered="#{clientConfigController.debugMode}"/>
+            <tc:menuCommand action="server-info" immediate="true"
+                            label="Server Info" disabled="#{! info.enabled}"/>
+          </tc:menu>
+        </tc:menuBar>
+
+      </f:facet>
       <f:facet name="layout">
         <tc:gridLayout border="0" columns="*;4*"
                        margin="10px" rows="100px;fixed;*;fixed"/>
@@ -47,9 +84,11 @@
       </tc:cell>
 
       <tc:messages/>
-      
+
       <tc:cell>
-        <jsp:doBody/>
+        <f:subview id="content">
+          <jsp:doBody/>
+        </f:subview>
       </tc:cell>
 
       <tc:cell>

Propchange: myfaces/tobago/trunk/example/demo/src/main/webapp/WEB-INF/tags/layout/overview_xml.tagx
------------------------------------------------------------------------------
    svn:mergeinfo = 



Mime
View raw message