I have a simple page using a form, a loop (each itema has some text and a
checkbox), and submit button. If the checkbox is checked when the form is
submitted it will delete that item from the list. 

Pretty simple stuff, but T5.1 doesn't seem to be able to do the simple stuff
these days. I've included my code at the end of this post in case I'm a
cause of this issue. 

The problem is that the submit button doesn't fire an event. There seems to
be no client error. but it seems to stop somewhere during the
Tapestry.waitForPage javascript call. I'm on linux and using firefox 3.5 as
my browser.

If I remove the submit button, and add the onclick event to my checkbox, I
get the submit event but I get "Could not find a coercion from type
java.lang.String to type Item"  What string is trying to be coerced here? 


tml:
<t:form t:id="form">
  <table>
    <t:loop source="items" value="item" index="index">
      <tr>
        <td>
          ${item.name} - <t:checkbox t:id="toBeDeleted"
t:value="item.toBeDeleted" />
        </td>
      </tr>
    </t:loop>
  </table>
  <t:submit value="Update" />
</t:form>

class:
public class AlertsIndex {
  @Property
  @Persist
  private List<Item> items; 
  
  @Property
  @Persist
  private Item item;
    
  @Property
  private int index;
   
  public void onSubmit() {
    for(Item i : items) {
      System.out.println("onSubmit:   " + i.isToBeDeleted());
    }
  }
    
  public void onActivate() {
    items =  Arrays.asList(new Item("a"), new Item("b"), new Item("c"));
  }
}
-- 
View this message in context: 
http://www.nabble.com/T5.1-submit-not-working-tp25751968p25751968.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to