You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Benjamin Rosenberger (JIRA)" <ji...@apache.org> on 2013/10/30 10:08:25 UTC

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

Benjamin Rosenberger created TAP5-2213:
------------------------------------------

             Summary: 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


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.1#6144)