[JAVASERVERFACES_SPEC_PUBLIC-1364] UIRepeat and UIData supports Map Created: 19/Feb/15  Updated: 24/Mar/15  Resolved: 24/Mar/15

Status: Resolved
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: New Feature Priority: Major
Reporter: arjan tijms Assignee: Manfred Riem
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File changebundle.txt     Zip Archive newfiles.zip    
Issue Links:
Cloners
is cloned by JAVASERVERFACES-3836 Implement JAVASERVERFACES_SPEC_PUBLIC... Closed
Related
is related to JAVASERVERFACES_SPEC_PUBLIC-1103 UIRepeat and UIData supports Iterable Resolved

 Description   

In reference to JAVASERVERFACES_SPEC_PUBLIC-1103 Bauke Scholtz commented the following:

Would be even more cool if it transparently recognizes Map like c:forEach so we don't need value="#{bean.map.entrySet()}" everytime.

Splitting this off from 1103; it's strongly related but a different (additional) type.



 Comments   
Comment by arjan tijms [ 19/Feb/15 ]

When discussing support for Iterable, the wish for Map also came up.

Comment by arjan tijms [ 07/Mar/15 ]

For this change the spec document needs to be updated, specifically section 4.1.3.2.

This section currently (in the 2.3 branch) contains the following text:

The current value identified by the value property is normally of type DataModel. [P1-start-uidataModel]However, a DataModel wrapper instance must automatically be provided by the JSF implementation if the current value is of one of the following types:
java.util.List
Array of java.util.Object
java.sql.ResultSet (which therefore also supports javax.sql.RowSet) 
javax.servlet.jsp.jstl.sql.Result
java.util.Collection
java.lang.Iterable
Any other Java object is wrapped by a DataModel instance with a single row.[P1-end]

The updated text in section 4.1.3.2 after this update would be the following:

The current value identified by the value property is normally of type DataModel. [P1-start-uidataModel]However, a DataModel wrapper instance must automatically be provided by the JSF implementation if the current value is of one of the following types:
java.util.List
Array of java.util.Object
java.sql.ResultSet (which therefore also supports javax.sql.RowSet) 
javax.servlet.jsp.jstl.sql.Result
java.util.Collection
java.lang.Iterable
java.util.Map (uses the wrapper for java.lang.Iterable by providing access to java.util.Map#entrySet())
Any other Java object is wrapped by a DataModel instance with a single row.[P1-end]
Comment by Manfred Riem [ 24/Mar/15 ]

Applied to 2.3 trunk,

svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1364, UIRepeat and UIData supports Map"
Sending spec/frame/standardUserInterfaceComponents.fm
Transmitting file data .
Committed revision 1166.

Generated at Tue Mar 28 15:22:15 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.