Can't get window reference in used component

Hi,
I have a window which embeds a view of a used Z component. I am using the window as popup, that is, I am creating it as:
lo_window = lo_window_manager->create_window(
                window_name = 'USED_COMPONENT'
                title       = l_title
                button_kind = if_wd_window=>co_buttons_okcancel ).
  lo_window->open( ).
Then, in the used component's WDDOINIT I am trying to register OK button to an action like:
lo_view_api       = wd_this->wd_get_api( ).
  lo_window_ctlr    = lo_view_api->get_embedding_window_ctlr( ).
  lo_window         = lo_window_ctlr->get_window( ).
  IF lo_window IS BOUND.
    lo_window->subscribe_to_button_event(
                button            = if_wd_window=>co_button_ok
                action_view       = lo_view_api
                action_name       = 'BUTTON_OK_PRESSED'
                is_default_button = abap_true ).
  ENDIF.
However, my lo_window reference remains initial, that is, the get_window method returns nothing. Everything else works good and even this works good if I have a window within the original WD component. But if I do it with used component, I can't get the window reference.
Any ideas?
Thanks!
KR,
Igor
Edited by: Igor Barbaric on Jul 8, 2009 3:09 PM
Note that these 2 code portions do NOT belong to the same method so the lo_window variable is not the same.

I believe that the problem is the fact that the inner component WDDOINIT gets called before the component is actually embedded into the window.
You would likely have to try a later event - like perhaps the WDDOINIT of the View. 
I've personally taken a different approach in the past.  When I have had a component usage to emebed, I didn't create a static window for it. I used the create_window_for_cmp_usage API.
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
  l_ref_cmp_usage =   wd_this->wd_cpuse_faculty_details( ).
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.
DATA: l_ref_interfacecontroller TYPE REF TO ziwci_cs_course_faculty_dtl .
  l_ref_interfacecontroller =   wd_this->wd_cpifc_faculty_details( ).
  l_ref_interfacecontroller->external_initialization(
    faculty_id = item_faculty_id ).
  DATA: l_window_manager TYPE REF TO if_wd_window_manager,
        l_cmp_api        TYPE REF TO if_wd_component,
        l_window         TYPE REF TO if_wd_window.
  DATA: l_text_t01 TYPE string.
  l_text_t01 =
    wd_assist->if_wd_component_assistance~get_text( 'T01' ).
  l_cmp_api        = wd_comp_controller->wd_get_api( ).
  l_window_manager = l_cmp_api->get_window_manager( ).
  l_window         = l_window_manager->create_window_for_cmp_usage(
                     interface_view_name    = 'W_POPUP_DTL'
                     component_usage_name   = 'FACULTY_DETAILS'
                     title                  = l_text_t01
                     message_display_mode   = if_wd_window=>co_msg_display_mode_selected ).
  l_window->open( ).
Notice that I call an interface method (external_initialization) of my inner component. You could also call this method after the window_open and even pass a reference of the window object into the method.  This might be a workaround to your problem.

Similar Messages

  • How can i get windows 7 to use plug and play features

    I am trying to load a game using windows 7 and no matter what I do I cannot get the game to install or load up!

    Try to right click on the game install and tell it to run as administrator.
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may click on the white star in the "Kudos" button for any helpful post to give that person a quick thanks. These feedback tools help keep our community active, so you receive better answers faster.

  • Can't get photos on TV using component cable?

    Searched forum, and tried solution from http://discussions.apple.com/message.jspa?messageID=5564661#5564661
    It didn't work! I have a SONY HDTV with component video contection. SONY says I have it properly configured. I get ipod music, but picture is odd colors and multiple images that flicker across screen. I have loaded pictures at full resolution on ipod. Any suggestions?

    Got wrong cable from Apple.

  • If I use Bootcamp, can I get Windows viruses on my Mac?

    I am using Mac OS X 10.8.3. I am about to install Windows 7 on my iMac with Bootcamp. Can I get Windows virus on my Mac because of Bootcamp?

    If you do, it'll only affect the Windows partition of your hard drive.
    If you feel really worried, I'd suggest running Windows in a virtual machine using Parallels or similar. You can set things up so that there's no access to your Mac from the virtual machine and, if the VM gets a problem, you can just delete it.

  • How can I get Firefox to NOT use DDE? If I uncheck it in Windows XP "Folder options" it keeps getting re-checked. When checked, it takes minutes to get Firefox to open on a page linked from Outlook.

    How can I get Firefox to NOT use DDE? If I uncheck it in Windows XP "Folder options" it keeps getting re-checked. When checked, it takes minutes to get Firefox to open on a page linked from Outlook.

    Open link/bookmark in new tab in same window:
    *Middle-click (press the mouse scroll wheel) the link
    *Ctrl+left click the link
    *right-click the link, choose "Open Link in New Tab"
    Open link/bookmark in new window:
    * Shift+Enter on the link
    * Shift+left click on the link
    See: http://www.7is7.com/software/firefox/shortcuts.html

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

  • Unable to get Windows User Name using Oracle Forms 6i, Jinitiator 1.3.1.17

    Hi,
    Requirement: Get Windows User Name using Oracle Web Forms 6i.
    Tools Using: Windows NT, Oracle web forms 6i, Oracle 10g DB.
    Description: I am using GetClientInfo JBean from otn.oracle.com, which gets windows user name, IP address and machine name. The demo I got from oracle web site uses Jinitiator version 1.1.7.18. While we are using the latest version Jinitiator 1.3.1.17. Due to this reason, I am unable to use Javakey which comes with older version but doesn't come with newer version, that's why I can't create the new JavaBean Java identity (PJC).
    Please advise what to do. All environment variables are set everything is done, this is the only thing bothering me.
    I went through the article 202768.1 from metalink, but on step 5, it gives an error keytool error: java.lang.Exception: Input not an X.509 Certificate.
    Also, please let me know if there is any other workaround for this requirement.
    Thanks & Best Regards,
    Mo

    Hi,
    Thanks for your kind reply. Actually there was a problem in creating a certificate, now it is okay with the same method. Certificate got imported on client and everything is ready.
    Now, the problem is when I try to set Bean Area Implementation Class property with oracle.forms.demos.GetClientInfo, it gives an error FRM-13008 Cannot find JavaBean with name 'oracle.forms.demos.GetClientInfo'.
    I went through the articles 1072329.6, 196824.1, and set ClassPath and Path variables with proper values. Also, I have copied jar file and signature file in forms60/java folder. I don't see any problems. Please let me know what I am doing wrong. My limitation is that I have to do all this in forms6i.
    I searched forums on metalink and found out that someone installed Patch 15, and everything went okay for him. Do you think I should install Patch 15? if YES, how will I do it, I mean should I first uninstall my forms and then install patch15 or install the patch on my forms?
    Thanks so much for your help.
    Thanks & Best Regards,
    Mo

  • How can I get Windows (v7 x64) to open in Dreamweaver (CS5) if I right click it?

    Hi
    How can I get Windows (v7 x64) to open in Dreamweaver (CS5) if I right click it?
    None of the normal mechanisms of setting an application to be the DEFAULT application for the .HTML file type seem to work...
    Extremely irritating.
    J

    Jon Fritz II wrote:
    So when you right-click an .html file and choose Open With, what are you seeing?
    Is the check box for "Always use the selected program to open this kind of file" checked?
    A list of various "recommended applications" but not including Dreamweaver. It's not in the list of Other Applications either. And if I browse for it, my selection of dreamweaver.exe is flatly ignored without message.
    >Is the check box for "Always use the selected program to open this kind of file" checked?
    Jon Fritz II wrote:
    So when you right-click an .html file and choose Open With, what are you seeing?
    Is the check box for "Always use the selected program to open this kind of file" checked?
    A list of various "recommended applications" but not including Dreamweaver. It's not in the list of Other Applications either. And if I browse for it, my selection of dreamweaver.exe is flatly ignored without message.
    > Is the check box for "Always use the selected program to open this kind of file" checked?
    Yes.
    J

  • Can't get windows 8.1 with dual boot for fedora (linux) . system is UEFI .

    Can't get  windows 8.1 with  dual boot for fedora (linux) . system is UEFI .

    Hi,
    Any update here?
    We may seek help at Fedora forum as Milos suggested, if convenient we could share the related thread link here for reference.
    In addition, please also check the information in the similar thread:
    Dual Boot Windows 8 and Linux?
    Best regards
    Michael Shao
    TechNet Community Support

  • Where can I get Window's software for my Macbook Pro? I'm trying to run ARCview. However, it requires Windows. I'm trying Bootcamp. but, it isn't recognising the disk that I currently have.

    Where can I get Window's software for my Macbook Pro? I'm trying to run ARCview. However, it requires Windows. I'm trying Bootcamp. but, it isn't recognising the disk that I currently have.

    Maybe because it's not a 'genuine' retail version? Many OEM versions just don't work - and I've no idea which flavor of Win7 your friend downloaded. Obviously one that Boot Camp doesn't recognize. Best to just pony up the cash for a full retail version, of some flavor - and use it. You COULD, of course, download the 14-day trial version of Parallels Desktop and see if you can install Win7 as a virtual machine... it might or might not work. Boot Camp just isn't finding the resources it needs on the copy you have - try Parallels and if that doesn't work just purchase a retail (or student discounted) version.
    Clinton

  • How can I get a reference to ApplicationModule in a servlet

    I know that I can easily get the reference to my ApplicationModule in any JSP using the tags but I need to use a servlet instead of a JSP.
    Would you please let me know how I can a reference to my ApplicationModule in my Servlet? Every function that I am trying to use has been depricated.
    I appreciate any help.

    The following code will instantiate a module for you...
    public static ApplicationModule getGenericApplicationModule(String sAppModule, String sConnection)
    throws Exception {
    if (am != null)
    return am;
    sName = sAppModule;
    sConn = sConnection;
    Hashtable env = new Hashtable(2);
    env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    Context ic = new InitialContext(env);
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(sName);
    am = home.create();
    am.getTransaction().connect(sConn);
    return am;
    Problem in a servlet environment is that this is not pooled so you want to use the pool manager like this...
    public static EDMSMgrImpl getPooledApplicationModule(String sPoolName) throws BaseBc4jException
    ApplicationPool aPool = getApplicationPool(sPoolName);
    try
    return (EDMSMgrImpl)aPool.checkout();
    catch (Exception e)
    String message = "Exception checking out pool: "+sPoolName+" : "+e.getMessage();
    LogBroker.getInstance().severe(_instance,message ,e);
    throw new BaseBc4jException(message, e);
    protected static ApplicationPool getApplicationPool(String sPoolName) throws BaseBc4jException
    ApplicationPool aPool = PoolMgr.getInstance().getPool(sPoolName);
    if (aPool == null)
    try
    createPools();
    aPool = PoolMgr.getInstance().getPool(sPoolName);
    catch(IOException ioe)
    String message = "IOException thrown in EDMSAppModuleHelper.createPools" + ioe.getMessage();
    LogBroker.getInstance().severe(_instance,message, ioe);
    throw new BaseBc4jException(message, ioe);
    if (aPool == null)
    String message = "got a null result when getting pool: "+sPoolName;
    BaseBc4jException e = new BaseBc4jException(message);
    LogBroker.getInstance().severe(_instance, message, e);
    throw e;
    return aPool;
    Where a pool is created like this...
    sPoolName = poolElem.getAttribute(POOL_NAME_ATTRIBUTE);
    sAppModule = poolElem.getAttribute(APP_MODULE_ATTRIBUTE);
    sConnection = poolElem.getAttribute(CONNECTION_ATTRIBUTE);
    stateFull = poolElem.getAttribute(STATEFULL_ATTRIBUTE);
    sClass = getPoolClass(poolElem);
    if(PoolMgr.getInstance().getPool(sPoolName) == null) {
    Hashtable info = new Hashtable();
    info.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    info.put(JboContext.DEPLOY_PLATFORM, "LOCAL");
    info.put("IsStateLessRuntime", stateFull);
    PoolMgr.getInstance().createPool(sPoolName, sClass, sAppModule , sConnection, info);

  • Can i get windows live messenger on pad

    can i get windows live messenger to chat on ipad

    Windows Live Messenger is being closed down in March. Use Skype instead.
    http://www.neowin.net/news/windows-live-messenger-closes-march-15th-except-in-ch ina

  • How can I get a reference to all controls on a front panel of one type )for example of the type Text Ring?

    I'd like to set the strings[] property of all the Text Ring controls on a front panel at once without creating a property node for every text ring. How can i do that?

    > How can I get a reference to all controls on a front panel of one type
    > )for example of the type Text Ring?
    >
    > I'd like to set the strings[] property of all the Text Ring controls
    > on a front panel at once without creating a property node for every
    > text ring. How can i do that?
    This is likely more complicated than making property nodes for each
    ring, but you can do it. Make a subVI that takes in a panel reference,
    reads the array of control references, loops through them looking for
    rings, and modifying the Strings[] property on each ring.
    The part of this that will probably be the least obvious, when you
    have an array of control references there are two ways to find out
    if an element is a ring. You can read the classID and compare it
    to the cla
    ssID of a true ring control. An alternative is to cast
    the control reference to a ring control using a Cast to more specific
    node and wire the error out to a case structure. The error case is
    where the objects that aren't rings will go. The success case case
    where you will have a valid ring refnum that you can use to modify
    the strings.
    Greg McKaskle

  • WRT320N Can't get IP Address - only using 1 wired port - no internet access - web setup pages hang

    Just bought Linksys WRT320N to replace Netgear MR814.
    Can't get connected to internet using Linksys WRT320N.  
    Setup:
    ISP:  Cox Communications (Cable)
    Firmware: v1.0.03 build 010 Jul 24, 2009
    1 wired - port 1- to Windows XP SP 3 Dell Desktop
    Setup Attempts:
    1.  Tried to setup using install CD.  Kept erroring out with Error 302: Internal Error. tried this 3 times
    2.  Went through the reset, power down, power up procedures.
    3.  Ping 192.168.1.1 = success
    4.  Connected to 192.168.1.1 via web browser 
    5.  Set MAC Address = computer's MAC address
    6.  Set MTU = Auto (1500).  Also tried Manual 1492
    Was unable to get IP address using IP Address Release and IP Address Renew.  Internet IP Address still = 0.0.0.0
    Note that the web page will always get stuck after perfoming a couple of actions (like after switching between tabs).  Message in bottom of browser is "Wating for http://192.168.1.1/Status_Router.asp".  And on the screen the hourglass symbol never goes away.
    Note that the old Netgear router still works fine and I am currently connected to the internet using the Netgear router.   I'd appreciate any help getting the new Linksys router functioning/connecting to the internet/obtaining and IP address.
    Thanks for your help. 
    Solved!
    Go to Solution.

    I don't know where I was unclear: you wrote before that you have used the mac address clone function on the WRT to clone the MAC address of the PC. This way the WRT "pretends" to be the PC if you connect the WRT internet port to your modem.
    However, the PC is not the device which you used before to connect to the internet. The PC was not the device which was connected before to the modem. If you connect the PC directly to your modem it won't get an IP address either. It won't have internet.
    The problem is that your ISP only allows you to have a single active internet connection at any given time. If you simply connect a different device with a different MAC address to your modem this other device won't get an IP address. As you have connected the Netgear router to your modem and you have internet then you have to clone the MAC address of your Netgear router. That's the device which is connected to your internet and that's the MAC address for which your ISP has locked your internet connection.
    Thus, one more time: clone the MAC address of the netgear router (the internet or WAN port MAC address) on your Linksys router. Then the Linksys pretends to be the Netgear router and your ISP should accept the Linksys router. The netgear router should have a status page in it's web interface which shows you the correct MAC address to be cloned.

  • I can't get Window's Media Player to recognize my new ipod shuffle.  Does anyone have a solution/, I can't get Window's Media Player to recognize my new ipod shuffle.  Does anyone have a solution?

    I can't get Window's Media Player to "recognize" my new ipod shuffle.  Does anyone have a solution?  When I pull the ipod shuffle up in Devices and Printers, it says it needs Troubleshooting, but the Troubleshooting provides no solution.

    Windows Media Player?  As far as I know, that won't work.  You need to install iTunes
    http://www.apple.com/itunes/
    That will install the software you need to use your shuffle with your computer.

Maybe you are looking for

  • Calling dialog program screen in custom control and using drag n drop

    Hi Experts, SCENARIO: I have a custom container control. I want to insert a dialog program screen in custom container control in one half and tree nodes in the other half. Now my dialog screen has a table control. I want that the user can drag n drop

  • Workaround for Runtime Error

    Hi everybody, I've this annoying runtime error when starting iTunes, too. I can start iTunes without this annoying message, when deactivating the network connection. After iTunes successfully booted, you can activated the network connection again and

  • DNG profile editor

    A couple of questions about DNG Profile Editor: 1-I know Lab values on my ColorChecker (measured with an EyeOne 2° D50). I shooted it with a Nikon D80 and I want to tweak one of the new Camera Raw profiles to match those values or to go closer. I see

  • Cannot Use Rollover Functions With Templates

    I'm surprised that you do not hear anything about this, but if you create a template in Dreamweaver 8, your buttons will work but you cannot use rollover effects. That stinks! Does anyone know of a hack, plug in, etc. to get around this bug? It seems

  • Safari Mac Toolbar keeps disappearing - help!

    Each time I start Safari, the toolbar is missing and I have to go into the VIEW menu and turn it back on. Each time a new window pops up, same thing. I have tried ensuring that all windows have the toolbar before closing it down, but this has not hel