I am really new to Tapestry5 so I watched this video for a 10-minute tutorial: http://www.youtube.com/watch?v=-vzCfzJ7ETA

It's cool. Creating a web app is pretty easy with Tapestry. However, I am confused as to how it works, with me coming from a GWT background.

In the Index.java

There is this code:

@CommitAfter
public void onSuccess(){
 session.persist(newItem);
}

I have work with Hibernate from the previous frameworks i've used, but I'm confused as to how the onSuccess is even called?

I mean, there is just this code in the Index.tml:

<t:beaneditform t:id="form" object="newItem"></t:beaneditform>

How does 'onSuccess' function is called? Or what is the thing that binds the a function from the java class to the tml?

Hope someone can shed some light.

Reply via email to