[
https://issues.apache.org/jira/browse/TAP5-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14167838#comment-14167838
]
Howard M. Lewis Ship commented on TAP5-2213:
--------------------------------------------
Thanks for the careful reporting.
The implementation of your AbstractPropertyConduit would be useful; it may not
be implementing getPropertyType() correctly. Further 5.2 adds further methods
to assist with Java generics.
> divergent PropertyModelImpl and BeanModelSourceImpl
> ---------------------------------------------------
>
> Key: TAP5-2213
> URL: https://issues.apache.org/jira/browse/TAP5-2213
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3.3
> Reporter: Benjamin Rosenberger
> Priority: Minor
>
> Given:
> * I create a bean model for an object
> * i add a property with model.add("field",
> AbstractPropertyConduit<DataType>()) with some logic in the getValue() method
> * i have contributed a view block for DataType in the ioc module (with
> contributeDefaultDataTypeAnalyzer)
> When:
> * i go to the page where the beanmodel is used
> Result:
> * the view block is not used, but the default toString method of DataType
> Expected
> * the view block is used
> Problem description:
> The PropertyModelImpl does not set the datatype in the constructor (which is
> called in the BeanModelImpl.add-method). On the other hand if i do not need
> any logic for getting the property the field is automatically added by the
> BeanModelSourceImpl.createDisplayModel() method (calling the create method
> and setting the datatype after adding the property to the model).
> Possible workaround:
> Setting the datatype to the type of the PropertyConduit to ensure the same
> behavior as the BeanModelSourceImpl
> Suggested Solution:
> add setting the datatype in the PropertyModelImpl to the one of the given
> PropertyConduit or null depending if the dataTypeAnalyzer do know the type)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)