[
https://issues.apache.org/jira/browse/TRINIDAD-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728013#action_12728013
]
Matthias Weßendorf commented on TRINIDAD-1463:
----------------------------------------------
the main goal for this class is to offer convenience method to generate _faces
models_, so not sure if we should go for the requested improvement. However, if
you have a working patch, please submit for our review
> ModelUtils.to<X>Model should support Iterator and Iterable as input object
> type
> -------------------------------------------------------------------------------
>
> Key: TRINIDAD-1463
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1463
> Project: MyFaces Trinidad
> Issue Type: Improvement
> Reporter: Ansgar Konermann
> Priority: Minor
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Data structures from the domain model of an application commonly have to be
> converted into a representation more suitable to GUI representation. This is
> supported by ModelUtils.to<X>Model (replace <X> by one of "Tree", "Menu",
> "Collection", "Data")
> Services of the domain layer should have lean interfaces. When chosing the
> return type of a service method, one should strive to select the data type
> which provides only the features/methods which are really required, but not
> more. Hence, it is often inappropriate to return java.util.List if all we
> want to return is a Collection of objects which can be iterated over (but
> nothing more - like inserting or removing elements). The java collection
> classes are to "fat" in this respect.
> Add support for Iterable and Iterator to the following methods of class
> ModelUtils, as far as applicable:
> * toTreeModel
> * toMenuModel
> * toCollectionModel
> * toDataModel
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.