So, have your link/form logic actually call some other object's
method.  Then, make that method transactional and use something like
Spring to manage your transaction demarcation.


On Sun, Jun 22, 2008 at 2:11 PM, Justin Morgan - Logic Sector
<[EMAIL PROTECTED]> wrote:
> Thanks for your response, but what do I do in case the case of the error
> page, for example?  I'm not performing the transition myself in that case
> (but I still need to do a rollback).
>
> Plus, there are a lot of ways to go from page to page.  It seems a pain to
> add commit code to every link event handler, every button event handler,
> etc, that takes the user from one page to another (plus there's the
> possibility of forgetting to add it somewhere).
>
> Therefore it would be nice if there was one place where the Wicket framework
> could automatically tell the programmer, "Hey, you're going to transition to
> a new page now", so that the programmer has a chance to do any cleanup etc.
>  That's why I was hoping there's a "onPageTransition()" method on the
> application object, or something along those lines.
>
> - J
>
> On Jun 22, 2008, at 8:19 AM, Igor Vaynberg wrote:
>
>> since you are the one performing the transition from A to B you can
>> commit yourself, no?
>>
>> -igor
>>
>> On Sun, Jun 22, 2008 at 12:02 AM, Justin Morgan - Logic Sector
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Hopefully a simple problem for the group...  What's the best way to be
>>> notified when the application transitions from one page to another?  Does
>>> the application object receive any Wicket messages like
>>> "onPageTransition()"
>>> or anything like that?
>>>
>>> I ask because--in my application--when the user finishes interacting with
>>> Page A (typing data, submitting form, typing more data, submitting form
>>> again) and then transitions to Page B, I need to commit or rollback the
>>> database transaction that holds Page A inserts/updates.  This has to
>>> happen
>>> before the user actually sees Page B because there could be a problem
>>> with
>>> Page A data.
>>>
>>> BTW, in case it matters, I'm using an object database so I probably can't
>>> take advantage of any Wicket extensions for Hibernate or whatnot.
>>>
>>> Thanks for any info!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to