You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2006/10/02 13:06:14 UTC

svn commit: r451975 - in /myfaces/tobago/trunk: theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ tobago-tool/gendoc/src/main/webapp/screenshot/

Author: lofwyr
Date: Mon Oct  2 04:06:13 2006
New Revision: 451975

URL: http://svn.apache.org/viewvc?view=rev&rev=451975
Log:
fix focus bug TOBAGO-141

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java
    myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/date.jsp
    myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/in.jsp
    myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DateRenderer.java Mon Oct  2 04:06:13 2006
@@ -78,6 +78,9 @@
         writer.endElement(HtmlConstants.INPUT);
       }
     }
+
+    // focus
+    HtmlRendererUtil.renderFocusId(facesContext, component);
   }
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java Mon Oct  2 04:06:13 2006
@@ -53,6 +53,7 @@
 public class InRenderer extends InRendererBase implements AjaxRenderer {
   private static final Log LOG = LogFactory.getLog(InRenderer.class);
 
+  @Override
   public void encodeEndTobago(FacesContext facesContext,
         UIComponent component)
         throws IOException {
@@ -117,6 +118,9 @@
       }
     }
     writer.endElement(HtmlConstants.INPUT);
+
+    // focus
+    HtmlRendererUtil.renderFocusId(facesContext, component);
 
     // input suggest
     if (renderAjaxSuggest) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java Mon Oct  2 04:06:13 2006
@@ -43,6 +43,7 @@
 
 public class TextAreaRenderer extends InRendererBase {
 
+  @Override
   public void encodeEndTobago(FacesContext facesContext,
         UIComponent component) throws IOException {
 
@@ -99,6 +100,9 @@
       writer.writeText(currentValue, null);
     }
     writer.endElement(HtmlConstants.TEXTAREA);
+
+    // focus
+    HtmlRendererUtil.renderFocusId(facesContext, component);
   }
 }
 

Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/date.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/date.jsp?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/date.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/date.jsp Mon Oct  2 04:06:13 2006
@@ -23,20 +23,25 @@
     <f:subview id="date">
       <tc:panel>
         <f:facet name="layout">
-          <tc:gridLayout columns="300px;1*" rows="fixed;fixed;1*" />
+          <tc:gridLayout columns="300px;1*" rows="fixed;fixed;fixed;1*"/>
         </f:facet>
-<%-- code-sniplet-start id="date" --%>
+        <%-- code-sniplet-start id="date" --%>
         <tx:date label="Date">
-          <f:convertDateTime pattern="dd.MM.yyyy" />
+          <f:convertDateTime pattern="dd.MM.yyyy"/>
         </tx:date>
-<%-- code-sniplet-end id="date" --%>
+        <%-- code-sniplet-end id="date" --%>
         <tc:cell/>
 
-<%-- code-sniplet-start id="dateTime" --%>
+        <%-- code-sniplet-start id="dateTime" --%>
         <tx:date label="Date/Time">
-          <f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
+          <f:convertDateTime pattern="dd.MM.yyyy HH:mm"/>
+        </tx:date>
+        <%-- code-sniplet-end id="dateTime" --%>
+        <tc:cell/>
+
+        <tx:date label="Date (focus)" focus="true">
+          <f:convertDateTime pattern="dd.MM.yyyy"/>
         </tx:date>
-<%-- code-sniplet-end id="dateTime" --%>
         <tc:cell/>
 
         <tc:cell spanX="2"/>

Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/in.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/in.jsp?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/in.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/in.jsp Mon Oct  2 04:06:13 2006
@@ -45,8 +45,7 @@
       </tc:panel>
       <tc:cell/>
 
-      <%--fixme!!!--%>
-      <tx:in label="Has Focus (FIXME)" focus="true" value="Some Text"/>
+      <tx:in label="Input (focus)" focus="true" value="Some Text"/>
       <tc:cell/>
 
       <tc:cell spanX="2"/>

Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp?view=diff&rev=451975&r1=451974&r2=451975
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/textarea.jsp Mon Oct  2 04:06:13 2006
@@ -15,6 +15,7 @@
 --%>
 
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
+<%@ taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 <%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
 
@@ -23,13 +24,18 @@
     <jsp:body>
       <tc:panel>
         <f:facet name="layout">
-          <tc:gridLayout rows="150px;1*"  columns="400px;1*"/>
+          <tc:gridLayout rows="150px;100px;1*"  columns="400px;1*"/>
         </f:facet>
 <%-- code-sniplet-start id="textarea" --%>
-          <tc:textarea label="Enter your Text:"
-                      value="My new text goes here..." id="textarea0" />
+          <tx:textarea label="Enter your Text:"
+                      value="My new text goes here..."/>
 <%-- code-sniplet-end id="textarea" --%>        
         <tc:cell/>
+
+        <tx:textarea label="Area (focus)" focus="true"
+                    value="Some Text"/>
+        <tc:cell/>
+
         <tc:cell/>
         <tc:cell/>