myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r391386 - in /incubator/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/ tobago-example/tobago-example-addressbook/src/main/webapp/ tobago-example/tobago-example-demo/src/main/webapp/mini-howto/ tobago-examp...
Date Tue, 04 Apr 2006 18:58:12 GMT
Author: weber
Date: Tue Apr  4 11:58:10 2006
New Revision: 391386

URL: http://svn.apache.org/viewcvs?rev=391386&view=rev
Log:
fix for TOBAGO-10 (Combine the attributes label, labelWithAccessKey and accessKey to one attribute
label) part 2

Modified:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
    incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/editor.jsp
    incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/mini-howto/menubar.jsp
    incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/menubar.jsp
    incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tabControl.jsp
    incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
    incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
    incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/label.jsp
    incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/menuBar.jsp
    incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectBooleanCheckbox.jsp
    incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp
    incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/toolBar.jsp

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
(original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
Tue Apr  4 11:58:10 2006
@@ -133,6 +133,56 @@
     }
   }
 
+  public static void addClickAcceleratorKey(
+      FacesContext facesContext, String clientId, char key)
+      throws IOException {
+    addClickAcceleratorKey(facesContext, clientId, key, null);
+  }
+
+  public static void addClickAcceleratorKey(
+      FacesContext facesContext, String clientId, char key, String modifier)
+      throws IOException {
+    StringBuffer buffer
+        = createOnclickAcceleratorKeyJsStatement(clientId, key, modifier);
+    writeScriptLoader(facesContext, null, new String[] {buffer.toString()});
+  }
+
+  public static void addAcceleratorKey(
+      FacesContext facesContext, String func, char key) throws IOException {
+    addAcceleratorKey(facesContext, func, key, null);
+  }
+
+  public static void addAcceleratorKey(
+      FacesContext facesContext, String func, char key, String modifier)
+      throws IOException {
+    StringBuffer buffer = createAcceleratorKeyJsStatement(func, key, modifier);
+    writeScriptLoader(facesContext, null, new String[] {buffer.toString()});
+  }
+
+  public static StringBuffer createOnclickAcceleratorKeyJsStatement(
+      String clientId, char key, String modifier) {
+    String func = "Tobago.clickOnElement('" + clientId + "');";
+    return createAcceleratorKeyJsStatement(func, key, modifier);
+  }
+
+  public static StringBuffer createAcceleratorKeyJsStatement(
+      String func, char key, String modifier) {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append("new Tobago.AcceleratorKey(function() {");
+    buffer.append(func);
+    if (! func.endsWith(";")) {
+      buffer.append(';');
+    }
+    buffer.append("}, \"");
+    buffer.append(key);
+    if (modifier !=  null) {
+      buffer.append("\", \"");
+      buffer.append(modifier);
+    }
+    buffer.append("\");");
+    return buffer;
+  }
+
   public static String getLayoutSpaceStyle(UIComponent component) {
     StringBuffer sb = new StringBuffer();
     Integer space = LayoutUtil.getLayoutSpace(component, ATTR_LAYOUT_WIDTH,

Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/editor.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/editor.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/editor.jsp
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/editor.jsp
Tue Apr  4 11:58:10 2006
@@ -35,7 +35,7 @@
         <tc:messages />
 
         <tc:tabGroup>
-        <tc:tab labelWithAccessKey="#{bundle.editorTabPersonal}">
+        <tc:tab label="#{bundle.editorTabPersonal}">
           <tc:panel>
             <f:facet name="layout">
               <tc:gridLayout rows="fixed;fixed"/>
@@ -131,7 +131,7 @@
             </tc:panel>
           </tc:tab>
 
-          <tc:tab labelWithAccessKey="#{bundle.editorTabBusiness}">
+          <tc:tab label="#{bundle.editorTabBusiness}">
             <tc:panel>
               <f:facet name="layout">
                 <tc:gridLayout rows="fixed;fixed;fixed;fixed;fixed;1*" />
@@ -156,7 +156,7 @@
             </tc:panel>
           </tc:tab>
 
-          <tc:tab labelWithAccessKey="#{bundle.editorTabMisc}">
+          <tc:tab label="#{bundle.editorTabMisc}">
             <tc:panel>
               <f:facet name="layout">
                 <tc:gridLayout rows="1*" />
@@ -176,9 +176,9 @@
 
           <tc:cell />
           <tc:button action="#{controller.storeAddress}"
-              labelWithAccessKey="#{bundle.editorStore}" defaultCommand="true" />
+              label="#{bundle.editorStore}" defaultCommand="true" />
           <tc:button action="list" immediate="true"
-              labelWithAccessKey="#{bundle.editorCancel}" />
+              label="#{bundle.editorCancel}" />
         </tc:panel>
 
       </tc:box>

Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/mini-howto/menubar.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/mini-howto/menubar.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/mini-howto/menubar.jsp
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/mini-howto/menubar.jsp
Tue Apr  4 11:58:10 2006
@@ -18,7 +18,7 @@
 <%-- !!!!!! no <f:subview here !!!!!!! --%>
 <f:facet name="menuBar">
   <tc:menuBar>
-    <tc:menu labelWithAccessKey="#{overviewBundle.menu_navigate}">
+    <tc:menu label="#{overviewBundle.menu_navigate}">
       <tc:menuItem action="mini-howto/intro" immediate="true"
                   actionListener="#{miniHowtoNavigation.navigate}"
                   label="#{miniHowtoBundle.intro}"/>
@@ -50,15 +50,15 @@
     </tc:menu>
 
 
-    <tc:menu labelWithAccessKey="#{overviewBundle.menu_config}">
-      <tc:menu labelWithAccessKey="#{overviewBundle.menu_themes}">
+    <tc:menu label="#{overviewBundle.menu_config}">
+      <tc:menu label="#{overviewBundle.menu_themes}">
         <tc:menuradio value="#{clientConfigController.theme}"
                      action="#{clientConfigController.submit}"
             >
           <f:selectItems value="#{clientConfigController.themeItems}"/>
         </tc:menuradio>
       </tc:menu>
-      <tc:menu labelWithAccessKey="#{overviewBundle.menu_locale}">
+      <tc:menu label="#{overviewBundle.menu_locale}">
         <tc:menuradio value="#{clientConfigController.locale}"
                      action="#{clientConfigController.submit}">
           <f:selectItems value="#{clientConfigController.localeItems}"/>

Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/menubar.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/menubar.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/menubar.jsp
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/menubar.jsp
Tue Apr  4 11:58:10 2006
@@ -18,7 +18,7 @@
 <%-- !!!!!! no <f:subview here !!!!!!! --%>
       <f:facet name="menuBar" >
         <tc:menuBar >
-          <tc:menu labelWithAccessKey="#{overviewBundle.menu_navigate}">
+          <tc:menu label="#{overviewBundle.menu_navigate}">
             <tc:menuItem action="overview/intro" immediate="true"
                              actionListener="#{overviewNavigation.navigate}"
                              label="#{overviewBundle.intro}" />
@@ -61,14 +61,14 @@
                 type="navigate" label="#{overviewBundle.miniHowto}" />
 --%>
           </tc:menu>
-          <tc:menu labelWithAccessKey="#{overviewBundle.menu_config}" >
-            <tc:menu labelWithAccessKey="#{overviewBundle.menu_themes}" >
+          <tc:menu label="#{overviewBundle.menu_config}" >
+            <tc:menu label="#{overviewBundle.menu_themes}" >
               <tc:menuradio value="#{clientConfigController.theme}"
                   action="#{clientConfigController.submit}">
                 <f:selectItems value="#{clientConfigController.themeItems}" />
               </tc:menuradio>
             </tc:menu>
-            <tc:menu labelWithAccessKey="#{overviewBundle.menu_locale}">
+            <tc:menu label="#{overviewBundle.menu_locale}">
               <tc:menuradio value="#{clientConfigController.locale}"
                   action="#{clientConfigController.submit}">
                 <f:selectItems value="#{clientConfigController.localeItems}" />

Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tabControl.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tabControl.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tabControl.jsp
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/overview/tabControl.jsp
Tue Apr  4 11:58:10 2006
@@ -35,7 +35,7 @@
         <tc:tab label="#{overviewBundle.tabClientSide}" >
 
           <tc:tabGroup id="tabMarsOuterForm" state="#{demo.tabState1}" >
-            <tc:tab labelWithAccessKey="#{overviewBundle.tabPlanet}">
+            <tc:tab label="#{overviewBundle.tabPlanet}">
               <tc:panel >
                 <f:facet name="layout"><tc:gridLayout rows="1*;fixed;fixed;1*" /></f:facet>
                 <tc:cell />
@@ -46,7 +46,7 @@
                 <tc:cell />
               </tc:panel>
             </tc:tab>
-            <tc:tab labelWithAccessKey="#{overviewBundle.tabInsolar}">
+            <tc:tab label="#{overviewBundle.tabInsolar}">
               <tc:panel >
                 <f:facet name="layout"><tc:gridLayout rows="1*;fixed;fixed;1*" /></f:facet>
                 <tc:cell />
@@ -57,7 +57,7 @@
                 <tc:cell />
               </tc:panel>
             </tc:tab>
-            <tc:tab label="#{overviewBundle.tabMoons}" accessKey="#{overviewBundle.tabMoonsAccessKey}">
+            <tc:tab label="#{overviewBundle.tabMoons}">
               <tc:panel>
                 <f:facet name="layout"><tc:gridLayout  /></f:facet>
                 <tc:sheet value="#{demo.solar.planets[0].moons}"
@@ -87,7 +87,7 @@
 
             <tc:tabChangeListener type="org.apache.myfaces.tobago.example.demo.actionlistener.SimpleTabChangeListener"/>
 
-            <tc:tab labelWithAccessKey="#{overviewBundle.tabPlanet}">
+            <tc:tab label="#{overviewBundle.tabPlanet}">
               <tc:panel >
                 <f:facet name="layout"><tc:gridLayout rows="1*;fixed;fixed;1*" /></f:facet>
                 <tc:cell />
@@ -98,7 +98,7 @@
                 <tc:cell />
               </tc:panel>
             </tc:tab>
-            <tc:tab labelWithAccessKey="#{overviewBundle.tabInsolar}">
+            <tc:tab label="#{overviewBundle.tabInsolar}">
               <tc:panel >
                 <f:facet name="layout"><tc:gridLayout rows="1*;fixed;fixed;1*" /></f:facet>
                 <tc:cell />

Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
Tue Apr  4 11:58:10 2006
@@ -119,8 +119,8 @@
 <entry key="treeShowRootJunction">show first junction</entry>
 <entry key="treeMultiselect">selectable</entry>
 <entry key="treeMutable">mutable</entry>
-<entry key="treeLabel">Tree</entry>
-<entry key="treeListboxLabel">Listbox</entry>
+<entry key="treeLabel">Tre_e</entry>
+<entry key="treeListboxLabel">Listbo_x</entry>
 
 
 <entry key="none">Not selectable</entry>
@@ -145,8 +145,7 @@
 <entry key="tabServerSide">Server side tabbing</entry>
 <entry key="tabPlanet">Data of the _Planets</entry>
 <entry key="tabInsolar">In the _Solarsystem</entry>
-<entry key="tabMoons">Moons</entry>
-<entry key="tabMoonsAccessKey">m</entry>
+<entry key="tabMoons">_Moons</entry>
 
 
 <!--  solar -->

Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
(original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview_de.properties.xml
Tue Apr  4 11:58:10 2006
@@ -105,7 +105,6 @@
   <entry key="tabPlanet">_Planetendaten</entry>
   <entry key="tabInsolar">im _Sonnensystem</entry>
   <entry key="tabMoons">Monde</entry>
-<!-- tabMoonsAccessKey=m -->
 
 <!--  solar -->
   <entry key="solarPlanetDiameter">Durchmesser</entry>

Modified: incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/label.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/label.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/label.jsp (original)
+++ incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/label.jsp Tue Apr
 4 11:58:10 2006
@@ -24,7 +24,7 @@
         <tc:gridLayout columns="100px;1*" rows="fixed;1*" />
       </f:facet>
 <%-- code-sniplet-start id="label" --%>
-      <tc:label accessKey="S" value="Single Label"></tc:label>
+      <tc:label value="_Single Label"></tc:label>
 <%-- code-sniplet-end id="label" --%>
       <tc:cell/>
 

Modified: incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/menuBar.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/menuBar.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/menuBar.jsp (original)
+++ incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/menuBar.jsp Tue Apr
 4 11:58:10 2006
@@ -26,7 +26,7 @@
         </f:facet>
         <%-- code-sniplet-start id="menuBar" --%>
         <tc:menuBar>
-          <tc:menu labelWithAccessKey="_File">
+          <tc:menu label="_File">
             <tc:menuItem label="New File"/>
             <tc:menuItem label="Open File"/>
             <tc:menuItem label="Save"/>
@@ -37,7 +37,7 @@
           </tc:menu>
 
           <%-- code-sniplet-start id="menu" --%>
-          <tc:menu labelWithAccessKey="_Edit">
+          <tc:menu label="_Edit">
             <tc:menuItem label="Copy"/>
             <tc:menuItem label="Cut"/>
             <tc:menuItem label="Paste"/>
@@ -45,7 +45,7 @@
             <tc:menuItem label="Delete"/>
             <%-- code-sniplet-end id="menuItem" --%>
             <tc:menuSeparator/>
-            <tc:menu labelWithAccessKey="_Delete">
+            <tc:menu label="_Delete">
               <tc:menuItem label="As Spam"/>
               <tc:menuItem label="As Newsletter"/>
               <tc:menuItem label="As Uninteresting"/>
@@ -53,7 +53,7 @@
           </tc:menu>
           <%-- code-sniplet-end id="menu" --%>
 
-          <tc:menu labelWithAccessKey="_View">
+          <tc:menu label="_View">
             <tc:menuItem label="Snap to Grid"/>
             <tc:menuItem label="Show Rulers"/>
           </tc:menu>

Modified: incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectBooleanCheckbox.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectBooleanCheckbox.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectBooleanCheckbox.jsp
(original)
+++ incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/selectBooleanCheckbox.jsp
Tue Apr  4 11:58:10 2006
@@ -27,16 +27,16 @@
 
 <%-- code-sniplet-start id="selectBooleanCheckbox" --%>
         <tc:selectBooleanCheckbox inline="true" id="LabeledInlineMultiSelect0"
-                             labelWithAccessKey="_Letter " />
+                             label="_Letter " />
 <%-- code-sniplet-end id="selectBooleanCheckbox" --%>
         <tc:selectBooleanCheckbox inline="true" id="LabeledInlineMultiSelect1"
-                             labelWithAccessKey="_Phone" />
+                             label="_Phone" />
 
         <tc:selectBooleanCheckbox inline="true" id="LabeledInlineMultiSelec2"
-                             labelWithAccessKey="_eMail " />
+                             label="_eMail " />
 
         <tc:selectBooleanCheckbox inline="true" id="LabeledInlineMultiSelect3"
-                             labelWithAccessKey="_Fax" />
+                             label="_Fax" />
 
 
       <tc:cell/>

Modified: incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp (original)
+++ incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp Tue
Apr  4 11:58:10 2006
@@ -26,7 +26,7 @@
           <tc:gridLayout rows="150px;1*"  columns="400px;1*"/>
         </f:facet>
 <%-- code-sniplet-start id="textarea" --%>
-          <tc:textarea labelWithAccessKey="Enter your Text:"
+          <tc:textarea label="Enter your Text:"
                       value="My new text goes here..." id="textarea0" />
 <%-- code-sniplet-end id="textarea" --%>        
         <tc:cell/>

Modified: incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/toolBar.jsp
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/toolBar.jsp?rev=391386&r1=391385&r2=391386&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/toolBar.jsp (original)
+++ incubator/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/toolBar.jsp Tue Apr
 4 11:58:10 2006
@@ -28,7 +28,7 @@
 
             <tc:toolBar id="toolbar0" iconSize="big">
               <tc:toolBarCommand id="button0" label="Button" />
-              <tc:toolBarCommand id="button1" label="Accesskey Button" accessKey="B"/>
+              <tc:toolBarCommand id="button1" label="Accesskey _Button"/>
               <tc:toolBarCommand id="button2" label="Image Button"
                                 image="image/toolbar_example_button.gif" />
               <tc:toolBarCommand id="button3" disabled="true" label="Disabled Button"
/>



Mime
View raw message