You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org> on 2011/10/22 00:12:33 UTC
[jira] [Commented] (TAP5-1623) @Parameter and @Property mutually
exclusiv?
[ https://issues.apache.org/jira/browse/TAP5-1623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133121#comment-13133121 ]
Howard M. Lewis Ship commented on TAP5-1623:
--------------------------------------------
Setter methods must return void; otherwise java.beans.Introspector does not recognize them as a setter method.
@Property w/ a parameter DOES NOT do what you think. Tapestry does not, by design, use a setter method, even when one is available. Reading a parameter is reading the field (not the property, if any). Updating the property bound to a parameter is writing the field (not the property, if any).
<t:testsettercomponent text="literal:sample"/>
binds the text parameter of TestSetterComponent to the read-only binding for the literal value "sample". It does not, should not, will not, invoke a setter method. This is pretty clear in the docs, that Tapestry instruments the field, not the property.
> @Parameter and @Property mutually exclusiv?
> -------------------------------------------
>
> Key: TAP5-1623
> URL: https://issues.apache.org/jira/browse/TAP5-1623
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.2.6
> Reporter: Jens Breitenstein
> Assignee: Howard M. Lewis Ship
> Priority: Minor
>
> in case a @parameter annotation is used in conjunction with @property the property setter is never called.
> the framework should either support it or reject such a combination of annotations.
> sample:
> @Property(read = true, write = false)
> @Parameter(required = true)
> private String _myParam;
> // ---->> NEVER CALLED
> public void String setMyParam(final String param)
> {
> _myParam = param;
> // do more...
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira