InputListofValue PopUp window CANCEL button event capture ?

HI All ,
Jdeveloper version 11.X.6.
i have explained the outline of issue below:
User enter some data on InpuLIstOfValue text field and click on the maginfied Glass, the pop opens and selects some data and click 'OK' ,it will display appropriately on below fields.
but if user enters the wrong data on InpuLIstOfValue text field and clicks on maginfier Glass,no results found on the popup window, so upon click of "CANCEL" button on popup window ,
is there any way to remove the old data on InpuLIstOfValue Filed ?
Basicaly i am looking for the capturing the CANCEL button event on the popUpwindow ,based on event status .
PLase let us know if any hints ?
Thanks

Step by step:
1. Create the converter class:
package view.converters;
import java.util.Collection;
import java.util.Collections;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import org.apache.myfaces.trinidad.convert.ClientConverter;
import org.apache.commons.lang.StringUtils;
public class LOVConverter implements Converter, ClientConverter {
  public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) {
    if (StringUtils.isBlank(value)) {
      // cancel event was triggered, so do something
    return value; // if value is not an instance of String you need to convert it to its primary type (Number, Date, String, etc)
  public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
    if (value == null || /* value is empty in its primary type */) {
      // cancel event was triggered, so do something
    return value.toString();
  public String getClientLibrarySource(FacesContext facesContext)
    return null;
  public Collection<String> getClientImportNames()
    return Collections.emptySet();
  public String getClientScript(FacesContext facesContext, UIComponent uiComponent)
    return null;
  public String getClientConversion(FacesContext facesContext, UIComponent uiComponent)
    return null;
}2. Declare the converter in faces-config.xml:
<converter>
  <converter-id>LOVConverter</converter-id>
  <converter-class>view.converters.LOVConverter</converter-class>
</converter>3. Your inputListOfValues should look like this (see the property converter="LOVConverter"):
<af:inputListOfValues popupTitle="Search"
                      value="#{row.bindings.DepartmentId.inputValue}"
                      model="#{row.bindings.DepartmentId.listOfValuesModel}"
                      required="#{bindings.EmployeesView1.hints.DepartmentId.mandatory}"
                      columns="#{bindings.EmployeesView1.hints.DepartmentId.displayWidth}"
                      shortDesc="#{bindings.EmployeesView1.hints.DepartmentId.tooltip}"
                      converter="LOVConverter"
                      id="ilov1">After that, when the user clicks the Cancel button, both methods (getAsObject and getAsString) should be invoked, and then you would be able to reset the component value (using uiComponent parameter).
AP

Similar Messages

  • New feature in SP5: Closing a popup window raises an event

    I'm trying to use this new feature that came in SP5, "Popup Enhancement - Closing a popup window raises an event to the containing iView".  Can anyone give me an example of how this works?  In the configure element for the popup, there is a new field called, 'Closure Event'.  I though by adding by event to this new field, that the event will be raised after closing the popup window, but it didn't.  What am I doing wrong?

    Hi,
    you should add an end-point to the popup and/or use the "Close" action.
    there's a difference between when closing the popup implicitly or explicitly

  • Close portal window ( popup ) through an button event within the wd-app

    Hello Experts,
    the scenario is as follows:
    i click on a link within the enterprise portal environment and it opens a wd application within a popup( portal window ). This application has a CANCEL button. when a user clicks on this the portal window should close. How can this be achieved ?
    I tried firing the outbound plug of type exit of the wd app main window, but it just blanks out the screen and doesn't close the window it self.
    Regards,
    Shweta

    Hi Shweta,
    as i discussed with you to update the script code
    <html><script> function closeWindow( ){       top.close( );     }                  </script><body><form> The application was logged off successfully. <br><input type="button" value="close window" onclick="closeWindow( );" /></ form></body></html>
    in sicf transaction for your component.
    it will work (close the window).
    dont forget to give me points
    all the best...
    Rgds,
    Mahesh.Gattu

  • How to close a popup window for system events?

    Hi,
    I have a screen 110 which shows several input field in popup mode.
    The Cancel button can close the screen.
    But my question is how to close the popup window for the following system events?
    1, Customer clicks the cross button in top-right corner
    2, Customer clicks the system icon in top-left corner and then select either: "Close" or "Stop Session"
    The PAI subroutine of the screen has not been triggered for the above system events.
    Thanks for the coming help.
    Best Regards,
    David

    Hi Siddharth,
    I did check with another very experienced ABAP developer.
    The solution was the same as what Arunima Rudra provided.
    And I got a sample program which did work properly.
    The headache is that the system events in my program still cannot be triggered even after I have all the same changes.
    Anyway, I suggest you to try the solution as provided by Arunima Rudra.
    It should work for 2 system events:
    1, Customer clicks the cross button in top-right corner
    2, Customer clicks the system icon in top-left corner and then select either: "Close"
    For "Stop Session", it should not be handled by popup.
    You can observe the same behavior in ALV sorting configuration popup.
    Good luck!
    Regards,
    David

  • Data loss popup for cancel button on overview page

    Hi Experts,
    Data loss popup generally appears on UI, when i try to navigate with out saving the changes. This is a standard SAP behaviour.
    But, i come across the requirement where this data loss popup should also appear on clicking the 'Cancel' button on overview page on UI.
    I understood that, this popup will be triggered by the methods ON_BEFORE_WA_CONTENT_CHANGE & IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT of the window impl class.
    Please suggest how can i make this popup work in case of Cancel button as well.
    Thanks....

    Hi bkvs,
    Usually when you click the "Cancel" button that means you don't want to save your entry... hence displaying the dataloss popup doesn't make really sense to me. However, you may want the user to confirm that he really wants to cancel.
    So I would suggest to redefine the EH_ON_CANCEL method of your view, to display a simple confirmation popup before you actually cancel everything. This wiki will show you how to do it:
    Creating popup message in webclient UI - CRM - SCN Wiki
    Regards,
    Nicolas.

  • Popup window for button

    if i click on delete(BUTTON) it should popup a window ask for confirmation.. how to create tat..

    drag drop showpopbehvr inside the button,
    drag drop pop with yes or no OR delete or cancel
    have dialog listner in managed bean and use accordingly
    http://www.techartifact.com/blogs/2013/03/handling-ok-and-cancel-button-in-afdialog-using-popup-in-oracle-adf-by-dialoglistener.html

  • ExportData - save window, cancel button

    Hello.
    I have a problem with the exportData method.
    Consider a button control. On the Click method, I have the following code:
         xfa.host.exportData("", false);
         app.alert("Done");
    When I click the button, the window for saving the file is displayed. If I save it, after the windows closes, the message is displayed. But if I press the cancel button on the save window, no code after the export is executed.
    Can anyone help me with this problem? where should I put the code after the export so that it is executed in both cases (save or cancel)?
    Thank you,

    Looks like a bug ...can you open an incident with support? Here is a link to the support site so that you can open the incident:
    https://www.adobe.com/cfusion/support/index.cfm?event=membership&returnURL=%2Fcfusion%2Fsu pport%2Findex%2Ecfm%3Fevent%3Dportal%26loc%3Den%5Fus&loc=en_us
    Paul

  • Popup window - Close button

    Hi,
    We have a requirement to disable/hide the standard close button present in the Internet Explorer while opening a popup window (the X icon present in the top right section of internet explorer window) . Any pointers on how to achieve this would be really helpful.
    Thanks in advance.

    I don't think it is possible to hide X of any window, as it is default feature of explorer by MSDN.
    --Mukul                                                                                                                                                                                                                                               

  • JDialog Ok/Cancel button events

    Dear Java gurus,
    I have something that's been bugging me for days. Now, maybe it's really obvious but my cold has bunged up my head too much to think clearly. Anyway, I thought I'd pass it this way for expert opinion..
    I have a class that extends JDialog, with various textboxes, comboboxes etc. It also has the usual OK + Cancel buttons. The only thing left to implement is something like this:
    MyCustomDialog d = new MyCustomDialog();
    int returnVal = d.showDialog();
    This is similar to most of the dialogs provided with Swing, where the return value is a static field something along the lines of 0 == OK button pressed, 1 == Cancel.
    This allows me to only start "getting" the values from the dialog only if the user selects ok. The problem is, I can't see how to accomplish this. I've been looking at the source for JFileChooser and JColorChooser, but they are more complicated than I can follow. (I am relatively novice when it comes to Swing) I promise, I have been looking on the net for examples, but I've had no luck. Maybe because any searching for JDialog tends to bring back simple examples of the supplied Swing dialogs.
    So, any suggestions?
    TIA

    arooaroo wrote: Shame, because I thought you were on to something.
    I was. Trust me.
    Look at the signature for JOptionPane.showConfirmDialog(). This is the simplest version, but the others look like this and then some:
    static int showConfirmDialog(Component parentComponent, Object message)
    Note that the message parameter is of type  object. This means you can theoretically pass any type of object. A component is an object. Therefore, you can pass a JPanel as the message parameter.
    Look at this quote from the JOptionPane description in the API:
    message
        A descriptive message to be placed in the dialog box. In the most common usage, message is just a String or String constant. However, the type of this parameter is actually Object. Its interpretation depends on its type:
        Object[]
            An array of objects is interpreted as a series of messages (one per object) arranged in a vertical stack. The interpretation is recursive -- each object in the array is interpreted according to its type.
        Component
            The Component is displayed in the dialog.
        Icon
            The Icon is wrapped in a JLabel and displayed in the dialog.
        others
            The object is converted to a String by calling its toString method. The result is wrapped in a JLabel and displayed.
    I was going to suggest the modal option on JDialog, but for some reason I thought it wouldn't work.  I still think using JOptionPane would be easier; that's what it was designed for.
    Dusty

  • Peer Assisted Networking popup window allow button issue

    I can't press allow button from the first click, only after 2-4 clicks. It's a bug? It's like allow button is not active(no press animation is happening). If i wait around 2-5 seconds it's working from first click. Any fix available?

    hallo
    ubuntu have an bug in ubity see https://bugs.launchpad.net/ubuntu/+source/unity/+bug/874897
    gnome-shell or other desktops works fine!
    on android browser best is to set wmode=""  and on flash player >=11 wmode="direct"
    @KevinTUDeft on what side do you use cirrus?
    best regards

  • How to handle the "cancel" button and "close" icon of a popup ?

    Hi,
    I have a popup with "cancel button" and "close icon"(on the top right corner of the popup), I want the same operations to be performed on clicking of any of these two components.
    Is there a way to handle such situation ?
    I read about 2 cases to look into this but they didn't work too well for me.
    1. I read about the "popcancellistener" but that listener is called whenever the popup closes, so suppose I have an "ok button" on the popup to create a record, after the record is created, the popup closes and goes into the "popcancellistener", now the question is "how do we know if it came there because of the 'ok button' or 'some other event'".
    2. I even checked the "DialogListener", now I'm able to distinguish between the 'OK' and 'CANCEL' button in the dialoglistener using the "Dialog.Outcome.ok/cancel", but when a user clicks on the close icon, we do not enter the "DialogListener" at all, so in this case "how do we handle the close icon click event"
    Do let me know if you need any more information from my side.
    Thanks for the help in advance.

    The following mechanism responds to any of the following events: <Esc> key, Close icon ('x'), Cancel button
    JavaScript part:
    function popupClosedListener(event){
                  var source = event.getSource();
                  var popupId = source.getClientId();
                  var params = {};
                  params['popupId'] = popupId;
                  var type = "serverPopupClosed";
                  var immediate = true;
                  AdfCustomEvent.queue(source, type, params, immediate);
    }JSF part:
             <af:popup ....>
                  <af:clientListener method="popupClosedListener"
                                           type="popupClosed"/>
                  <af:serverListener type="serverPopupClosed"
                                          method="#{myBean.serverPopupClosedMetod}"/>
            </af:popup>Finally, Java part:
    public void serverPopupClosedMetod(ClientEvent event){
    }

  • How to close a popup window in a used component?

    Hi Experts,
    I have two applications in the same project, and they each have one component controller. Let they be component A and B. They have similar functionalities and screens. There is a popup window in A that I would like to use in B instead of creating a new popup window in B, so I added a used component of A in B in order to share the popup window. I am able to click a button in B to get a popup window from A successfully, but I am unable to close the popup window since the event has been created in A.
    Can anyone suggest me how to fix this please? I would really appreciate your help.
    Thanks,
    -Napadol

    Hi,
    You can either use the approach above, which is having an Attribute, type IWDWindow in B's Component Context. When you open the popup you store the reference. When you click close you get that reference back and destroy the window.
    Note, I'd suggest you to have your "View" with no Close Button. Then in Component A you create another View that has an UIViewContainer with your Popup View. You can code the Close code in Component A.
    This way you can do the same and have a code in Component B to close your window.
    Other way would be having it as a Component variable and using the Component Interface on A (create a Method) that goes to Component A and destroy that instance.
    Regards,
    Daniel

  • Multithreaded Swing and a "Cancel Button"

    I have a Swing-based app that runs some lengthy JDBC queries. Currently when the user hits the "Run Query" button a small dialog pops up to say that the process is running, please wait, etc. I'd like to add a working Cancel button to that dialog that will allow the user to stop that query before it finnishes.
    From what I've been able to learn so far it seems I should use one of the SwingUtilities methods such as invokeAndWait or invokeLater. I'm not sure which one would be more appropriate for my situation though.
    I'm also having trouble thinking of an elegant way (or not-so elegant if that's the only way) to have the cancel button event communicate with the DB Query thread to let it know that the process should be stopped. Detailed explanations or examples would be welcome.
    Mike

    You will not need to use the SwingUtilities methods. Those are when you want to update the GUI from a different thread. In your case, you want to update a class running in a non-gui thread from the GUI thread. Not a problem.
    You will want to create a Runnable class that runs your query. Run that class on another thread when the query is executed. There will need to be some public 'cancel' method in that class that can be called when you want that object to cancel whatever operation it is doing. Simply call that 'cancel' method from your dialog button's action when the user hits the cancel button.
    Now, how your query class handles the cancel method is the main problem. The api way of doing this would be to call the Statement.cancel() method on the statement object that is performing the query. But how (or if) that method works depends on the jdbc driver & database, hopefully yours supports it. :-)

  • Lifespan of popup window

    Hello!
    I want controller of a popup window be initialized every time when the window is opened. Is that possible?
    I've defined Lifespan for the view "when_visible", but doInit is called only first time, the window was opened.
    Of course, I could invalidate context on closing the window (as I manage to fire event, that the window can be closed), but may be there is a simple way to make lifespan working similar to "normal" views?
    Thank you!
    Best regards,
    Nick

    Hi Wael,
    I'm not pretty sure about terminology, I think I'm using "regular popup", though I'm doing similar things to Tutorial 10 "Dialog Boxes in Web Dynpro":
    - define a new window and a view in WD component
    - open the window using
         IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows(NAME);
         IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
         window.setWindowPosition(WDWindowPos.CENTER);
         window.open();
    - save the window instance in context of the current view
    - Define an event in controller
    - add event processor to the current view to close popup window by
           IWDWindow window = wdContext.currentContextElement().getPopupWindowInstance();
           window.close();
    - popup window triggers the event in controller and 'parent' view closes the popup.
    Best regards,
    Nick

  • Capturing the Cancel button with Before Print event handler

    I put together a script that is triggered by a beforePrint event handler. Everything works fine but I can't figure out how and where to capture the user clicking on the Cancel button in the Print dialog?
    Any ideas? Thanks, Dan

    Alen,
    My bet is you are using JDeveloper 11.1.1.5. This is a known ADF bug 12551764 in this release, not related to JHeadstart.
    Here are the details:
    http://adfbugs.blogspot.com/2011/05/jdeveloper-11115-serius-bug.html
    I just checked the bug database, it is fixed in patch 12399372. You can go to metalink to download the patch.
    Steven Davelaar,
    JHeadstart Team.

Maybe you are looking for

  • Ipad 2 does not show in itunes

    My ipad 2 was completely dead last night so I plugged it in to charge using the 10W wall charger that came with it and noticed that it did not vibrate when I plugged it in nor did it show the lightning bolt showing it was charging. I left it alone fr

  • Report in text format show break page !!

    when i generate a report in char mode, in a text file, it show a break page between the head section and the principal section. there is any way to delete this break page (a line command or properties ( i specify a desformat no_ff)). thanks.

  • Mac OS X cannot open pdf files from online sites.

    Mac OS X cannot open pdf files from online sites.

  • Multiple selection tab on Custom F4 of select option in report

    Hi folks ,   how to get MULTIPLE SELECTION tab on extension of my selec option of report screen. If i pass Multiple_choice = 'X' in fm 'F4IF_INT_TABLE_VALUE_REQUEST' check boxes are appearing of each my f4 values when i press f4, i dnt want like this

  • Converting All Files to Different Version

    Is there a much quicker and happier way to convert my entire project to a different version of LabVIEW other than opening every single one of the 2000+ files?  I've considered perhaps creating a VI to do this.  Use VI Server to just open each .VI, sa