cancel
Showing results for 
Search instead for 
Did you mean: 

c:forEach on JSF page

akomisarek
Champ in-the-making
Champ in-the-making
Hello,

I have problem with forEach tag in my dialog page.

        <f:verbatim>
              <c:forEach items="${DialogManager.bean.metrics}" var="abc">
                  1!${abc.fileName}!1
              </c:forEach>
      </f:verbatim>
Works properly, but when I try to use forEach in that way:

   
<f:verbatim>
    <c:forEach items="${DialogManager.bean.metrics}" var="abc">
        <h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
             <h:outputText value="#{msg.project_metrics} #{abc.fileName}!" />
       </h:panelGrid>
     </c:forEach>
</f:verbatim>

it doesn't work! abc.fileNme is empty - even though getMetrics is invoked in managed bean.I tried in this way:              <hSmiley SurprisedutputText value="#{msg.project_metrics} " /> ${abc.fileName}!

What I am doing wrong? Can't get it to wrok inside panelGrid Smiley Sad.

Thanks for help,
Adam
1 REPLY 1

invictus9
Champ in-the-making
Champ in-the-making
I need to ask a naive question:

In the first example, you use ${abc.fileName} and the second example you use #{abc.fileName}. What reason do you have to use the different notation? $ versus #