Opening ADF page from java script

I am trying to use window.open(url, winName) to open an ADF page from java script.
I have set the same winName but when i call the window.open method every time it opens up a new window.
The code is as below:
<html>
<head>
</head>
<body>
<script>
function openwin() {
window.open("about:blank", "winDocPrint", "width=800,height=600,location=no");
</script>
<form action="http://127.0.0.1:7101/RegionRefresh-ViewController-context-root/faces/EnterAndDisplay?_afrLoop=3611588465186&_afrWindowMode=0&_adf.ctrl-state=zoaas2mc3_4" target="winDocPrint" onsubmit="openwin">
<input type="submit" value="Print Comments Call ADF">
</form>
</body>
</html>
when I click the button first time, it opens a new window, and keeps opening a new windows on clicking the button again.
I want it to use the same window that was opened first time.
Any help would be appreciated.
Thanks,
Sandeep M.
Edited by: user8895611 on Mar 25, 2010 11:44 PM

Hi,
you need to keep the window handle reference so you can access the same window
http://www.irt.org/script/874.htm
Frank

Similar Messages

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • Opening an ADF page from an OA framework page

    Hello,
    We have an OA framework page (a custom app) deployed in Oracle 9i Application server. We intend to develop some ADF pages which will be deployed in a separate Oracle 10g AS. I would like to know if it is possible to open an ADF page from an OA page and the basic interoperability between them. If someone can throw some light on the feasibility of this approach, it would really be helpful. Are there any material available on this?
    Please let me know your thoughts on this. Thanks in advance
    Raja

    You way want to ask this on the OA Forum as well.
    Because you are running the apps on different servers the interoperability can only be through the db layer. I'm not aware of a solution where the apps are running in the same context, meaning you can't have an transaction spanning both apps.
    To open a page of an other app is simply done by putting a link in one app which points to the second app.
    Timo

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • How to Create adf table from java bean

    Hi,
    How to Create adf table from java class (Not from ADF BC).
    Thanks
    Satya

    @vlsn -- you have to follow what shay said.
    Do the following in Model layer ::
    create a table property java class with your columns setters and getters like :
    *public class gridProps {*
    private int sno;
    private String orderNum;
    *public void setSno(int sno) {*
    this.sno = sno;
    *public int getSno() {*
    return sno;
    *public void setOrderNum(String orderNum) {*
    this.orderNum = orderNum;
    *public String getOrderNum() {*
    return orderNum;
    Create another table java class which will populate the values to your column values and return the collection :
    *public class gridPopulate {*
    private  List<gridProps> gridValues ;
    *public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
    *if (valuesToSet == null) {*
    return gridValues;
    gridValues = new ArrayList<gridProps>();
    if(btnValue.equals("completeBtn"))
    return gridValues;
    for(ArrayList<String> tempArr:valuesToSet)
    gridProps gp = new gridProps();
    gp.setSno(Integer.valueOf(tempArr.get(0)));
    gp.setOrderNum(tempArr.get(1));
    return gridValues;
    Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
    Thanks.(My jdev version 11.1.1.5.0)

  • JSP from Java Script???

    Can I call any jsp method from javascript?? I have a jsp page that contains some java script code..and I want to call one method of it from javascript.
    Thanks

    You can call applet methods or the methods that don't throw exception from java script otherwise not.

  • Open Internet explorer from Java

    Hi everyone!
    Doew anybody know how to open IOnternet Explorer from Java.I have tried
    String browserCommand = ("\"C:\Program Files\InternetExplorer\iexplore.exe\"");
         URL theUrl=new URL("http://www.yahoo.com/"); // or whatever
         Runtime.getRuntime().exec(browserCommand+ " "+theURL);
    but something goes wrong with the escape characters I use.
    I would be greatful to receive any advice.
    Thanks in advance!

    or...
        private static boolean showInBrowser(String url){
             String os = System.getProperty("os.name").toLowerCase();
            Runtime rt = Runtime.getRuntime();
            try{
                 if (os.indexOf( "win" ) >= 0) {
                      // this doesn't support showing urls in the form of "page.html#nameLink"
                     rt.exec( "rundll32 url.dll,FileProtocolHandler " + url);
                 } else if (os.indexOf( "mac" ) >= 0) {
                     rt.exec( "open " + url);
                 } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) {
                      // Do a best guess on unix until we get a platform independent way
                      // Build a list of browsers to try, in this order.
                      String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
                                "netscape","opera","links","lynx"};
                      // Build a command string which looks like "browser1 "url" || browser2 "url" ||..."
                      StringBuffer cmd = new StringBuffer();
                      for (int i=0; i<browsers.length; i++)
                           cmd.append( (i==0  ? "" : " || " ) + browsers[i] +" \"" + url + "\" ");
                      rt.exec(new String[] { "sh", "-c", cmd.toString() });
                 } else {
                      return false;
            }catch (IOException e){
                 return false;
            return true;
        }

  • How can i open the popup from java class

    Hi,
    Please tell me how can i open the popup from java class.
    I am using jdev 11.1.1.7.0
    I have used the below code which works fine in jdev 2.1 but it will have some errors in 11.1.1.7.0.
    Please tell me some way to do this in all jdev versions.
    Bean obj = (Bean)RequestContext.getCurrentInstance.getExternalContext.getPageFlowScope(“obj”);
    Code for hide pop-up
    FacesContext context = FacesContext.getCurrentInstance();
    String popupId = obj.getPopUpBind().getClientId()
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(),
    ExtendedRenderKitService.class);
    String hidePopup = "var popupObj=AdfPage.PAGE.findComponent('" + popupId +
    "'); popupObj.hide();";
    service.addScript(FacesContext.getCurrentInstance(), hidePopup);
    Code to Show pop-up
    StringBuffer showPopup = new StringBuffer();
    showPopup.append("var hints = new Object();");
    showPopup.append("var popupObj=AdfPage.PAGE.findComponent('" +
    obj.getPopUpBind().getClientId() + "');popupObj.show(hints);");
    service.addScript(FacesContext.getCurrentInstance(), showPopup.toString());
    Code need to be added in jsff pop tag
    binding="#{pageFlowScope.bean.popUpBind}
    Variable need to be added in Bean.java
    private RichPopup popUpBind;

    Hari,
    Since you're using a non-public build of JDeveloper, you should be using a non-public forum.
    John

  • Cannot Acccess Applet Object from Java Script

    Hi,
    I am using jRE1.5, and Kava Chart Applets. Those applet jars are compiled in jdk 1.5 version. I have created one jsp where I used ,<applet> tag. The problem is when ever I am going to access the applet object from java script it is not returning the actual java applet object, when put an alert message it shows [object]. So i am not able to access the methods or the applet class.and also the screen gets hung, nothing is coming.It get stuck at the point where i tried to access the applet method like document.getElementById(applet_id).<<<some method of the applet class>>.Also it is not showing any kind of javascript error or Applet class exceptions.
    But the strange thing is, when i use jdk 1.6, the page is running fine.Also when i try to print the applet object from javascript it is showing the proper class name.
    Please help me solving the problem.

    A number of changes and improvements were made between 1.5 and 1.6 - the entire plugin is new. You need to change to 1.6, as 1.5 goes EOL about November this year and future changes to this area in 1.5 are unlikely.

  • Pages downloaded, but I still can't open iCloud pages from iPad. Says that I need a new version of Pages on my Mac

    For my Mac Pro, after I downloaded the new Mavericks OS, I downloaded the new pages. However, I still can't open iCloud pages from iPad. Says that I need a new version of Pages on my Mac.
    Please help.

    It appears that you are launching the old version, probably using an icon in your Dock. That icon is an alias & is not updated. You will need to go to your Applications folder & find the new Pages 5 icon & double-click it. Once it is launched, you can right-click on the icon & choose Options > keep in Dock from the contextual menu.

  • Open all pages from last session

    Occasionally, safari will die. When I restart safari:
    is there a function to open all pages from last session?
    does firefox have this function? I thought I saw it within firefox, but I can't find it now. If this function is in firefox, where is it?

    In Safari... History > Open all pages from last session
    Firefox should do it automatically.
    Dave

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • I just downloaded and instaled firefox 4. Now, everytime I institute a command I get a po[p-up from Java script that tells me to uninstal set. I cannot go on untin I press ok and then I am good for one more command and it starts with the pop-up again.

    I'm not even sure if this is an extension or plug-in and all I can tell you is what I have already stated. I can only make one command at a time and after each one I get a pop-up from Java script that says uninstal set. I must depress ok to move on, but only for one more command and it starts over again. This also happened when I tried to instal firefox 4 a couple months ago and I deleted the program and went back to an earlier version.

    Mail troubleshooting - Yosemite
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages
    SMTP servers keep going offline

  • TS3276 i am unable to open web pages from email links on my ipad

    I am unable to open web pages from email links on my ipad

    A few more details might help, if nobody else recognizes this.   
    What happens when you try to open the links?
    Can you post an example of a link that doesn't work?
    Is there any particular source for the mail with the (bad) links, or is mail from all sources failing?
    If you happen to know it, what's the format of the mail message?  (Maybe the message is an image?)
    Do the embedded links work as expected from an OS X system running Mail.app, or some system and some other other mail client?
    To view the link in iOS: if you press on and hold your finger on an embedded link in most contexts, iOS will show a pop-up with the link contents, and will offer to copy it.  You can use that to acquire and post the link.  If pressing and holding on the link doesn't offer the pop-up, the format of the link itself may not be valid, or it might not really be a link.

  • How to print a Pdf from Java script

    Hi,
    I need to print a pdf from java script. In java script i have url of pdf. Is there any way to print pdf from java script?
    I am able to print word doc by ActiveX. is there any activeX or something else which do the same thing for pdf?
    Any help heartily esteemed to me.
    Thanks
    Kamlesh Sharma

    you are cross postin .. your thread has been answered in the jsp jstl forums

Maybe you are looking for