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 2015/01/12 09:10:43 UTC

[jira] [Closed] (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 closed TAP5-1092.
--------------------------------
    Resolution: Invalid

We assume this is no longer relevant and therefore close it.
If you still have this issue in a recent Tapestry version (such as 5.3.8 or the latest 5.4 preview release), feel free to provide the necessary information and reopen.

> 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.3.4#6332)