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 2016/02/22 14:45:19 UTC

[jira] [Updated] (TAP5-2016) Scala style properties unnecessarily require a field with the same name

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

Jochen Kemnade updated TAP5-2016:
---------------------------------
    Labels: bulk-close-candidate  (was: patch scala)

This issue 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 version of Tapestry (currently 5.4.0, available from Maven Central), please update it as soon as possible and add '5.4.0') to the issue's affected versions.

> Scala style properties unnecessarily require a field with the same name
> -----------------------------------------------------------------------
>
>                 Key: TAP5-2016
>                 URL: https://issues.apache.org/jira/browse/TAP5-2016
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.3.6, 5.2.5
>            Reporter: Henning Petersen
>              Labels: bulk-close-candidate
>         Attachments: TAP5-2016.patch
>
>
> The changes introduced with TAP5-1064 allow Scala-style properties to be used from components without the need for Java-style getters and setters. The implementation currently requires a field of the same name as the property to exist on the bean, which is unfortunate. 
> This works:
> var value: String = _
> <input ... t:value="value" />
> This does not:
> def value(): String = ...
> def value_=(value: String) { ... }
> <input ... t:value="value" />
> A class which delegates property access to a backing bean is not recognized by PropertyAccessImpl as having any valid properties; the same is the case when the field has a different name than the property. 
> Possible workarounds include a dead field in the value class to satisfy the condition in PropertyAccessImpl, and adding Java-style getters and setters for the property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)