[JClient 9.0.3] Trapping events and canceling actions

Subject: [JClient 9.0.3] Trapping events and canceling actions
I'd like to be able to, based on some condition, abort certain
actions (navigate, delete, insert, etc, etc) when the appropriate
events have been fired.
E.g., in case the Transaction is dirty and when I navigate to a
certain row in a certain ViewObject instance, I would like to
intercept this action and let the user decide what to do:
Commit/Rollback/Cancel. Of cource when 'Cancel' is selected, the
navigation-action should be aborted at all.
I have realised this functionality by subclassing JUNavigationBar
and either calling super's actionPerformed() or not. This works
perfectly, but of course there are other means to navigate (a
JComboBox + NavigationBinding, a JTable or programmatically), so
I would need to implement similar functionality for each of these
component types.
So, what I need to do is to intercept these actions on a lower
level. It appears that I need to register RowSetListeners to
ViewObject instances, but as far as I can tell, this way there
isn't a real way to abort these actions once they are started.
Am I pherhaps overlooking something? Any help and/or suggestions
would be greatly appreciated.
Arno

Subject: [JClient 9.0.3] Trapping events and canceling actions
I'd like to be able to, based on some condition, abort certain
actions (navigate, delete, insert, etc, etc) when the appropriate
events have been fired.
E.g., in case the Transaction is dirty and when I navigate to a
certain row in a certain ViewObject instance, I would like to
intercept this action and let the user decide what to do:
Commit/Rollback/Cancel. Of cource when 'Cancel' is selected, the
navigation-action should be aborted at all.
I have realised this functionality by subclassing JUNavigationBar
and either calling super's actionPerformed() or not. This works
perfectly, but of course there are other means to navigate (a
JComboBox + NavigationBinding, a JTable or programmatically), so
I would need to implement similar functionality for each of these
component types.
So, what I need to do is to intercept these actions on a lower
level. It appears that I need to register RowSetListeners to
ViewObject instances, but as far as I can tell, this way there
isn't a real way to abort these actions once they are started.
Am I pherhaps overlooking something? Any help and/or suggestions
would be greatly appreciated.Yes you're right in saying that there are many ways one could perform navigate - by other controls, by calling next() on the VO or even on the RowSetIterator. Also BC4J does not generate 'events' before navigation to preempt navigation unless a row is 'modified' in which case RowValidation events are generated for the Entities modified in that row.
The most generic way you may fix this is by 'listening' to rowsetiterator's navigation events and get the PreviousRow from the navigation events and set focus back to it if user presses cancel, or get the current RowKey and let the user commit/rollback and then restore the currency to a row with that rowkey (just in case the MT is set to clear all caches on commit/rollback transaction boundaries). Note that insert/delete events should not be handled this way as those event points are usually generated due to a button action and it's easier to preempt these actions rather than 'let the actions' complete and then perform a rollback-to-a-particular-point.
Arno

Similar Messages

  • Required attribute and cancel action

    How am I supposed to handle the following case (simplified):
    <h:inputText required="true" value="#{somebean.property}" />
    <h:messages />
    <h:commandButton type="submit" value="Cancel" action="cancel" />
    The "cancel" action is configured in faces-config.xml to navigate to another page and works like expected without the "required" attribute.
    But if I include the "required" attribute I get a validation error message and the navigation to the wanted page does not take place.
    Michael

    For action like "cancel" I would recommend to use attribute "immediate"
    <h:commandButton action="cancel" value="Cancel" immediate="true"/>Vladimir

  • Infotype needed  for firm booking and canceling at PV12 transaction.

    Dear All,
              I am workflow consultant.I am not well aware of infotype details for the following scenario.
              I am now involved in workflow development for SAP HCM training and event management.
              When firm booking or cancel booking is done at PV12 transaction, workflow should trigger.
              Should workflow trigger on booking or canceling it, I have to maintain infotype details in HR master tables.
              So, please state about what is the infotype for firm booking and cancel booking for which I'll be grateful.
    Thanks and regards,
    S.Suresh

    Dear all,
                  Any one one know where to check for the infotype which is getting affected when firm booking or cancel is made in PV12 transaction?
                  Please suggest for which I'll be grateful.
    Thanks and regards,
    S.Suresh

  • Trapping Events such as Goods Reciept for Purchase Order

    Hi,
    I want to be able to trap events such as a Goods Reciept and respond to it.
    Because this can happen both in the goods reciept form or the AP Invoice Form or by automatic posting, is there a way to 'listen' for this event behind the scenes ?
    I also want to do it with reciepting production orders.
    Thanks
    Nick

    HI,
    USe SP_TRANSACTIONNITOFICATION for trapping events at SQL server SIDE.
    I am suggesting:
    1. Create your table
    2. Write a simple code in T-SQL into SP_TRANSACTIONNITOFICATION  which the monitored event inserts rows into your table
    3. Check the table from your addon and process the rows inside,
    Or use the following solution:
    Re: Stored Proc - BP Account On Hold
    It is hard, but working.
    Regards,
    J.

  • Reg: save exit and cancel buttons

    Hi,
    In normal report programs when we enable the back , exit and cancel buttons they work fine without writing any code.but its not in the case of Module pool why?
    In thr normal reports where does the code come from?
    regards
    prasanth

    Hi....
    Module pool programs is nothing but screen flow + reports...
    Here we designing the screens....
    So we hav to to give every functionality.. for all buttons and menu items of the appeared screen...
    Where as in reports...,
    We are just using the standard screen (sellection screen and list output screen ) s mostly...,
    Here also some times we hav to go for created screens.. nothing but.... interactive reports...,
    There we need to give again all those functionalities...
    And..,
    To see the BACK button logic and other logics in the reports...,
    Ex: PAI event of SAPLWBABAP program..., 
    You can find that name with...
    By giving /H and enter before ur action...
    Thanks,
    Naveen.I

  • Icloud deleted recurring event and send notifications to everybody. I never used icloud and never deleted this event.

    I never used icloud and never made any changes to my icloud.
    Today icloud sent notifications to 100 people that the event was cancelled. I didnt made any changes. Those 100 people wrote "very good feedback"
    This event was created not in icloud, it was created in Outlook on my work PC, and it was done half a year ago.
    As I understand events from my outlook synced with icloud and iclud somehow made chamges without my permission.
    But the most fummy thing that event is still present in icloud, in Outlook and in my Iphone also.
    Please FIX or explain this, I dodnt want to have a repeat of this bug tomorrow

    Thanks, yeah I called Apple Customer Services and the guy said that the only thing I can do is restore my phone from my latest iTunes backup.
    The screen I got when this debacle happened literally said: "What would you like to do with the previously synched iCloud contacts on your iPhone?" It's so poorly worded, I thought it was just referring to the contacts that were just put on my phone from my computer, hense the "previously synched iCloud contacts" but when I was on the phone with the guy he was saying that I misunderstood the screen.
    I don't think I'm crazy, they could have worded it better and made it more clear they meant ALL contacts deleted, not just the ones synched from iCloud.

  • Popups how top program the ok and cancel button

    How do I program the ok and cancel button in the popups. I want to add functionality to the existing ok and cancel buttons in the popup
    Thanks,
    Veena

    You can ise a dialog inside the popup and use a dialogListener to check how hte dialog has been closed
    public void handleDialog(DialogEvent event)
      if (event.getOutcome().equals(DialogEvent.Outcome.no))
        setGender(getOldGender());
        // reference to the gender component is from component binding
        // see selectOneRadio above - binding="#{sharedPopup.genderComponent}
        RequestContext.getCurrentInstance().addPartialTarget(getGenderComponent());
    }{code}
    Timo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Delete BOTH an event and To Do at the same time?

    Just getting a handle on the To Do feature - which I've never really used. I looked into some of the other GTD apps but I don't really need anything that in-depth right now, and I can use iCal to easily sync with my Treo. Anyway ...
    I read another post with the tip of dragging an event from the calendar into the To Do list - that way it adds a header above the item (ie. Yesterday, Today).
    But when I delete either the To Do or the event, the other one is still there. I'm guessing ical just copied the event, and doesn't actually link it somehow. Just a bit of a PITA as I have to delete both.
    Has anyone found a soluton for this? TIA.

    Ok let me clarify this, I got a internet connection, I got a router, Im having a problem with windows Vista when I boot up the computer its starting both the local area connection and the wireless connection at the same time, and when that happens it conflicts and cancels my internet connection, all the above suggestions I already have, done.
    Im just wondering how do I setup the network so it won't conflict with the internet wireless connection and still keep the local connection alive on my home computers, or if I have to how do I shut off my local connection so that won't start up when I re-boot the computer or boot it from a cold start. Its not letting me shut down the Local Area connection when I boot with Vista, and giving me network errors!! GRRR!!
    Message Edited by jughead4158 on 10-08-2008 07:28 AM

  • How to remove default Apply, OK and Cancel buttons in portlet edit mode.

    Hi,
    Iam facing problem in customizing default edit mode of portlet, my question is how to remove those default buttons and how to implement our own links for SAVE and CANCEL functionality. Because if we implement our own <form> in edit JSP page then default form will override our own <form> and default buttons works rather then our own forms.
    Please someone help me on this.
    Thanks
    Abhishek

    Ah, this one is easy, if im not mistaken, set this tag in your provider.xml
    <renderCustomize>false</renderCustomize>
    Defines whether RenderManager should automatically render the portlet's container (border and title) in "Edit" and "EditDefaults" modes before and after processing/invoking the page.
    This however means you have to write your own renderer for the customize page. Then you can add your own code for the buttons and the events behind them.
    I created my own derived container and added this line to my provider.xml
    <containerRenderer class="nl.rsm.eventCalendar.myContainerRenderer"/>
    This is however for rendering the showmode of the servlet, dont know if this is the same
    render class for the editmode.
    Do you realy need custom save functionality, Oracle also has something called DBPreferenceStore, you can store self defined attributes into the database. Perhaps this is sufficiant enough.
    anyway good luck, if you find out all the correct steps to take, please share, im also interested

  • Can any explain the following:  Background; my company uses google business app to host our email and calander.   Ok, I just set up a iCal event and invited 3 people.  1 internal claims he never got but it showed on his daughters iPod and she does not ema

    Can any explain the following:  Background; my company uses google business app to host our email and calander.   Ok, I just set up a iCal event and invited 3 people.  1 internal claims he never got but it showed on his daughters iPod and she does not email.

    Hello binbingogoABC,
    Shopping on BestBuy.com should be easy and fun and not fraught with the kind of trouble that you describe. I regret very much that this has been your experience.
    Using the information you provided when you signed up for Best Buy Unboxed I was able to locate your cancelled orders. I have requested more information from my back-office partners. As soon as I have additional details about your situation, I will reply again to this message. In the interim, I'm sorry that I must impose upon your patience.
    I'm very grateful that you wrote to us with your concerns.
    Sincerely,

  • Batch job scheduling based on Event AND for the job to complete

    I am trying to schedule a background job based on an event AND based on the job finishing itself.
    Example:
    Job name: Send_Message
    After Event: SAP_NEW_PROCESS Message
    Program:  Program xxxx
    I want that the Send_Message job only runs when the Event SAP_NEW_PROCESS message happens AND the Send_Message job is not running.
    Right now, I could only schedule it based on the event SAP_NEW_PROCESS Message which means that everytime this event happens the job runs and I end up having the job "Send_Message" in multilple intances where the others will immediately cancel since the first job is still running and so I end up with a lot of Cancelled job when it is not necessary to run them all when there is already 1 instance of the Job running.
    How do I set it up in SAP?

    Thanks but I am new to SAP having to set up a batch job.
    The Event "SAP_NEW_PROCESS_MESSAGES" is a standard SAP Event.  We used that such that when a new transaction comes in, the batch job will run but we don't want to run the batch job if the same batch job is already running.
    YOu mentioned that I should set up Job_0.  Do I need to create an ABAP prorgram to check if JOB_1 is running?  How do I set up Job_0?  What is the trigger for my Job_0 to run?
    You also said that I set up Job_1 and trigger that based on the outcome of Job_0 AND at the same time be triggered by the event "SAP_NEW_PROCESS_MESSAGES".  How do I set up  this Job_1 so that it can be triggered by both Job_0 and a new transaction coming in(SAP_NEW_PROCESS_MESSAGES).
    if you can provide me the step by step guide as I am new to this and I only know basic.
    The current set up I have is
    Job_1
    Job Start:
          After Event
                Event: SAP_NEW_PROCESS_MESSAGES
          Step 1: program to run RCOCB002
    I was thinking following your suggestion is this:
    Job_0
    Job Start
          After Event
                Event: SAP_NEW_PROCESS_MESSAGES
          Step 1: program to run - What will be my program to run?
    Job_1
    Job_Start
          After Event
                Event: What will be my trigger for Job_1 and how do I set it up?
          Step 1: program to run RCOCB002
    Edited by: Shirley Te on Mar 10, 2010 3:25 PM

  • How to trap opening and closing of adobe print dialog?

    I'm working on a asp.net page with dynamically embedded pdf document in it.
    I'm using embedded  javascript to print the pdf document after a button click and some processing serverside.
    As you know print dialog doesn't open immediately and it takes some to open.
    And now I'm in a situation where I need to trap opening and closing events of pdf print dialog,
    as internet explorer doesn't wait for print dialog to be closed before returning the page control flow to my
    script and as a consequence the user will not be aware of opening print dialog and maybe perform other actions
    without printing.
    Thanks in advance for any HELP!

    I'm working on a asp.net page with dynamically embedded pdf document in it.
    I'm using embedded  javascript to print the pdf document after a button click and some processing serverside.
    As you know print dialog doesn't open immediately and it takes some to open.
    And now I'm in a situation where I need to trap opening and closing events of pdf print dialog,
    as internet explorer doesn't wait for print dialog to be closed before returning the page control flow to my
    script and as a consequence the user will not be aware of opening print dialog and maybe perform other actions
    without printing.
    Thanks in advance for any HELP!

  • Catch and cancel "Enter" processing in kIntComboBoxWidget

    Hello everyone!
    I've faced the following problem:
    My dialog contains kIntComboBoxWidget. I need to catch and cancel processing of Enter, Return keypress.
    I know (from documentation), that combobox consists of two controls: editbox and drop-downl list. So, I inherited kMyIntComboBoxWidgetBoss from kIntComboBoxWidgetBoss, signed it to IEventHandler through
    Class
    kPhfntFontSizeComboBoxWidgetBoss,
    kIntComboBoxWidgetBoss,
    IID_IEVENTHANDLER, kFontSizeComboBoxEventHandlerImpl,
    and also subsribed my my observer with WindetID to IID_IEVENTHANDLER protocol.
    But all I managed to catch - are messages from Dropdown-list. I could not catch any message from editbox.
    So, IID_IEVENTHANDLER for EditBox in ComboBox is not reachable for me.
    So why do a need to catch Enter-press? I just can't have any default OK button on my dialog, because it's presence on dialog leads to undefined behavoir to other controls on my dialog - I need to click twice on every control on order to LButtonUp invoked, though LButtonDown is invoked from the fist time.
    How can I do that?

    You know, I've just made some debug and there are some actions, which I've done:
    I've opened my dialog and:
    1st - clicked on some button(nothing happened),
    2nd - clicked on the same button (dialog closed-as my button closes it)
    Then, I've debugged it and discovered, that during first click, in EventHandler for my button only LButtonDn is invoked, LbuttonUp is NOT invoked during first click.
    But during the second click on the same button either LbuttonDn and LButtonUp are invoked.
    There is debug log:
    There are some strange differences, which I've selected in bold:
    SetLastEventCausedAlert false because msg:(0x201)
    PMSuperProcEnabler dispatching event kLButtonDn (0x12f010)
    DispatchToEventHandlers passed event to EH impl kTipsEHImpl (Class kTipsPanelBoss).
    DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to EH impl kDialogEventFilterEHImpl (Class kDialogEventFilterBoss).
    DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to EH impl kToolEventHandlerImpl (Class Unknown3rdPartyPrefix + 168 (0xe94a8)).
    DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to DefaultEH
    CDefaultEH :: LButtonDn passing event(with sys window 0x1310ea) to eh impl Unknown3rdPartyPrefix + 162 (0xe94a2) of boss Unknown3rdPartyPrefix + 161 (0xe94a1) with WidgetID Unknown3rdPartyPrefix + 161 (0xe94a1)
    DispatchToEventHandlers - EH Returned 0
    PMSuperProcEnabler dispatching event unknown type (0x12f010)
    DispatchToEventHandlers passed event to EH impl kTipsEHImpl (Class kTipsPanelBoss).
    DispatchToEventHandlers - EH Returned 0
    b DispatchToEventHandlers passed event to EH impl kDialogEventFilterEHImpl (Class kDialogEventFilterBoss).
    b DispatchToEventHandlers - EH Returned 0
    b DispatchToEventHandlers passed event to EH impl kToolEventHandlerImpl (Class Unknown3rdPartyPrefix + 168 (0xe94a8)).
    b DispatchToEventHandlers - EH Returned 1
    SetLastEventCausedAlert false because msg:(0x201)
    PMSuperProcEnabler dispatching event kLButtonDn (0x12f010)
    DispatchToEventHandlers passed event to EH impl kTipsEHImpl (Class kTipsPanelBoss).
    DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to EH impl kDialogEventFilterEHImpl (Class kDialogEventFilterBoss).
    DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to DefaultEH
    CDefaultEH :: LButtonDn passing event(with sys window 0x1310ea) to eh impl Unknown3rdPartyPrefix + 162 (0xe94a2) of boss Unknown3rdPartyPrefix + 161 (0xe94a1) with WidgetID Unknown3rdPartyPrefix + 161 (0xe94a1)
    DispatchToEventHandlers - EH Returned 0
    PMSuperProcEnabler dispatching event unknown type (0x12f010)
    DispatchToEventHandlers passed event to EH impl kTipsEHImpl (Class kTipsPanelBoss).
    DispatchToEventHandlers - EH Returned 0
    b DispatchToEventHandlers passed event to EH impl kDialogEventFilterEHImpl (Class kDialogEventFilterBoss).
    b DispatchToEventHandlers - EH Returned 0
    DispatchToEventHandlers passed event to DefaultEH
    CDefaultEH :: LButtonUp passing event(with sys window 0x1310ea) to eh impl Unknown3rdPartyPrefix + 162 (0xe94a2) of boss Unknown3rdPartyPrefix + 161 (0xe94a1) with WidgetID Unknown3rdPartyPrefix + 161 (0xe94a1)
    It seems, like messages are posted there, where they should not be posted.
    It's there any ideas what's happening there?
    And one more detail: Buttons need two click on both platforms( Mac & Win), though, ComboBoxes need two click only on Windows - on Mac it works fine (Thanks for help in related thread!)
    Thanks!

  • Open and cancelled Quote Report

    Hi,
    Can anyone give me the information  for getting open and cancelled Quote Report?

    I hope you are using reason for rejection for cancelling quotations. If that is the case, you can use transaction VA25 to view the list of quotations. Here you can filter on two columns status and reason for rejection to view the report as per your requirement.
    Regards,
    GSL.

  • Mark waiting and cancelled tasks completed

    Hi All,
    is there sql somewhere that can mark certain tasks that are in waiting and canceled status to Completed?
    Thanx.
    Fred

    I would suggest using the APIs to update the status or use the manuallyComplete API instead.
    -Kevin

Maybe you are looking for

  • Regarding date calculations

    Hi Experts,     My problem is i have a start date and either the no of weeks or no of months will be entered dynamically based on this value i.e take for eg. 10 months is entered then i have to calculate the stock for 10 months and display 1st month 

  • Why no apple support

    Having read Apple's help pages extensively for an answer - their advice is to contact my email provider for support. Since Apple are my email providers - I need to contact them to get my email working again. However, there is no Apple Support offered

  • I just see apple logo and spinning wheel when I turn computer on.

    I installed the recent updates and now I can't the computer to start.

  • Possible to have CS6 Mac auto-update?

    on a Mac OS 10.9 (Mavericks) using CS6 (not creative cloud) whenever there's an update, the AAM puts an icon in my menubar. i have to click it & tell it to go ahead with an update. is it possible to set this to just DO the updates without the icon or

  • On startup I get error msg: BRW is undefined

    When I start Firefox I get the error message: "Exc in ev handl: TypeError: brw is undefined" and sometimes FireFox fails to open. When it does open it is to a blank page not my home page. When I click on the Home button my correct Home page opens. I