Manual vs Programmatically closing

I have a program that has internal frames. These internal frames can either be closed manually by the user, or it can be programmatically closed by itself on certain situations. How do I detect whether the closing was done manually or programmatically?
I know about listeners. And in fact, my listener triggers in both cases (i.e. when I close the internal frame manually or when I use setClosed method).
Do I have to "make a note" when I programmatically close the internal frame so that the internal frame listener will not trigger in such a case?

Do I have to "make a note" when I programmatically close the internal frame Yes.
One way is to remove the listener before closing the internal frame.

Similar Messages

  • Programmatically closing a popup from a managed bean

    Hi,
    in the following blog [http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/|http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/]
    the following statement is being made at the end ...
    The JavaScript call is issued as "window.exitPopup()" because the script is called from the page root. You can easily see how the JavaScript can be modified to have "exitPopup" becoming a generic function avoiding hard coded popup ID's as in my example.
    I don't understand how to avoid hardcoded popup ID's. Could someone please explain this to me.
    Thank you
    Bodhy

    Hi,
    thank you. It is working.
    @Timo
    The closePopup function in your comment has the variable popupId. That made me wonder, if it is possible to set this variable in my jspx page.
    I made a workaround by defining a new variable called popupId with getter and setter methods and using the setActionListener to set that popupId. After that I was calling the closePopup() function. Do you know a better way doing this?
    @Frank
    I was also reading through Frank's blog about JavaScript [http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/|http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/] , trying to find a solution to call JavaScript functions with variables (defining these variables in my jsp page). Is this possible?
    Thank you
    Bodhy

  • Manual Save, Programmatic Save, and Save Entire Tab

    There’s quite a few nice features native to LabVIEW that makes image capturing easy and convenient. In this post I want to focus on Manual Save, Programmatic Save, and Save Entire Tab.  
    Manual Save
    You can manually right-click any graph or plot during runtime and select Export > Export Simplified Image.  Choose a name for your *.bmp image and directory and save an exact image of the graph to disk. 
    Programmatic Graph Save
    This save feature is also available programmatically through LabVIEW methods.  When not running, right-click on the graph you’d like to save during runtime and create a reference.  Find and select the graph method “Export Image”.  Wire the ‘Image Data’ output from the node into one of the image write VIs found in the ‘Graphics and Sound’ > ‘Graphics Formats’ palette.  Make sure to append the correct file extension to your path. 
    Save Entire Tab
    Often the graph doesn’t contain all necessary information such as user parameters governing the process.  If these setting are available near the graph on a tab control, you can take a screenshot of the open tab and save it to disk.  The method is very similar to the single graph save, but simpler since the graph colors don’t need to be altered.
    Here you can see the image “graph1 – 11Oct27.bmp” as produced by the above code.  Notice the angle cluster and graph title is also captured, giving more context to the displayed data.
    Hopefully you will find these methods useful and easy to implement.  I go into a bit more detail in my blog should you find it helpful:
    http://www.dmcinfo.com/Blog/articleType/ArticleView/articleId/969/Programmatic-Saves-of-LabVIEW-Plot...

    The only problem is that you posted to the idea exchange, whereas this is not an idea. I'll ask a moderator to move it.
    Try to take over the world!

  • How to do the Manual Depreciation for Closed Fisical Year (2009) in Feb2010

    Hi Experts,
    One Asset Start Using from 30.06.09.
    Capitalized Date is 30.06.09.
    But Asset (invoice) is Created, First Acquisition Date is 31.01.10.
    Manually Entered the Depreciation Date is 30.06.09.
    now i have to run the depreciation previous year (7months) depreciation.
    Asset 2009 fiscal year is closed.
    system posted the jan 2010 dep.
    How can i post the depreciation ?
    Thanks in Advance.
    Edited by: 69veera on Feb 24, 2010 8:00 AM

    Hi
    Try OAAQ to open the previous year and then using ABMA post manual depreciation. Also the FI period has to be open in OB52
    Thank You,

  • Enabling 'Manual Ordering' programmatically

    Is there a way to programmatically enable Manual Ordering for a KM folder?  I'd like to setup a repository service that checks for these kind of services and automatically inherits the parent folder's status to subfolders, but I can't find the APIs that handle the Manual Ordering status.  I thought that Manual Ordering was a part of the Statemanagement Service...?
    Thanks in advance,
    Fallon

    No, it's part of the framework. See <https://media.sdn.sap.com/javadocs/NW04/SPS15/km/com/sapportals/wcm/repository/IOrderableCollection.html> (you need to get access to that interface through IResource.as(...)).
    Best regards, Julian

  • Manual Ordering Programmatically

    Hi Experts,
        I have a scenario to enable Manual Ordering of KM through development.  I have seen the functionality of Manual Ordering in KM (e.g. Top, Up, Down, Bottom).  I want to do the same functionality with different buttons based on development.  How can I do that?
    If possible, please provide code sample for this.
    Regards,
    Venkatesh. K

    Venkatesh K wrote:Venkatesh K wrote:>
    > Hi Julian,
    >
    >
    > Thanks for your answer, I found API for Manual Ordering.But still I having problem to develop this.Here,
    >
    > col.setOrderignType(<IUri parameter>). How can I create object of IUri  and what value I need to pass in  this IUri parameter. I refered this link but still I have some confusion.
    >
    > https://help.sap.com/javadocs/NW04S/current/km/com/sapportals/wcm/repository/IOrderableCollection.html
    IOrderableCollection col = (IOrderableCollection)resource.as(IOrderableCollection.class);
    if (col != null) {
      col.setOrderingType(UriFactory.parseURI("DAV:custom"));
    >
    > After enable Manaul ordering programatically, I want to re order(Move Up, Move Down) resource by programatically. For that, I found some Interfaces in this API.
    >
    > IPosition
    > IPositioning
    > IReorderList
    > IReorderListIterator
    >
    > How to use these interfaces to achive ?. Pls give some more idea on this.
    You use them with the resource creation, move an copy method.
    Best regards, Julian

  • Programmatically closing a JMenu

    Hi,
    I am working on an speech based application using JSAPI. To add the the users ease, i have commands like "open file menu etc. which would then open (drop down) the file menu.
    the following line would do this:
    fileMenu.doClick();
    where fileMenu is a JMenu
    this opens up the file menu, however i also have commands like "close file menu".
    so far i have been able to open any menu and havent figured out a way to close the menus. i have tried the doClick() method again when the menu is open to close it, but this does seems to work.
    can anyone help me out with this??
    ameer.

    iam not sure of this but i realised that the file menu closes when it loses focus, so what you can do is when u say "Close menu" then put the focus on another component, iam sure there must be better ways to do than this but this was the best i could think of. you could use like
    fileMenu.ABORT;
    or
    fileMenu.hide();
    not sure which is the one, try it out.
    asrar

  • Illustrator CS5 crashes on programmatically closing document.

    Hi,
    I have developed a plugin in which I need to close an active document on click of a button. On clicking my plugin menu item a dialog opens with "Ok" and "Cancel" button. On clicking "Ok" button, the plugin will first close the active document and then will close the dialog and clicking on "Cancel" button will close the dialog.
    My plugin works and closes the document and dialog but after few seconds or if I shift focus from Illustrator, the Illustrator crashes with the following message:
    "Unhandled exception at 0Xbaadf00d in Illustrator.exe:0XC0000005:Access violation reading location 0Xbaadf00d".
    I am using sAIDocList->Close() function to close the active document and EndModal function to close the dialog.
    I am on windows Xp and using Illustrator Cs5 and Cs4.
    Can someone please guide me on why the crash is occuring and how can I solve this crash??
    Thanks.

    your best bet may be to try and solve the problem without finding the problem.
    uninstall illustrator cs5
    run the cleaner (http://www.adobe.com/support/contact/cscleanertool.html)
    then reinstall illustrator cs5.
    update.

  • Programmatically closing the dialog??

    Hello,
    I am using Jdev 11.1.1.2
    How to close the yesNo confirmation diaglog programmaticaly?? eg when user press 'Yes' button in confirmation dialog(popup),I want excecute some logic in DialogListener and close the dialog.
    Any pointers??
    Regards
    RB

    I hope you dialog is something like below:
                      <af:popup binding="#{backingBeanScope.backing_MyBackingBean.popup14}" id="popup14">
                        <af:dialog binding="#{backingBeanScope.backing_MyBackingBean.dialog1}" id="dialog1" title="Information" modal="true" type="yesNo"
                                   dialogListener="#{backingBeanScope.backing_MyBackingBean.dialog1_dialogListener}">
                          <af:outputText binding="#{backingBeanScope.backing_MyBackingBean.outputText112}" id="outputText112"/>
                        </af:dialog>
                      </af:popup>
        public void dialog1_dialogListener(DialogEvent dialogEvent) {
            if (dialogEvent.getOutcome().equals(DialogEvent.Outcome.yes)){
            }else{
        }to close popup...
    StringBuilder script = new StringBuilder();
            FacesContext context =  FacesContext.getCurrentInstance();
                      script.append("var popup = AdfPage.PAGE.findComponent('").append(<your popupId>).append("'); ")           
                            .append("if (popup.isPopupVisible()) { ")                
                            .append("popup.hide();}");
                      ExtendedRenderKitService erks =
                        Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
                        erks.addScript(context, script.toString());

  • Boot Camp and Windows 7 - closing lid, won't wake up

    Hi all,
    I just installed build 7600 of Windows 7 (32-bit) in Boot Camp on a Macbook I bought around December 2008. For the most part, Windows 7 seems completely compatible with the Boot Camp system. Unfortunately, I'm having problems with the screen remaining black after either putting the computer to sleep manually or by closing the lid. What happens each time is that the computer sleeps the first time I attempt this and then wakes up like normal, but the second time I do it, the black screen refuses to go away. When I close the lid, the little white light on the front of the Mac stays lit (it doesn't flash), and when I open it, it actually turns off(?!?).
    I really don't know what to do about it, and it's super unfortunate because if I forget to not let my computer fall asleep I lose all my work. Has anyone found a successful fix in Windows 7 or even in Windows Vista?
    Thank you everyone.

    Some more info I have gleaned from my 13" white Core 2 Duo Macbook (not sure what generation - came with Tiger though). If I uninstall the Intel graphics drivers, the Sleep option is gone from Windows 7 but it will hibernate, and when resuming from hibernation the screen comes back on. However, when the Intel drivers are reinstalled the "screen off" problem is present for both hybernate and sleep. Two other data points: the power manager can't turn off the screen (after X minutes, etc) and I can't get any picture on an external monitor either. Just wanted to share.

  • Lion software - program closed but still highlighted

    MacBook Pro - OSX version 10.7.5 - 2.66 GHz Intel Core 2 Duo- 4 B 1067 MHz DDR3
    Have been experiencing power related problems due to battery draining when all programs and lid is closed.  Noticing when programs are closed the icons remain highlighted with light lite as though the program was still running.  Manually opened and closed program so program appears to be closed before closing the computer lid.  Power still drains faster than normal in this state.  If not using MacBook for a day, the power is in critical level when lid is opened. 

    To turn off resume, go to system preferences > general > re-open windows when opening an application (or something like that). Alternately, when you quit Safari, hold down the option key (cmd - option - q).
    Your Pages problem can be resolved by using the new feature called "duplicate". This is the new version of "Save As...", and it will do exactly the same.
    Best of luck.

  • PR To PO conversion via ME59, Closed Indicator

    Hi,
    We have set up ME59 to create POs from PR.
    1.The 'Closed' indicator (in Quantities/Dates tab of PR) was not set. What to be done?
    2. Main thing which is baffling is that in Production system, multiple POs continue to get created for a single PR.
    Any thoughts on how to have the indicator set up to closed in PR?
    and How to avoid the multiple PO issue?
    fyi..
    while running ME59, I have set 'Set Requisitions to "Closed"' to '1'.
    Regards

    Thanks Pavan/Charlie,
    I had already done the setting of 06 76.(Could not actually simulate and verify, as in the dev. duplicate POs were never created.)
    Before I move that to Production, also wanted to know about the 'CLOSED' indicator.
    Pavan,
    You are right when POs are created manually (ME21N). Closed indicator does not stop it. However it restricts the PO creation when set in background (ME59 variant set to run in background.)
    Charlie,
    The issue with 2(Always) would be that even for Partial PR conversion to PO, then the PR may be prematurely closed.
    A.) What would be your suggestion to take care of the 'CLOSED' issue?
    B.) If 06/76 set up for error, then can the setting 06/608,06/648 be avoided?
    Regards,
    Sameer

  • Interaction between Excel and Word OLE

    I am using Office 2007 to write procedures but a problem is apparent only when run on Office 2013.
    A procedure in a workbook that records Sales information runs to transfer data to another workbook that stores Invoice information, and then opens Word to generate a mail merge document from a template (dotm) which has an event procedure (on Open) to merge
    data from the Invoice spreadsheet into a document to produce an invoice.  This procedure works without problem on the Office 2007 (Vista) machine and until recently likewise ran without problem on the Office 2013 (Windows 8.1) machine.  However,
    apparently following an automatic update to the Office 2013 machine, when the Word document is generated the procedure "hangs" at the point of reading the data from the Invoice workbook, and after a longish delay a message is generated along the
    lines of the program awaiting an OLE action.  The only way to stop the whole process is via task manager.
    After much research I have found that on the Office 2013 machine, the mail merge of data from the Invoice workbook will not now work if the Invoice workbook is open, bot works OK if it is closed.
    I have therefore programmatically closed the Invoice workbook, and the procedure now works on the Office 2013 machine (and on the Office 2007 machine).  However, I would like the Invoice workbook to be open when the Word document has been generated. 
    I therefore inserted a few seconds wait into the procedure to allow the mail merge to be completed, then tried to reopen the Invoice workbook.  I now get the message that the Invoice workbook is locked for editing, and asking if I want to open a read
    only copy (which I don't).  The Invoice workbook does not appear on the task bar, nor does it appear in task manager.  I have tried code to make it active and I then get "subscript out of range", and I have tried code to make it visible
    and I again get "subscript out of range".  However, if I close down the word documents generated with the data from the Invoice workbook, I can then open it;  presumably the merge process is treated as still being in progress while the
    documents are open, and the Invoice workbook is "released" when the documents are closed.
    Has anyone any advice to offer on how to deal with this problem of not being able to open the Invoice workbook while the mail merge documents are open.  The problem is apparent in both Office 2007 and 2013.

    Hi Caillen
    Thanks for looking at this.  I should explain that I do all my work on an Office 2007 machine for a family member who lives elsewhere, so I don't have direct access to the Office 2013 machine.  However, they are reasonably computer literate and
    report faults accurately.  To deal with your queries:
    1.  Their Office (and Windows) updates are installed automatically.  Basically, their systems are kept up to date.  It is only a guess that an update may have caused the problem, for the procedure worked as expected for some months and no
    other changes have been made.  The problem does not occur on my Office 2007 machine.
    2.  For the initial problem there was no error message initially;  the little circle just kept going round for a minute or so, then a message appeared on the Office 2013 machine saying that Excel was waiting for another program to complete an OLE
    action.  That message no longer appears because I have cured the problem by closing the workbook that is the data source for the mail merge.
    3.  I do indeed mean VBA code by procedure (Sub xxx()).  The code in the Word Template on which the procedure originally hung up was the third line below - i,e, the line starting ActiveDocument.MailMerge.OpenDataSource Name:= _
    Sub ctPrintInvoice()
        ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
        ActiveDocument.MailMerge.OpenDataSource Name:= _
            ThisDocument.Path & "\ColTarInvoices.xlsm", _
            LinkToSource:=True, _
            Revert:=False, _
            Format:=wdOpenFormatAuto, Connection:="DETAILS", _
            SQLStatement:="SELECT * FROM `'Print Invoice$'`", SQLStatement1:=""
    "DETAILS" is a named range within the workbook that is the data source for the mail merge.  "Print Invoice" is the name of the worksheet that holds the data.  This code runs as an event on opening the document, which is done
    automatically within the code in the workbook.  The code in the Sales workbook to open the document is:
        Set objWord = CreateObject("Word.Application")
        If strSourceSheet = "Sales" Then
            Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctInvoice1.dotm")
        ElseIf strSourceSheet = "Euro Sales" Then
            Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctEuroInvoice1.dotm")
        End If
        objWord.Visible = True
        Set objWord = Nothing
        Set objctMergeDoc = Nothing
    However, the procedure also hung in the same place on the Office 2013 machine if the document was opened manually.
    4.  The code in the Sales workbook to close the Invoice workbook is:
       Workbooks("ColTarInvoices.xlsm").Close
    The code to reopen it is:
       Workbooks.Open (ThisWorkbook.Path & "\ColtarInvoices.xlsm")
    This generates the message that the workbook is locked for editing.  The same message is generated if I try to open the workbook manually while the merged documents are still open.
    (The files are all in the same folder)
    With thanks
    Andy C

  • How to obtain position/view within PDF

    There is much information regarding how to open a PDF at a particular page etc. from the command line.
    How can the data be obtained and stored externally while reading the document.
    Perhaps more precisely, if I edited a page and then later wanted to open the PDF at a specific edit from, say, a shortcut, because I don't wish to write down the page number how might I go about obtaining the data to add to the shortcut command line?
    Thank you

    Thank you.
    I have read from the link you provided but it only tells me what I knew regarding how to achieve this manually not programmatically.
    I can see that I have not explained very well.
    I wish through external means (a program/script I will write), to click a button at any time and multiple times, while reading a PDFand have the program obtain (from somewhere/anywhere/even Windows itself) the position I am at while reading a PDF and inject it into a url.
    The end result will be a list (in an HTML page?) of the url's I have saved. i.e. the same as internal bookmarks but external.
    The information exists because a PDF can be re-opened at the current page when closing by it saving that information.
    I do understand that I can do it by noting the position myself and injecting it.
    Useage example:
    While editing video's I am reading from several PDF's at the same time, with differing viewpoints, and at various stages I want to bookmark and make a comment from whichever PDF my eyes are on (thus effectively at random).
    Doing it within the PDF does not tell me (later, externally) which PDF or the order in which the bookmarks were made, if I wish to recreate the learning process.
    All I can at present do is open each PDF and got to its various bookmarks out of sequence both within the book and choice of book.
    Clearly the bookmarks need to appear in a list in the order created and each must select the appropriate book and page within that book. Then the previous session's progress can be recreated.
    Perhaps it is now clearer.
    I can write the program but where do I obtain, programmatically when I click the button, the current PDF title (file url) and page number within it, to place in the list of url's?
    Any suggestions please

  • How to configure a VME device within the software?

    I've got a VME-MXI-2 interface cobnnected to a VME crate. I'm using the ni-vxi driver to access the VME cards in the crate. I can't configure the VME configuration manually using the tools for variuos reasons. So I tried to do it directly in the software using CreateDevInfo and SetDevInfo functions. But although GetDevInfo shows me the same information about the device as it does when I do a manual configuration, I can't access the device. (bus error, but it doesn't access the VME bus at all) Is it possible at all to configure a VME device only from the software and not doing it manually? If yes, what else do I have to do apart from creating the device with CreateDevInfo and SetDevInfo?

    Frank,
    Unfortunately, the CreateDevInfo and SetDevInfo commands do not function as you were expecting. These change the device information for that program only.
    Resources (such as Memory Addresses) have to be mapped across the MXI-2 interface, and Resman performs the mapping based on the configuration information. The reason you get a bus error when trying to then access the device is because the memory mapping across the MXI-2 has not been done for the address ranges configured by SetDevInfo because resman has not run.
    After setting the information programmatically, you would have to close that program to run resman. Since the settings are localized to the program you just closed, resman would not map the device information.
    If you used an embedded controller, you could read and write directly to the address on the device. You would not have to configure the devices at all (manually or programmatically) because you have direct access to the VME backplane.
    There is not a way to programmatically configure VME devices. However, there are options in MAX to enable and disable the various VME device profiles. So you could create all of the different VME devices you will be using, and then enable/disable according to the current configuration. Also, NI-VXI 3.2 includes tools so that you can import and export VME device information in to and out of MAX.

Maybe you are looking for

  • After ntrans-j2ee, matching ppath objects are ignored

    Aa of WS7.0u2, I'm seeing that ppath objects that should match are being ignored whenever an explicit JSP file is specified, but not for any other type. This is different from WS7.0u1 and earlier. In earlier versions, the ppath object always matched,

  • My MacAir wakes up from sleep mode frozen

    and when I move the cursor, it drags a grey line that erases the screen. I had the track pad replaced but still have the problem.. what doi you thin is going on?

  • Valuation clearing account

    Can anyone explain me what is the use of Valuation Clearing Account ? Transaction code 8KEN Documentation in IMG says In this step you specify profit and loss accounts for valuation differences that arise in business transactions between group compan

  • Filtering Multiple Auth Users in SawMill

    I am unable to generate a report with more than a single person. The only attributes I am applying is: Statistics for 01/Jun/2010 - 30/Jun/2010, 30 days  Report is filtered and shows data for   Action is NOT: TCP_DENIED   Auth User is: local\lcl4034@

  • Custom Look&Feel problems with ComboBoxEditor

    hi, im trying to create a custom look and feel and have some problems with the ComboBoxEditor. the non-editable combobox works fine, but the editable makes problems. if i select an item from the dropdown, the value doesn't get updated in the editor a