You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Denis Delangle (JIRA)" <ji...@apache.org> on 2010/03/31 14:28:27 UTC

[jira] Created: (TAP5-1092) Apply mixin to component DateField

Apply mixin to component DateField
----------------------------------

                 Key: TAP5-1092
                 URL: https://issues.apache.org/jira/browse/TAP5-1092
             Project: Tapestry 5
          Issue Type: Improvement
    Affects Versions: 5.2
            Reporter: Denis Delangle
            Priority: Minor


All form components are writen so the input is opened in beginRender and closed in afterRender except DateField.

If it was done the same way, we could add mixins that would apply to the input generated like any other input.

The modification that could be apply to DateField to fix the problem  :

Index: src/main/java/org/apache/tapestry5/corelib/components/DateField.java
===================================================================
--- src/main/java/org/apache/tapestry5/corelib/components/DateField.java	(revision 929498)
+++ src/main/java/org/apache/tapestry5/corelib/components/DateField.java	(working copy)
@@ -213,7 +213,6 @@
             value = formatCurrentValue();
 
         String clientId = getClientId();
-        String triggerId = clientId + "-trigger";
 
         writer.element("input",
 
@@ -237,11 +236,18 @@
 
         decorateInsideField();
 
+
+        
+    }
+    
+    void afterRender(MarkupWriter writer) {
+    	//Close input
         writer.end();
+        String clientId = getClientId();
+        String triggerId = clientId + "-trigger";
 
         // Now the trigger icon.
-
-        writer.element("img",
+    	writer.element("img",
 
         "id", triggerId,
 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.