0

I am trying below things

1- Not Working

<c:set var="key" value="#{outputType}" >

<h:outputText value="#{outputType}"></h:outputText>
</c:set>

2- Not Working

<c:set var="key" value="#{outputType}" >
</c:set>
<h:outputText value="#{bean.stitchingEnumMap[key]}" />

3- But this is working

 <h:outputText value="#{outputType}"></h:outputText>

My problem i have to get the value from a MAP stitchingEnumMap and for this key i am getting from <c:set/> tag.

FYI output variable i am passing from another JSF page like this

<ui:include src="../templates/comePage.xhtml">
        <ui:param name="bean" value="#{beanName}" />
        <ui:param name="property" value="outputType" />
        <ui:param name="outputType" value="#{record[property]}" />

</ui:include>  

EDIT :-

How to access value of MAP ? I am trying something like below

<c:set var="key" value="#{outputType}" />
<h:outputText value="#{bean.stitchingEnumMap['#{key}']}" />

If this is not right way what other option can be available to access value from map?

Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
  • https://stackoverflow.com/questions/3342984/jstl-in-jsf2-facelets-makes-sense is a duplicate!... (and 1 is not intended to work...) – Kukeltje Jul 14 '17 at 11:55
  • Possible duplicate of [JSTL in JSF2 Facelets... makes sense?](https://stackoverflow.com/questions/3342984/jstl-in-jsf2-facelets-makes-sense) – Kukeltje Jul 14 '17 at 11:55
  • 2
    Why are you even trying it in a 'complex' way like this... Why not 'just' `` and why ` ` which is weird to.... Please get back to the basics of your problem. Looks like a x-y problem – Kukeltje Jul 14 '17 at 14:14
  • Yes, and? You've asked many questions before, each time we ask you to clarify you do not clarfy, instead you add what looks like irrelevant info (you do not make it a [mcve])... All we see are code snippets... Get back to your REAL PROBLEM/QUESTION – Kukeltje Jul 14 '17 at 14:33
  • @Kukeltje Thanks – Subodh Joshi Jul 14 '17 at 14:33

0 Answers0