You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anandkumar Chandran <an...@verchaska.com> on 2004/02/09 08:04:15 UTC

URGENT!!! -- Exception Handling

Hi

I was working out on an assumption that the callback functionality persisits 
the page object with all the embedded properties in it. But it seems like the 
callback persists only the Page name .. Is my finiding correct ..?? I couldnt 
get a pointer on this.

Anyway, what I'm trying to do is always a pain in all the application, i.e a 
generic exception handler mechanism. 

I'm running out of options in this case. This is simple to handle pages which 
does not have a preloaded data in that page. But not in pages with data from 
DB, e.g A Registration confirmation page which has first half page filled 
with the registration information, the second half left open for inputing the 
confirmation details. And when I submit and some error occurs, I need to get 
back to the same registration confirmation page with first half page 
information retrieved from DB and the second half with user input data.

I think this isn't possible without making a DB call in the registration 
confirmation page load.

!st option is I could use session for each cycle to store the previous page 
information. But problem is 
1. clogging user session
2. No updated data in case of partial updation and then exception occurs (i.e 
Multiple delete function where half get deleted and half could not get 
deleted 'cos of data reference)

Any light on this is appreciated... I think this is universal problem .. if 
this could be handled in tapestry itself It would be of gr8 relief.

Thanx and Regards,
@nand

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


RE: URGENT!!! -- Exception Handling

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
This sounds like an issue with your backend. Tapestry does not, can not, know about your backend ...
just about JavaBeans properties.

The PageCallback does just store the name of the page.

Any persistent page properties will be restored (in the later request, when the callback is
utilized).

There's this thing call transactions :-)

Seriously, if you have a complicated series of operations, you want to use the Command pattern (see
Gang of Four) within a transaction. You might want to create your own ICallback implementation that
can store the list of Commands to execute.

Can't really help you beyond that without more details about your app.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components 
http://howardlewisship.com


> -----Original Message-----
> From: Anandkumar Chandran [mailto:anand@verchaska.com] 
> Sent: Monday, February 09, 2004 2:04 AM
> To: Tapestry users
> Subject: URGENT!!! -- Exception Handling
> 
> 
> Hi
> 
> I was working out on an assumption that the callback 
> functionality persisits 
> the page object with all the embedded properties in it. But 
> it seems like the 
> callback persists only the Page name .. Is my finiding 
> correct ..?? I couldnt 
> get a pointer on this.
> 
> Anyway, what I'm trying to do is always a pain in all the 
> application, i.e a 
> generic exception handler mechanism. 
> 
> I'm running out of options in this case. This is simple to 
> handle pages which 
> does not have a preloaded data in that page. But not in pages 
> with data from 
> DB, e.g A Registration confirmation page which has first half 
> page filled 
> with the registration information, the second half left open 
> for inputing the 
> confirmation details. And when I submit and some error 
> occurs, I need to get 
> back to the same registration confirmation page with first half page 
> information retrieved from DB and the second half with user 
> input data.
> 
> I think this isn't possible without making a DB call in the 
> registration 
> confirmation page load.
> 
> !st option is I could use session for each cycle to store the 
> previous page 
> information. But problem is 
> 1. clogging user session
> 2. No updated data in case of partial updation and then 
> exception occurs (i.e 
> Multiple delete function where half get deleted and half 
> could not get 
> deleted 'cos of data reference)
> 
> Any light on this is appreciated... I think this is universal 
> problem .. if 
> this could be handled in tapestry itself It would be of gr8 relief.
> 
> Thanx and Regards,
> @nand
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


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