5 Replies Latest reply on Dec 22, 2006 2:53 PM by Norman Richards

    EL enhancement of parameters working?

    Dan Diodati Newbie

      Hi was trying out the s:link tag and noticed that it did not support actionListener events(By the way will this be supported?) So I noticed that
      you can pass parameters to methods since seam adds some enhancements to
      EL. When trying it I end up getting a null parameter passed into my getAction method. Here is the code segment:

      <c:forEach items="#{TopNavViewHelper.navBar}" var="item">
       <c:set var="navItemStyle" value=""/>
       <c:if test="#{item.name == TopNavViewHelper.selectedName}">
       <c:set var="navItemStyle" value="selected"/>
       </c:if>
      
       <li class="#{navItemStyle}" id="#{item.name}" >
       <s:link id="#{item.name}" title="#{item.descr}" action="#{TopNavViewHelper.getAction(item.name)}" actionListener="#{TopNavViewHelper.clicked}"><span>#{item.label}</span>
       </s:link>
       <div>
       <ul/>
       </div>
       </li>
      </c:forEach>


      The item.name in the getAction method call ends up being null instead
      of have the name of the item. Does this not work within forEach loops?