webtier@glassfish.java.net

<f:ajax> contains an unknown id

From: <webtier_at_javadesktop.org>
Date: Wed, 21 Oct 2009 19:09:43 PDT

I'm getting this error
javax.servlet.ServletException: <f:ajax> contains an unknown id 'teamsGrid' - cannot locate it in the context of the component deleteImage
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)

when running this code and I do not understand why. Maybe I can get some help here.

<h:panelGrid id ="teamsGrid" columns = "2" border="1" >
        <f:facet name="header">
          <h:outputText value="Team"/>
          <h:outputText value="Actions"/>
        </f:facet>
        
        <ui:fragment rendered="#{leagueCreator.numberOfTeams == 0}">
          <h:outputText value ="You currently do not have any team for this league"/>
        </ui:fragment>
        
        <ui:fragment rendered="#{leagueCreator.numberOfTeams > 0}">
          <ui:repeat value="#{leagueCreator.teams}" var="team" >
            <h:panelGrid id ="teamPanel" columns = "3" border = "1" >
              <h:outputText id="teamName" value="#{team.name}"/>
              <h:graphicImage id="editImage" url="/resources/images/icons/edit.gif">
              </h:graphicImage>
              <h:graphicImage id="deleteImage" url="/resources/images/icons/Delete.gif">
                <f:ajax event="click" render="teamsGrid" listener="#{leagueCreator.deleteTeam}"/>
              </h:graphicImage>
            </h:panelGrid>
          </ui:repeat>
        </ui:fragment>
      </h:panelGrid>
[Message sent by forum member 'capitanu' (goprean_at_yahoo.com)]

http://forums.java.net/jive/thread.jspa?messageID=368893