I have this ajax form loop with a select field in the AddRow section.

  <t:form>
    <t:ajaxformloop t:id="urlLoop" t:source="selectedUrls" t:value="currentUrl" 
t:encoder="urlKeyEncoder">
      ${currentUrl}

      <t:parameter name="addRow">
        <t:select t:id="urlSelectField"
                  t:blankLabel="--Select--"
                  t:blankOption="ALWAYS"
                  t:model="urlSelectModel"
                  t:encoder="urlValueEncoder"
                  t:value="selectedUrl"/>
        <t:addrowlink>Add URL</t:addrowlink>
      </t:parameter>

   </t:ajaxformloop>

  </t:form>

and in the component class I have:

  @Property
  private String                  selectedUrl;

  @Property
  private String                  currentUrl;

  @Property
  private List<String>            selectedUrls;

  @OnEvent (value = EventConstants.ADD_ROW, component = "urlLoop")
  public String addNewUrl()
  {
    selectedUrls.add(selectedUrl);
    return selectedUrl;
  }


But unfortunately, selectedUrl is null when the event fires. I guess the value 
of the select field in the AddRow section is not passed in. Is this even 
possible to do with AjaxFormLoop or am I doing something wrong?


      


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to