Can't find Dialog in javascript (by code corner example)

Hello,
I've recently found an Code Corner OTN Harvest 09/2011 article with "Launching popup dialogs maximized".
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf
The code is:function openPopup(popupId, panelWindowId){
  return function(event){
   var agent = AdfAgent.AGENT;
var windowWidth = agent.getWindowWidth();
var windowHeight = agent.getWindowHeight();
var popup = AdfPage.PAGE.findComponentByAbsoluteId(popupId); // found
var panelWindow = popup.findComponent(panelWindowId); // null here
panelWindow.setContentWidth(Math.max(100, windowWidth-60));
   panelWindow.setContentHeight(Math.max(100, windowHeight-80));
   if(popup != null)
     popup.show();    
}I've tried the same in my application and it didn't work.
<af:commandButton text="Search" id="cb3" partialSubmit="true">
                   <af:clientListener type="action"
                   method="openPopup('p_search','d7')"/>
                </af:commandButton>
<af:popup id="p_search">
        <af:dialog id="d7" resize="on"
                   dialogListener="#{backingBeanScope.Page1ManagedBean.toContentSearchResult}"
                   contentWidth="800" contentHeight="600"
                   stretchChildren="first">
          <af:panelStretchLayout id="psl4" topHeight="auto">
...I have found out that this code can't find panelWindow (dialog) component.
I've also tried AdfPage.PAGE.findComponentByAbsoluteId to find the dialog, but still no luck.
Any ideas?
Thanks.
ADF 11.1.1.4

Hi,
maybe you are not setting the approapriate componentId..
have a look here
Problem Finding component on A Page
Regards,
Dimitris.

Similar Messages

  • I havev installed a new Hard Drive on my laptop but cannot find my Photoshop Elements product box with the serial number to install Elements 10 or Elememts Premier 10. How can I find out the serial / installation codes for these?

    I havev installed a new Hard Drive on my laptop but cannot find my Photoshop Elements product box with the serial number to install Elements 10 or Elememts Premier 10. How can I find out the serial / installation codes for these? I saw a reply however, it was not my name and assumed it was for someone else. Now timed out. Can UI still have help on this matter please?

    If you registered PSE before, go to the main page of adobe.com, sign in and go to your account and you should find the serial number there in your purchases.

  • Where can I find the relation between company code and plant?

    where can I find the relation between company code and plant?
    I need to the list of plants under a company code.
    Which table?

    yes,wayne weng   .What you said is right.
    Thank you very much!
    My MSN:[email protected]

  • Where can i find the BI Java Connector Files (for example: bi_sdk_jdbc.rar)

    Hi,
    where can i find the BI Java Connector Files:
    bi_sdk_jdbc.rar
    bi_sdk_xmla.rar
    bi_sdk_sapq.rar
    bi_sdk_odbo.rar
    Can anyone help me?

    hi Christian,
    these files should be included in bi java sdk
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/78b3db58-0501-0010-b895-f75cd8fdf674 [original link is broken]
    hope this helps.

  • I can't find add button at bottom left corner to create playlist

    I can't find the add button that is supposed to be in bottom left corner in the new version of itunes so I can create a playlist

    You can get the drop down list by either right-clicking on the back/forward buttons, or holding down the left button until the list appears.
    If you want the drop-down arrow you can add it with the Back/forward dropmarker add-on - https://addons.mozilla.org/firefox/addon/backforward-dropmarker

  • Question about code corner Example#33: How-to open a Bounded Task Flow in a new Browser Tab

    Hello All,
    I am implementing example #33 in code corner series Oracle ADF Code Corner&lt;/title&gt;&lt;meta name=&quot;Title&quot; content=&quot;Oracle ADF Code Corner&quot;&gt;&lt;me…
    Every thing is going fine, but there is a comment in the java code that I don't understand.
    public void onLaunchForEdit(ActionEvent actionEvent) {    
          //access the ADF binding layer and access the tree binding that
          //populates the table
            BindingContext bctx = BindingContext.getCurrent();
            BindingContainer bindings =
                                   bctx.getCurrentBindingsEntry();   
            //access the tree binding defined in the ADF binding layer
            JUCtrlHierBinding model =
                   (JUCtrlHierBinding) bindings.get("DepartmentsView1");
            //get the current selected row key from the iterator binding
            //referenced from the table binding (tree binding). Of course,
            //I could have used the iterator name directly in the binding
            //lookup, but looking up the tree binding instead allows to
            //change the tree binding iterator dependency to a later point
            //in time without breaking this functionality. Its all about
            //"weak" dependencies that give you flexibility when coding ADF
            String rwKeyString =
                   model.getDCIteratorBinding().getCurrentRowKeyString();
            launchWindow(rwKeyString);
    What does this comment mean?
             //but looking up the tree binding instead allows to
            //change the tree binding iterator dependency to a later point
            //in time without breaking this functionality. Its all about
            //"weak" dependencies that give you flexibility when coding ADF
    Is this a contrast to this line of code?
    JUCtrlHierBinding model =
                   (JUCtrlHierBinding) bindings.get("DepartmentsView1");
    I mean in this line of code we hard coded the tree binding name from the page Def? why getting the tree binding name is a best practice while getting the iterator name is not?

    What does this comment mean?
             //but looking up the tree binding instead allows to 
            //change the tree binding iterator dependency to a later point 
            //in time without breaking this functionality. Its all about 
            //"weak" dependencies that give you flexibility when coding ADF 
    Is this a contrast to this line of code?
    JUCtrlHierBinding model = 
                   (JUCtrlHierBinding) bindings.get("DepartmentsView1"); 
    Yes, it's exactly this line of code the comment is referring to. If you look at the bindings of a page you see three parts: on the left he bindings, in the middle the executables and on the right side the data control. The statement
    JUCtrlHierBinding model = 
                   (JUCtrlHierBinding) bindings.get("DepartmentsView1");
    access the binding, the tree binding to get the data. if you use the iterator which named 'DepartmentsView1Iterator' you are accessing the executable, the iterator itself. The comment now tell you that if you access the data via the tree binding, that you can change the underlying iterator to point to different data. This you can do without the need to change the code in the been, whihc is good as you (or we all) tend to forget that we have code working on the iterator, so changing things in the bindings will break the application.
    Timo

  • Where can I find the description of the codes returned by exitValue()?

    Hi Everybody,
    I have a java porgram on HP/UX and this program executes the OS level commands and exe file on HP UNIX. When I supply "/usr/bin ls -l" as a param to this program it executes it very well.
    But if I pass the "/utils/Myapp/app arg1 arg2" as a parameter it returns some non zero codes
    I tried several ways to make it work and I even harcoded the "/utils/Myapp/app arg1 arg2" in the program but it never executes it properly and I got the following return Code return by exitvalue() during my hit and trial method.
    255,17,15,12
    Does any one have clue what are they.
    Note: When I executes /utils/Myapp/app arg1 arg2" from the UNIX prompt it works fine
    The java program is given below.
    Pl help
    Thanks
    Yatsomy.
    This is my first program in JAVA.
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.IOException;
    import java.lang.InterruptedException;
    class executecmd {
    public static void main(String args[]) {
    System.out.println("In main");
    try {
    /* Execute the command using the Runtime object and get the
    Process which controls this command */
    Process p = Runtime.getRuntime().exec(args[0]);
    /* Use the following code to wait for the process to finish
    and check the return code from the process */
    try {
    p.waitFor();
    /* Handle exceptions for waitFor() */
    } catch (InterruptedException intexc) {
    System.out.println("Interrupted Exception on waitFor: " + intexc.getMessage());
    System.out.println("Return code from process"+ p.exitValue());
    System.out.println("Done executing");
    /* Handle the exceptions for exec() */
    } catch (IOException e) {
    System.out.println("IO Exception from exec : " + e.getMessage());
    e.printStackTrace();

    1. exitValue() codes are the numeric codes returned by native applications you're calling: the meaning of this code is both application and platform dependant (it has nothing to do with java), so you should try to find those info in "app" documentation, or in HP Unix standard docs.
    2. I think you'd better "debug" the Runtime.exec() behaviour by capturing stdout and especially stderr of the spawned process: doing so, you will be able to see error messages printed out by called applications or commands...
    It's very simple using this small class:
    /** connects I/O streams, just like a pipe :-)
    * @author: Giorgio Maone
    class Pipe {
    private InputStream in;
    private OutputStream out;
    public Pipe(InputStream in, OutputStream out) {
       this.in=in; this.out=out;
    public void connect() {
       new Thread() {
        public void run() {
         try {
          for(int b;(b=in.read())!=-1;) {
            out.write(b);
          out.flush();
        } catch(IOException ex) {}
      }.start();
    }So you can do this:
    Process p = Runtime.getRuntime().exec(args[0]);
    new Pipe(p.getInputStream(),System.out).connect();
    new Pipe(p.getErrorStream(),System.out).connect();
    new Pipe(System.in,p.getOutputStream()).connect();
    try {
    System.out.println("Exit code: "+p.waitFor());
    } catch(InterruptedException ex) {}If you want to use a "smart wrapper" on Runtime.exec(), feel free to use my MultiExec class:
    /** executes multiple commands in one shell
    * @author: Giorgio Maone
    import java.io.*;
    public class MultiExec {
    static final boolean IS_WIN=System.getProperty("os.name").toLowerCase().indexOf("win")==0;
    protected String shell=IS_WIN?"":"sh";
    public void setShell(String s) {
       shell=s;
    public String getShell() {
       return shell;
    public Process exec(String cmds[]) throws IOException {
      File f=File.createTempFile("muexec",".bat");
      PrintWriter out=new PrintWriter(new FileWriter(f));
      if(IS_WIN) out.println("@echo off");
      for(int j=0,len=cmds.length; j<len; j++)
        out.println(cmds[j]);
      out.close();
      f.deleteOnExit();
      return Runtime.getRuntime().exec(shell+" "+f.getCanonicalPath());
    public int execAndWait(String cmds[]) throws IOException {
       Process p=exec(cmds);
      new Pipe(p.getInputStream(),System.out).connect();
      new Pipe(p.getErrorStream(),System.out).connect();
      new Pipe(System.in,p.getOutputStream()).connect();
      int exitCode=-1;
      try {
       exitCode=p.waitFor();
       } catch(InterruptedException ex) {}
      return exitCode;
    static class Pipe {
       private InputStream in;
      private OutputStream out;
      public Pipe(InputStream in, OutputStream out) {
        this.in=in; this.out=out;
      public void connect() {
        new Thread() {
         public void run() {
          try {
           for(int b;(b=in.read())!=-1;) {
             out.write(b);
           out.flush();
         } catch(IOException ex) {}
       }.start();

  • Can not find role for some transection code

    Dear Gurus,
    EWA  alert with security issue.
    Many user grant access some t-code etc. SE16,SM59,SE17,SE16 and I found users at SUIM t-code can access. 
    But , when I find role for t-code that I should remove.
    Not found,
    Please advise.
    Thank .

    Hi,
    can you please try this
    SUIM > Roles by complex criteria or RSUSR070 to find out this.
                Go to the Selection by Authorization Value.
                In Object 1 put S_TCODE and hit enter.
                And put SU01 in Transaction code and hit execute (clock with check) button.
                I use authorization object, as you can use this to test any object.
    You can also get this information directly from table, if you have access to SE16 or SE16N. Execute SE16N
                Table                AGR_1251
                Object              S_TCODE
                VALUE (low)  SU01
    Regards,
    Srinu

  • I can't find my serial number/redemption code for elements 11 i had a pc but now have a mac help :( please

    i had pc which i had downloaded photoshop elects 11 on but now i have a mac and I'm trying to download it on to this but somehow have no serial number, help please

    Hi Beckijacko,
    Serial numbers are Operating System specific. If you bought the product for Windows then it wont work on Mac or vice-versa. If you're having issues finding the serial number in the Adobe account, then please follow the steps in the below mentioned link :
    Find your serial number quickly
    And, you can also contact our customer support : Contact Customer Care
    P.S - If you have not registered the serial number in any of the Adobe account then I am afraid it would be difficult for support team to help you in that.
    Let me know if you need further assistance on this,
    Thanks,
    Eshant Jindal

  • Can you find the problem in this code?

    I've searching some examples of the using of JTable on this forum.
    So I've used a code found here.
    But nothing happens, the JFrame doesn't appear on screen.
    I'm sure my database "CLIENTES" exists inside the db folder. And also there's data inside "CLIENTES" table.
    So, where is the problem then?
    Thanks.
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TelaPrincipal extends JFrame {
       public TelaPrincipal() {
            Vector columnNames = new Vector();
            Vector data = new Vector();
            try {
               //  Connect to the Database
               String driver = "org.hsqldb.jdbcDriver";
               String url = "jdbc:hsqldb:file:./db/CLIENTES";
               String userId = "sa";
               String password = "";
               Class.forName(driver);
               Connection connection = DriverManager.getConnection(url, userId, password);
               //  Read data from a table
               String sql = "SELECT * FROM CLIENTES";
               Statement stmt = connection.createStatement();
               ResultSet rs = stmt.executeQuery(sql);
               ResultSetMetaData md = rs.getMetaData();
               int columns = md.getColumnCount();
               //  Get column names
               for (int i = 1; i <= columns; i++){
                  columnNames.addElement( md.getColumnName(i) );
               //  Get row data
               while (rs.next()) {
                  Vector row = new Vector(columns);
                  for (int i = 1; i <= columns; i++) {
                     row.addElement(rs.getObject(i));
                  data.addElement(row);
               rs.close();
               stmt.close();
            catch(ClassNotFoundException cnfe) {
               cnfe.printStackTrace();
            catch(SQLException sqle) {
              sqle.printStackTrace(); 
            //  Create table with database data
            JTable table = new JTable(data, columnNames);
            JScrollPane scrollPane = new JScrollPane( table );
            getContentPane().add(scrollPane);
        public static void main(String[] args) {
           TelaPrincipal tp = new TelaPrincipal();
           tp.setDefaultCloseOperation(EXIT_ON_CLOSE);
           tp.pack();
           tp.setVisible(true);
    }

    the jdbc driver is not on the classpath?

  • Where can I find Oracle JMS (Based on Oracle AQ) examples?

    thanks

    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html#JMS
    Check out the howto with OEMS JMS (Database)
    -Frances

  • How do I download an old version of PSE if I can't find my code?

    I had an older version of PSE and my computer died.  It was a downloaded version and I can not find documentation of the key code - it was probably on the computer that died.....  I don't need an upgraded version I just need to reload the version I owned and activate it for use.  How can I do this?
    I believe it was PSE 8

    you can download it, but you can't activate it without that serial num.
    if you registered with adobe, or purchase and downloaded from adobe, check your account for the serial -  https://www.adobe.com/account.html
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Single Sign On - SAPSSOEXT - Can't find Dependant Libraries

    HI
      I am trying to implrement SSO to another server running in IBM Websphere 5.1
    In my java code System.LoadLibrary fails for SAPSSOEXT and error message is "Can't find Dependant Libraries"
    concerned java code is
    public static String SSO2TICKETLIBRARY = "sapssoext";
    try {
    System.loadLibrary(SSO2TICKETLIBRARY);
      } catch (Throwable e) {
    System.out.println ("Error during initialization of SSO2TICKET:\n" + e.getMessage());
    Both of  sapssoext.dll and sapsecu.dll are in c:\windows\system32 folder and I have downloaded the files relevant to my OS from SAP service marketplace.
    Version of sapsecu.dll 6400.243.0.0
    and version of sapssoext 5.4.28.5
    I have used SAPSECULIB54_3-10002911.SAR
    and SAPSSOEXT_4-10002921.SAR for those files
    OS where IBM websphere is run is Windows 2000
    c:\windows\system32 is very much in the path and undoutably it finds sapssoext.dll. Probably it requires some other dependant dll.
    How can I trace to find which library is missing
    Regards
    Saurav

    I resolved it myself

  • Help using find dialog box with JTextArea

    Hi i am using JTextField and getting a file read and then displayed in JTextField. Now i have used a dialog box for finding string within that file displayed in JTextField. I want to make it such that it ignores cases while finding the string and also want to make find next available in Find dialog box.
    My code is: -
    * @author Administrator
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.InputStreamReader;
    import javax.swing.*;
    public class TextAreaEx extends JPanel implements ActionListener {
    static JFrame fr;
    JButton button1;
    JTextArea tx;
    TextAreaEx()
    super(new BorderLayout());
    tx=new JTextArea();
    FileInputStream fis=null;
    StringBuffer sb=new StringBuffer();
    try{
    fis=new FileInputStream("C:/customers.xml");
    BufferedReader br=new BufferedReader(new InputStreamReader(fis));
    String h="";
    while((h = br.readLine()) != null) {
    sb.append(h + "\n");
    catch(Exception e)
    { e.printStackTrace();}
    tx.setText(sb.toString());
    button1=new JButton("Find");
    button1.addActionListener(this);
    add(button1,BorderLayout.PAGE_START);
    button1.setFocusable(false);
    JScrollPane p1=new JScrollPane(tx);
    add(p1);
    public static void createShow()
    JFrame.setDefaultLookAndFeelDecorated(true);
    fr=new JFrame("My Frame");
    TextAreaEx ob=new TextAreaEx();
    ob.setOpaque(true);
    fr.setContentPane( ob);
    fr.setSize(400,400);
    // fr.pack();
    fr.setVisible(true);
    public static void main(String s[])
    createShow();
    /* (non-Javadoc)
    * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
    public void actionPerformed(ActionEvent e) {
    if(e.getSource()==button1)
    String s=(String)JOptionPane.showInputDialog(fr,"FIND:\n","Find",JOptionPane.INFORMATION_MESSAGE,
    null,null,null);
    System.out.println(s);
    String text=tx.getText();
    int offset=text.indexOf(s);
    System.out.println(offset);
    tx.setFocusable(true );
    tx.select(offset,s.length()+offset );

    Sorry its not JTextField its JTextArea as mentioned in first line of first post.

  • Find dialog: Add criteria button and + buttons are missing.

    I'm trying to use the command-f find to find a file using multiple search criteria. Seems that it would be simple enough. I want to search for files whose "kind" is "image" within a certain "date created" range. Here's the problem. My find dialog only allows me to use ONE criterion. I don't have an "add criteria" button below the "search for items whose" box. I also don't have the + button next to the criteria. So I can select "image" or I can select "date created", but not both.
    I looked at the following article, which should address the topic, but my screen doesn't look like the one in this article.
    http://docs.info.apple.com/article.html?artnum=107005
    Is there a setting I need to change?
    I'm going to try to post a screenshot to my website and put a link here. Can I attach a file to this post instead?
    the following should link to a screenshot of my find dialog box:
    http://www.grantlivingston.com/examples/screenshot.tiff
    Mac G3 Blue&White Mac OS X (10.3.9) 350mhz

    You can check the default color settings:
    * Tools > Options > Content : Fonts & Colors > Colors
    Also make sure that "Allow pages to choose their own colors, instead of my selections above" has a check mark.
    See also:
    * [[Websites look wrong]]
    * [[Website colors are wrong]]

Maybe you are looking for

  • Error Message from the EM config file

    This is the first error message i found out. oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:569) at oracle.sysman.emcp.EMDBPostConfig.invok

  • Sound loss

    I was recently trying to pair a new bluetooth device with my desktop and experienced some difficulties.  I tried changing a few things and, in the process, have now lost all sound.  All of the devices claim to be working properly but nothing I do see

  • Bluetooth Peripheral Device driver failure in Windows Vista

    I've linked my computer and my Palm Centro using a Bluetooth connection and now I keep getting an error message that says... "Device driver was not successfully installed...Bluetooth Peripheral Device - Failed" It tries to search the computer to find

  • My period key is not working.

    It either refuses to input a period requiring me to use the onscreen keyboard or it starts randomly inputting long strings of periods that continue unless another key is hit (i.e. like "i.........t d.oes thi..s" or "..................................

  • Ipod use with audio/video system in car

    I have an Ipod Touch and the "traveler" cabing for use in my car. The traveler transmitter requires me to squeeze it and select the particular FM setting (which is supposed to have the least amount of static or is not an existing station in use). As