Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-3411

a4j:commandLink and commandButton do not work inside a region inside a ui:repeat

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Jboss Seam 2.1.0, Jboss AS 4.2.2, Richfaces 3.2, Mac OSX 10.4.11 (also tested under Windows XP with IE7)

      Description

      If an a4j:commandLink (or a4j:commandButton) are inside an a4j:region which is inside a ui:repeat they will not be able to fire their actions. Instead the browser will render a blank page. The server logs aren't touched.

      Very simple page and bean to recreate. Using Seam to bind page and bean. I can create sample project if required.

      Page:
      ======
      <h:form>
      <ui:repeat value="#

      {testBean.cities}" var="city">
      #{city} :
      <a:commandLink
      action="#{testBean.hello}"
      reRender="nameDiv">
      <h:outputText value="This Works"/>
      </a:commandLink>
       
      <a:region>
      <a:commandLink
      action="#{testBean.hello}"
      reRender="nameDiv">
      <h:outputText value="inside region"/>
      </a:commandLink>
      <a:commandButton
      action="#{testBean.hello}"
      reRender="nameDiv"
      value="This Does Not"/>
      </a:region>
      <br/>
      </ui:repeat>
      <hr/>
      <a:repeat value="#{testBean.cities}

      " var="city">
      #

      {city}

      :
      <a:commandLink
      action="#

      {testBean.hello}"
      reRender="nameDiv">
      <h:outputText value="This Works"/>
      </a:commandLink>
       
      <a:region>
      <a:commandLink
      action="#{testBean.hello}

      "
      reRender="nameDiv">
      <h:outputText value="This Also Now Works"/>
      </a:commandLink>
      </a:region>
      <br/>
      </a:repeat>

      </h:form>

      Bean:
      ======
      public List<String> getCities()

      { List<String> cities = new ArrayList<String>(); cities.add("London"); cities.add("Auckland"); return cities; }

      public void hello()

      { log.info(MessageFormat.format(messages.get("test"), "hello")); facesMessages.addFromResourceBundle("test", "Hello"); }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                nbelaevski Nick Belaevski
                Reporter:
                damianharvey Damian Harvey
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: