You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Xybrek <xy...@gmail.com> on 2011/12/02 08:05:56 UTC

How Tapestry works

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.

Re: How Tapestry works

Posted by Xybrek <xy...@gmail.com>.
On 12/2/2011 3:05 PM, Xybrek wrote:
> 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.
>

I get it. onSuccess function is call for forms in the page. Thanks to 
the Wiki. Cheers.

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