Re: Form using both a zone and no zone.

2011-07-27 Thread nillehammer
George Christman wrote: > > Nillehammer, I don't mind. I've been an interface designer for years, so > moving to the backend I'm rather green. I am very confused with how to use > annotations in my situation, so I'm going to post a snippet of my code and > hopefully you guys will be able to help

Re: Form using both a zone and no zone.

2011-07-27 Thread Thiago H. de Paula Figueiredo
On Wed, 27 Jul 2011 10:19:18 -0300, George Christman wrote: opps my save is backwards in my previous example @CommitAfter @OnEvent(value = EventConstants.SELECTED, component = "update") Object updatePurchaseRequest() { purchaseRequestState.setPurchaseRequest(getPurchaseRequest());

Re: Form using both a zone and no zone.

2011-07-27 Thread George Christman
opps my save is backwards in my previous example @CommitAfter Object onSelectedFromUpdate() { purchaseRequestState.setPurchaseRequest(getPurchaseRequest()); return formZone.getBody(); } Object onSelectedFromSave() { session.saveOrUpdate(getPurchaseRequest()); ret

Re: Form using both a zone and no zone.

2011-07-27 Thread George Christman
Nillehammer, I don't mind. I've been an interface designer for years, so moving to the backend I'm rather green. The more I can learn the better. I am very confused with how to use annotations in my situation, so I'm going to post a snippet of my code and hopefully you guys will be able to help cla

Re: Form using both a zone and no zone.

2011-07-27 Thread dragan.sahpas...@gmail.com
On Tue, Jul 26, 2011 at 11:48 PM, nillehammer < tapestry.nilleham...@winfonet.eu> wrote: > > Dragan Sahpaski wrote: > > > > Interesting, > > As I never had used annotations for event handlers in any project so far. > > I choose the name of the event to imply what is needed to be done in the > > m

Re: Form using both a zone and no zone.

2011-07-26 Thread nillehammer
Dragan Sahpaski wrote: > > Interesting, > As I never had used annotations for event handlers in any project so far. > I choose the name of the event to imply what is needed to be done in the > method, which I prefer to keep it as short as possible (3-4 lines of > code, rarely any more). > Sa

Re: Form using both a zone and no zone.

2011-07-26 Thread Thiago H. de Paula Figueiredo
On Tue, 26 Jul 2011 16:55:11 -0300, dragan.sahpas...@gmail.com wrote: Interesting, As I never had used annotations for event handlers in any project so far. I choose the name of the event to imply what is needed to be done in the method, which I prefer to keep it as short as possible (3-4 lin

Re: Form using both a zone and no zone.

2011-07-26 Thread dragan.sahpas...@gmail.com
On Tue, Jul 26, 2011 at 9:48 PM, nillehammer < tapestry.nilleham...@winfonet.eu> wrote: > > Thiago H. de Paula Figueiredo wrote: > > > > By the way, any event in Tapestry can be handled by using an annotation > in > > the method instead of relying on naming conventions. It's your choice. :) > > >

Re: Form using both a zone and no zone.

2011-07-26 Thread nillehammer
Thiago H. de Paula Figueiredo wrote: > > By the way, any event in Tapestry can be handled by using an annotation in > the method instead of relying on naming conventions. It's your choice. :) > That cannot be repeated often enough. I think it is better style to use a name that explains, what i

Re: Form using both a zone and no zone.

2011-07-26 Thread Thiago H. de Paula Figueiredo
On Tue, 26 Jul 2011 16:08:43 -0300, George Christman wrote: I wasn't aware of the onSelected method. Worked like a charm. Thanks guys. Actually, there's no onSelected method per se: the Submit component triggers the "selected" event. You could also handle it by declaring a method with

Re: Form using both a zone and no zone.

2011-07-26 Thread George Christman
Yup, tons of nested zones, but your exactly right, just resolved it moments ago with the attribute id. Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/Form-using-both-a-zone-and-no-zone-tp4635695p4635991.html Sent from the Tapestry - User mailing list archive at Nabb

Re: Form using both a zone and no zone.

2011-07-26 Thread dragan.sahpas...@gmail.com
I wasn't aware you had nested zones. Please paste the code here. It probably is the case that when the outer zone gets updated, tapestry changes the id of the inner zone, so if you wire the inner zone to the form using the zone paramter with a literal value of the id, than the form cannot find tha

Re: Form using both a zone and no zone.

2011-07-26 Thread George Christman
I think I spoke to soon, I'm getting a different error with all the nested zones. Can't find zone. Any thoughts -- View this message in context: http://tapestry.1045711.n5.nabble.com/Form-using-both-a-zone-and-no-zone-tp4635695p4635965.html Sent from the Tapestry - User mailing list archive at Na

Re: Form using both a zone and no zone.

2011-07-26 Thread George Christman
I wasn't aware of the onSelected method. Worked like a charm. Thanks guys. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Form-using-both-a-zone-and-no-zone-tp4635695p4635955.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Form using both a zone and no zone.

2011-07-26 Thread Thiago H. de Paula Figueiredo
On Tue, 26 Jul 2011 15:23:42 -0300, dragan.sahpas...@gmail.com wrote: Hi, Hi! When you submit a form using ajax you can return a Link that will send a redirect read more in the doc here . Even easier, y

Re: Form using both a zone and no zone.

2011-07-26 Thread dragan.sahpas...@gmail.com
Hi, When you submit a form using ajax you can return a Link that will send a redirect read more in the doc here . When having two submit buttons you can identify which one is clicked by using the onSelected event.