Add a a facility for type conversion that has more type info than just the
declared class
-----------------------------------------------------------------------------------------
Key: TAPESTRY-2034
URL: https://issues.apache.org/jira/browse/TAPESTRY-2034
Project: Tapestry
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.0.7
Reporter: Davor Hrg
Typecoercer is a nice facility for converting types and simplifying code.
while it is more than useful for ioc-part it seems insufficient for the
tapestry core.
This observation is based on me trying to create TypeCoercers for hibernate
mainly,
but I believe it spans further that that.
It is also based on the fact that tapestry core is forcing property bindings so
we can have static
type information thus being able to analyze the page/component once and be
faster while executing.
Fields and methods preserve generic type info and that more verbose info can be
provided to the converter along with annotations.
This extra info is useful for injections and actions and events as well.
It would provide more powerful features and give more accent to bindings and
bring more dynamic to the static structure.
Example situation:
We have dozen entities that we want seamlessly use to link between ListPage
EditPage,
to do this we have to generate coercions for each: "Entity->String",
"String->Entity".
We can not do this generically because we can not list entities early enough to
provide them
to TypeCoercer.
One idea was that entities should implement an interface and only two coercions
are needed then:
"Interface->String" and "String->Interface" for any entities we have
But "String->Interface" is not feasible because we do not have sufficient info
to decide
which entity to instantiate.
--
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]