You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/05/27 09:20:57 UTC

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

     [ https://issues.apache.org/jira/browse/TAP5-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade updated TAP5-1092:
---------------------------------

    Labels: bulk-close-candidate  (was: )

This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.


> 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
>              Labels: bulk-close-candidate
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)