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