This content has been marked as final.
Show 2 replies
-
1. Re: Access Maps with Enum keys in facelet
vdweij Mar 18, 2009 10:52 AM (in response to vdweij)In components.xml I need to access the same property
<framework:entity-query name="myEQ" ejbql="SELECT MyEntity m WHERE m.type = 'TYPE1'"> <framework:restrictions> <value>m.lastImportDate = #{myBean.importDates['TYPE1]'}</value> </framework:restrictions> </framework:entity-query>
and that does work! Now a String is converted to a Enum key. This looks odd when the same syntax fails in facelets.
-
2. Re: Access Maps with Enum keys in facelet
vdweij Mar 18, 2009 10:55 AM (in response to vdweij)Crap... I noticed I forgot the braces in my example (the do exist in the code). The need to be in the outputText tag.
<c:forEach var="type" items="#{myBean.importDates.keySet()}"> <ui:param name="#{type}" value="#{type}"/> </c:forEach> <h:outputText value="Date of type 1: #{myBean.importDates[TYPE1]}"> <s:convertDateTime type="both" dateStyle="full"/> </h:outputText> <h:outputText value="Date of type 2: #{myBean.importDates[TYPE2]}"> <s:convertDateTime type="both" dateStyle="full"/> </h:outputText>