You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2014/10/11 02:17:34 UTC

[jira] [Closed] (TAP5-2213) divergent PropertyModelImpl and BeanModelSourceImpl

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

Howard M. Lewis Ship closed TAP5-2213.
--------------------------------------
    Resolution: Cannot Reproduce

Please re-open when you can provide the information and, preferably, a test case.

> 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)