[
https://issues.apache.org/jira/browse/TAPESTRY-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Davor Hrg updated TAPESTRY-2116:
--------------------------------
Attachment: TAPESTRY-2116.patch
I've created a patch.
In order to implement this worker, a pricniple of the ClassTranformer had to be
broken.
The principle is that only one annotation at a time can affect a field.
However, this is problematic for @Property since it is natural for it to be
used in combination as well as standalone.
This lead to adding a method to ClassTransformation
List<String> findFields(FieldFilter filter, boolean unclaimedOnly);
this method allows of querying for fields that are claimed as well.
Another thing is that in order for it to work properly it has to know of
any field access replacements. Without that knowledge the modifications
through generated setter/getter would not be caught by the other transformation.
This lead to adding two methods to ClassTransformation
public String getFieldWriteTransform(String fieldName);
public String getFieldReadTransform(String fieldName);
Another possible issue lies in my incertainty in ordered configuration,
I wanted to make sure that this worker comes after all transforms,
UnclaimedFieldWorker is currently last but this worker can be before
or after it, just needs to be after everything else.
Using "after:*" causes circular dependency, so I changed it to
"before:UnclaimedField"
which works without warnings, but I'm unsure this is enough for it to be after
everything
else.
Allowing using: "after:*","before:UnclaimedField" is more precise but tapestry
still complains
about it.
I havent found any specific tests for @Persist so I haven't made one for this,
with some hints on where is the place for such tests, I could make them...
> @Retain and @Persist should generate a setter and/or getter for the decorated
> field
> -----------------------------------------------------------------------------------
>
> Key: TAPESTRY-2116
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2116
> Project: Tapestry
> Issue Type: New Feature
> Components: tapestry-core
> Reporter: Sven Homburg
> Fix For: 5.0.10
>
> Attachments: TAPESTRY-2116.patch
>
>
> sometime code looks incredible unclear, because its peppered with getter and
> setter methods.
> i think it should be ease to extend the Persist- and RetainWorker for doing
> that job.
> @Retain(getter=true, setter=true)
> as an exmaple
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]