PCUI - Open new url or bsp with a Toolbar Button

Hi all,
   I have a PCUI custom application (CRM_BSP_FRAME)and i want open a new url or bsp with my button on the toolbar of result list. Important: Without modification of standard.
Thx in Advance
Regards.
Manuel

Hi Manuel,
in the event you can enter an object link.
Regards
Thomas

Similar Messages

  • Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc

    Worst update ever! On my Vista everything is wrong! Back button never active; If I want open pages as new tab it opens new window; FF starts with blank page instead of Google; No url address shown on status bar when I move mouse arrow on the link etc.. Please Help!

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • Open new URL in same window

    Hi all,
    I am using "linktourl"  element for open a new url page.
    This is done by reference property(opens in new window).
    My need is to open the New URL in same window instead
    of new......
    Anyone can help me plz and send the codings.....

    I think this is double posting.....please close one thread
    [link|open new URL page in same window;

  • PCUI - open New Window via Button (to call custom URL / HTML viewer)

    Hello group,
    I have followed the "Use CRM PCUI HTML viewer to call a custom URL" in order to create a custom URL to BW web template.
    However, instead of displaying the URL in a tab (this works fine), I want a Button in the Accounts view to open up a New Window displaying the URL there.
    Here is what I have done:
    Create Field Group & Structure
    Create Event
    - Usage: Layout-Relevant
    - Text: Web template call
    Added Event to Toolbar Group ACC_OIC
    Define Application Layout (CRMM_ACCOUNT) for Event
    - Position: New Window
    - Screen Element Type: HTML
    - my field group
    - my structure
    Define Application Set (COMM_BUPA)
    - my structure
    - my access class
    The button is there, when clicked the read-method of my access class is executed, but no New Window is opened with the URL displayed.
    Is there something I am missing? Can the HTML viewer not called in a new window?!
    I appreciate any input you can provide me.
    Thanks and regards,
    Erik

    I have the same problem. PCUI toolbar button open url http://www.google.com in new window   .
    It sames so easy open a link on web page.
    why so hard in PCUI !
    My god , who design the PCUI.
    anyone solve this problem , let me know please. Thanks!
    [email protected]

  • Open new Browser on client with specific size

    Hallo,
    I have the following problem:
    I want to open a new Browser window on the client with a given size.
    Opening a browser is no problem with something like this:
    basicService.showDocument(new URL(basicService.getCodeBase(), relativeUrl));
    But how can I specify the size of the window ? Is it possible ?
    thx
    Erik

    But how can I specify the size of the window ? Is it possible ?You might try some JavaScript magic.

  • How to open new webBrowser in java with BrowserLauncher.java

    I m using BrowserLauncher.java which opens default webBrowser but i want to open new webBrowser for new request each time.
    Plz suggest to me what changes i have to made in this java class.
    it is very urgent???
    package com.pst.lmsgui.utils;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.Field;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    * BrowserLauncher is a class that provides one static method, openURL, which opens the default
    * web browser for the current user of the system to the given URL. It may support other
    * protocols depending on the system -- mailto, ftp, etc. -- but that has not been rigorously
    * tested and is not guaranteed to work.
    * <p>
    * Yes, this is platform-specific code, and yes, it may rely on classes on certain platforms
    * that are not part of the standard JDK. What we're trying to do, though, is to take something
    * that's frequently desirable but inherently platform-specific -- opening a default browser --
    * and allow programmers (you, for example) to do so without worrying about dropping into native
    * code or doing anything else similarly evil.
    * <p>
    * Anyway, this code is completely in Java and will run on all JDK 1.1(or better)-compliant systems without
    * modification or a need for additional libraries. All classes that are required on certain
    * platforms to allow this to run are dynamically loaded at runtime via reflection and, if not
    * found, will not cause this to do anything other than returning an error when opening the
    * browser.
    * <p>
    * There are certain system requirements for this class, as it's running through Runtime.exec(),
    * which is Java's way of making a native system call. Currently, this requires that a Macintosh
    * have a Finder which supports the GURL event, which is true for Mac OS 8.0 and 8.1 systems that
    * have the Internet Scripting AppleScript dictionary installed in the Scripting Additions folder
    * in the Extensions folder (which is installed by default as far as I know under Mac OS 8.0 and
    * 8.1), and for all Mac OS 8.5 and later systems. On Windows, it only runs under Win32 systems
    * (Windows 95, 98, and NT 4.0, as well as later versions of all). On other systems, this drops
    * back from the inherently platform-sensitive concept of a default browser and simply attempts
    * to launch Netscape via a shell command.
    * <p>
    * This code is Copyright 1999 by Eric Albert ([email protected]) and may be redistributed
    * or modified in any form without restrictions as long as the portion of this comment from this
    * paragraph through the end of the comment is not removed. The author requests that he be
    * notified of any application, applet, or other binary that makes use of this code, but that's
    * more out of curiosity than anything and is not required. This software includes no warranty.
    public class BrowserLauncher
    * The Java virtual machine that we are running on. Actually, in most cases we only care
    * about the operating system, but some operating systems require us to switch on the VM. */
    private static int jvm;
    /** The browser for the system */
    private static Object browser;
    * Caches whether any classes, methods, and fields that are not part of the JDK and need to
    * be dynamically loaded at runtime loaded successfully.
    * <p>
    * Note that if this is <code>false</code>, <code>openURL()</code> will always return an
    * IOException.
    private static boolean loadedWithoutErrors;
    /** The com.apple.mrj.MRJFileUtils class */
    private static Class mrjFileUtilsClass;
    /** The com.apple.mrj.MRJOSType class */
    private static Class mrjOSTypeClass;
    /** The com.apple.MacOS.MacOSError class */
    private static Class macOSErrorClass;
    /** The com.apple.MacOS.AEDesc class */
    private static Class aeDescClass;
    /** The <init>(int) method of com.apple.MacOS.AETarget */
    private static Constructor aeTargetConstructor;
    /** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
    private static Constructor appleEventConstructor;
    /** The <init>(String) method of com.apple.MacOS.AEDesc */
    private static Constructor aeDescConstructor;
    /** The findFolder method of com.apple.mrj.MRJFileUtils */
    private static Method findFolder;
    /** The getFileType method of com.apple.mrj.MRJOSType */
    private static Method getFileType;
    /** The makeOSType method of com.apple.MacOS.OSUtils */
    private static Method makeOSType;
    /** The putParameter method of com.apple.MacOS.AppleEvent */
    private static Method putParameter;
    /** The sendNoReply method of com.apple.MacOS.AppleEvent */
    private static Method sendNoReply;
    /** Actually an MRJOSType pointing to the System Folder on a Macintosh */
    private static Object kSystemFolderType;
    /** The keyDirectObject AppleEvent parameter type */
    private static Integer keyDirectObject;
    /** The kAutoGenerateReturnID AppleEvent code */
    private static Integer kAutoGenerateReturnID;
    /** The kAnyTransactionID AppleEvent code */
    private static Integer kAnyTransactionID;
    /** JVM constant for MRJ 2.0 */
    private static final int MRJ_2_0 = 0;
    /** JVM constant for MRJ 2.1 or later */
    private static final int MRJ_2_1 = 1;
    /** JVM constant for any Windows 9x JVM */
    private static final int WINDOWS_9x = 2;
    /** JVM constant for any Windows NT JVM */
    private static final int WINDOWS_NT = 3;
    /** JVM constant for any other platform */
    private static final int OTHER = -1;
    * The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English
    * systems from working properly.
    private static final String FINDER_TYPE = "FNDR";
    * The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the
    * application.
    private static final String FINDER_CREATOR = "MACS";
    /** The name for the AppleEvent type corresponding to a GetURL event. */
    private static final String GURL_EVENT = "GURL";
    * The first parameter that needs to be passed into Runtime.exec() to open the default web
    * browser on Windows.
    private static final String FIRST_WINDOWS_PARAMETER = "/c";
    /** The second parameter for Runtime.exec() on Windows. */
    private static final String SECOND_WINDOWS_PARAMETER = "start";
    * The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape
    * on many command-line systems.
    private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote openURL(";
    private static final String NETSCAPE_OPEN_PARAMETER_END = ")";
    * The message from any exception thrown throughout the initialization process.
    private static String errorMessage;
    * An initialization block that determines the operating system and loads the necessary
    * runtime data.
    static
    loadedWithoutErrors = true;
    String osName = System.getProperty("os.name");
    if ("Mac OS".equals(osName))
    String mrjVersion = System.getProperty("mrj.version");
    String majorMRJVersion = mrjVersion.substring(0, 3);
    try
    double version =
    Double.valueOf(majorMRJVersion).doubleValue();
    if (version == 2)
    jvm = MRJ_2_0;
    else if (version >= 2.1)
    // For the time being, assume that all post-2.0 versions of MRJ work the same
    jvm = MRJ_2_1;
    else
    loadedWithoutErrors = false;
    errorMessage = "Unsupported MRJ version: " + version;
    catch (NumberFormatException nfe)
    loadedWithoutErrors = false;
    errorMessage = "Invalid MRJ version: " + mrjVersion;
    else if (osName.startsWith("Windows"))
    { //still needs verification against Win2K
    if (osName.indexOf("9") != -1)
    jvm = WINDOWS_9x;
    else
    jvm = WINDOWS_NT;
    else
    jvm = OTHER;
    if (loadedWithoutErrors)
    { // if we haven't hit any errors yet
    loadedWithoutErrors = loadClasses();
    * This class should be never be instantiated; this just ensures so.
    BrowserLauncher()
    * Called by a static initializer to load any classes, fields, and methods required at runtime
    * to locate the user's web browser.
    * @return <code>true</code> if all intialization succeeded
    *               <code>false</code> if any portion of the initialization failed
    private static boolean loadClasses()
    switch (jvm)
    case MRJ_2_0:
    try
    Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
    macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
    Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
    Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
    Class aeClass = Class.forName("com.apple.MacOS.ae");
    aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
    aeTargetConstructor =
    aeTargetClass.getDeclaredConstructor(
    new Class []{ int.class });
    appleEventConstructor =
    appleEventClass.getDeclaredConstructor(
    new Class[]{ int.class, int.class,
    aeTargetClass, int.class, int.class });
    aeDescConstructor = aeDescClass.getDeclaredConstructor(
    new Class[]{ String.class });
    makeOSType =
    osUtilsClass.getDeclaredMethod("makeOSType",
    new Class []{ String.class });
    putParameter =
    appleEventClass.getDeclaredMethod("putParameter",
    new Class[]{ int.class, aeDescClass });
    sendNoReply =
    appleEventClass.getDeclaredMethod("sendNoReply",
    new Class[]{ });
    Field keyDirectObjectField =
    aeClass.getDeclaredField("keyDirectObject");
    keyDirectObject =
    (Integer) keyDirectObjectField.get(null);
    Field autoGenerateReturnIDField =
    appleEventClass.getDeclaredField("kAutoGenerateReturnID");
    kAutoGenerateReturnID =
    (Integer) autoGenerateReturnIDField.get(null);
    Field anyTransactionIDField =
    appleEventClass.getDeclaredField("kAnyTransactionID");
    kAnyTransactionID =
    (Integer) anyTransactionIDField.get(null);
    catch (ClassNotFoundException cnfe)
    errorMessage = cnfe.getMessage();
    return false;
    catch (NoSuchMethodException nsme)
    errorMessage = nsme.getMessage();
    return false;
    catch (NoSuchFieldException nsfe)
    errorMessage = nsfe.getMessage();
    return false;
    catch (IllegalAccessException iae)
    errorMessage = iae.getMessage();
    return false;
    break;
    case MRJ_2_1:
    try
    mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
    mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
    Field systemFolderField =
    mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
    kSystemFolderType = systemFolderField.get(null);
    findFolder =
    mrjFileUtilsClass.getDeclaredMethod("findFolder",
    new Class[]{ mrjOSTypeClass });
    getFileType =
    mrjFileUtilsClass.getDeclaredMethod("getFileType",
    new Class[]{ File.class });
    catch (ClassNotFoundException cnfe)
    errorMessage = cnfe.getMessage();
    return false;
    catch (NoSuchFieldException nsfe)
    errorMessage = nsfe.getMessage();
    return false;
    catch (NoSuchMethodException nsme)
    errorMessage = nsme.getMessage();
    return false;
    catch (SecurityException se)
    errorMessage = se.getMessage();
    return false;
    catch (IllegalAccessException iae)
    errorMessage = iae.getMessage();
    return false;
    break;
    return true;
    * Attempts to locate the default web browser on the local system. Caches results so it
    * only locates the browser once for each use of this class per JVM instance.
    * @return The browser for the system. Note that this may not be what you would consider
    *     to be a standard web browser; instead, it's the application that gets called to
    *     open the default web browser. In some cases, this will be a non-String object
    *     that provides the means of calling the default browser.
    private static Object locateBrowser()
    if (browser != null)
    return browser;
    switch (jvm)
    case MRJ_2_0:
    try
    Integer finderCreatorCode =
    (Integer) makeOSType.invoke(null,
    new Object[]{ FINDER_CREATOR });
    Object aeTarget = aeTargetConstructor.newInstance(
    new Object[]{ finderCreatorCode });
    Integer gurlType = (Integer) makeOSType.invoke(null,
    new Object[]{ GURL_EVENT });
    Object appleEvent = appleEventConstructor.newInstance(
    new Object[]{ gurlType, gurlType, aeTarget,
    kAutoGenerateReturnID, kAnyTransactionID });
    // Don't set browser = appleEvent because then the next time we call
    // locateBrowser(), we'll get the same AppleEvent, to which we'll already have
    // added the relevant parameter. Instead, regenerate the AppleEvent every time.
    // There's probably a way to do this better; if any has any ideas, please let
    // me know.
    return appleEvent;
    catch (IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch (InstantiationException ie)
    browser = null;
    errorMessage = ie.getMessage();
    return browser;
    catch (InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getMessage();
    return browser;
    case MRJ_2_1:
    File systemFolder;
    try
    systemFolder = (File) findFolder.invoke(null,
    new Object[]{ kSystemFolderType });
    catch (IllegalArgumentException iare)
    browser = null;
    errorMessage = iare.getMessage();
    return browser;
    catch (IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch (InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getTargetException().getClass() +
    ": " + ite.getTargetException().getMessage();
    return browser;
    String[] systemFolderFiles = systemFolder.list();
    // Avoid a FilenameFilter because that can't be stopped mid-list
    for (int i = 0; i < systemFolderFiles.length; i++)
    try
    File file = new File(systemFolder,
    systemFolderFiles);
    if (!file.isFile())
    continue;
    Object fileType = getFileType.invoke(null,
    new Object[]{ file });
    if (FINDER_TYPE.equals(fileType.toString()))
    browser = file.toString(); // Actually the Finder, but that's OK
    return browser;
    catch (IllegalArgumentException iare)
    browser = browser;
    errorMessage = iare.getMessage();
    return null;
    catch (IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch (InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getTargetException().getClass() +
    ": " + ite.getTargetException().
    getMessage();
    return browser;
    browser = null;
    break;
    case WINDOWS_NT:
    browser = "cmd.exe";
    break;
    case WINDOWS_9x:
    browser = "command.com";
    break;
    case OTHER: //fall through
    default:
    browser = "netscape";
    break;
    return browser;
    * Attempts to open the default web browser to the given URL.
    * @param url The URL to open
    * @throws IOException If the web browser could not be located or does not run
    public static void openURL(String url) throws IOException
    if (!loadedWithoutErrors)
    throw new IOException("Exception in finding browser: " +
    errorMessage);
    Object browser = locateBrowser();
    if (browser == null)
    throw new IOException("Unable to locate browser: " +
    errorMessage);
    switch (jvm)
    case MRJ_2_0:
    Object aeDesc = null;
    try
    aeDesc = aeDescConstructor.newInstance(
    new Object[]{ url });
    putParameter.invoke(browser,
    new Object[]{ keyDirectObject, aeDesc });
    sendNoReply.invoke(browser, new Object[]{ });
    catch (InvocationTargetException ite)
    throw new IOException(
    "InvocationTargetException while creating AEDesc: " +
    ite.getMessage());
    catch (IllegalAccessException iae)
    throw new IOException(
    "IllegalAccessException while building AppleEvent: " +
    iae.getMessage());
    catch (InstantiationException ie)
    throw new IOException(
    "InstantiationException while creating AEDesc: " +
    ie.getMessage());
    finally { aeDesc = null; // Encourage it to get disposed if it was created
    browser = null; // Ditto
    } break;
    case MRJ_2_1:
    Runtime.getRuntime().exec(
    new String[]{ (String) browser, url });
    break;
    case WINDOWS_NT://fall through
    case WINDOWS_9x:
    Runtime.getRuntime().exec( new String[]{ (String) browser,
    FIRST_WINDOWS_PARAMETER,
    SECOND_WINDOWS_PARAMETER, url });
    break;
    case OTHER:
    // Assume that we're on Unix and that Netscape is installed
    // First, attempt to open the URL in a currently running session of Netscape
    Process process =
    Runtime.getRuntime().exec((String) browser +
    NETSCAPE_OPEN_PARAMETER_START + url +
    NETSCAPE_OPEN_PARAMETER_END);
    try
    int exitCode = process.waitFor();
    if (exitCode != 0)
    { // if Netscape was not open
    Runtime.getRuntime().exec(
    new String[]{ (String) browser, url });
    catch (InterruptedException ie)
    throw new IOException(
    "InterruptedException while launching browser: " +
    ie.getMessage());
    break;
    default:
    // This should never occur, but if it does, we'll try the simplest thing possible
    Runtime.getRuntime().exec(
    new String[]{ (String) browser, url });
    break;
    // Driver to test class
    public static void main(String[] args) throws IOException
         BrowserLauncher br = new BrowserLauncher();
    if (args.length != 1)
    br.openURL("http://mail.lionbridge.com");
    else
    br.openURL(args[0]);

    package com.pst.lmsgui.utils;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.Field;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    * BrowserLauncher is a class that provides one static method, openURL, which opens the default
    * web browser for the current user of the system to the given URL. It may support other
    * protocols depending on the system -- mailto, ftp, etc. -- but that has not been rigorously
    * tested and is not guaranteed to work.
    * Yes, this is platform-specific code, and yes, it may rely on classes on certain platforms
    * that are not part of the standard JDK. What we're trying to do, though, is to take something
    * that's frequently desirable but inherently platform-specific -- opening a default browser --
    * and allow programmers (you, for example) to do so without worrying about dropping into native
    * code or doing anything else similarly evil.
    * Anyway, this code is completely in Java and will run on all JDK 1.1(or better)-compliant systems without
    * modification or a need for additional libraries. All classes that are required on certain
    * platforms to allow this to run are dynamically loaded at runtime via reflection and, if not
    * found, will not cause this to do anything other than returning an error when opening the
    * browser.
    * There are certain system requirements for this class, as it's running through Runtime.exec(),
    * which is Java's way of making a native system call. Currently, this requires that a Macintosh
    * have a Finder which supports the GURL event, which is true for Mac OS 8.0 and 8.1 systems that
    * have the Internet Scripting AppleScript dictionary installed in the Scripting Additions folder
    * in the Extensions folder (which is installed by default as far as I know under Mac OS 8.0 and
    * 8.1), and for all Mac OS 8.5 and later systems. On Windows, it only runs under Win32 systems
    * (Windows 95, 98, and NT 4.0, as well as later versions of all). On other systems, this drops
    * back from the inherently platform-sensitive concept of a default browser and simply attempts
    * to launch Netscape via a shell command.
    * This code is Copyright 1999 by Eric Albert ([email protected]) and may be redistributed
    * or modified in any form without restrictions as long as the portion of this comment from this
    * paragraph through the end of the comment is not removed. The author requests that he be
    * notified of any application, applet, or other binary that makes use of this code, but that's
    * more out of curiosity than anything and is not required. This software includes no warranty.
    public class BrowserLauncher {
    * The Java virtual machine that we are running on. Actually, in most cases we only care
    * about the operating system, but some operating systems require us to switch on the VM.
    private static int jvm; /** The browser for the system */
    private static Object browser;
    * Caches whether any classes, methods, and fields that are not part of the JDK and need to
    * be dynamically loaded at runtime loaded successfully.
    * Note that if this is <code>false</code>, <code>openURL()</code> will always return an
    * IOException.
    private static boolean loadedWithoutErrors; /** The com.apple.mrj.MRJFileUtils class */
    private static Class mrjFileUtilsClass; /** The com.apple.mrj.MRJOSType class */
    private static Class mrjOSTypeClass; /** The com.apple.MacOS.MacOSError class */
    private static Class macOSErrorClass; /** The com.apple.MacOS.AEDesc class */
    private static Class aeDescClass; /** The <init>(int) method of com.apple.MacOS.AETarget */
    private static Constructor aeTargetConstructor; /** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
    private static Constructor appleEventConstructor; /** The <init>(String) method of com.apple.MacOS.AEDesc */
    private static Constructor aeDescConstructor; /** The findFolder method of com.apple.mrj.MRJFileUtils */
    private static Method findFolder; /** The getFileType method of com.apple.mrj.MRJOSType */
    private static Method getFileType; /** The makeOSType method of com.apple.MacOS.OSUtils */
    private static Method makeOSType; /** The putParameter method of com.apple.MacOS.AppleEvent */
    private static Method putParameter; /** The sendNoReply method of com.apple.MacOS.AppleEvent */
    private static Method sendNoReply; /** Actually an MRJOSType pointing to the System Folder on a Macintosh */
    private static Object kSystemFolderType; /** The keyDirectObject AppleEvent parameter type */
    private static Integer keyDirectObject; /** The kAutoGenerateReturnID AppleEvent code */
    private static Integer kAutoGenerateReturnID; /** The kAnyTransactionID AppleEvent code */
    private static Integer kAnyTransactionID; /** JVM constant for MRJ 2.0 */
    private static final int MRJ_2_0 = 0; /** JVM constant for MRJ 2.1 or later */
    private static final int MRJ_2_1 = 1; /** JVM constant for any Windows 9x JVM */
    private static final int WINDOWS_9x = 2; /** JVM constant for any Windows NT JVM */
    private static final int WINDOWS_NT = 3; /** JVM constant for any other platform */
    private static final int OTHER = -1; /** * The file type of the Finder on a Macintosh. Hardcoding "Finder" would keep non-U.S. English * systems from working properly. */
    private static final String FINDER_TYPE = "FNDR"; /** * The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the * application. */
    private static final String FINDER_CREATOR = "MACS"; /** The name for the AppleEvent type corresponding to a GetURL event. */
    private static final String GURL_EVENT = "GURL"; /** * The first parameter that needs to be passed into Runtime.exec() to open the default web * browser on Windows. */
    private static final String FIRST_WINDOWS_PARAMETER = "/c"; /** The second parameter for Runtime.exec() on Windows. */
    private static final String SECOND_WINDOWS_PARAMETER = "start";
    * The shell parameters for Netscape that opens a given URL in an already-open copy of Netscape
    * on many command-line systems.
    private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote openURL(";
    private static final String NETSCAPE_OPEN_PARAMETER_END = ")"; /** * The message from any exception thrown throughout the initialization process. */
    private static String errorMessage; /** * An initialization block that determines the operating system and loads the necessary * runtime data. */
    static {
    loadedWithoutErrors = true;
    String osName = System.getProperty("os.name");
    if ("Mac OS".equals(osName)) {
    String mrjVersion = System.getProperty("mrj.version");
    String majorMRJVersion = mrjVersion.substring(0, 3);
    try {
    double version = Double.valueOf(majorMRJVersion).doubleValue();
    if (version == 2) {
    jvm = MRJ_2_0;
    } else if (version >= 2.1) { // For the time being, assume that all post-2.0 versions of MRJ work the same
    jvm = MRJ_2_1;
    } else {
    loadedWithoutErrors = false;
    errorMessage = "Unsupported MRJ version: " + version;
    } catch (NumberFormatException nfe) {
    loadedWithoutErrors = false;
    errorMessage = "Invalid MRJ version: " + mrjVersion;
    } else if (osName.startsWith("Windows")) { //still needs verification against Win2K
    if (osName.indexOf("9") != -1) {
    jvm = WINDOWS_9x;
    } else {
    jvm = WINDOWS_NT;
    } else {
    jvm = OTHER;
    if (loadedWithoutErrors) { // if we haven't hit any errors yet
    loadedWithoutErrors = loadClasses();
    } /** * This class should be never be instantiated; this just ensures so. */
    BrowserLauncher() { }
    * Called by a static initializer to load any classes, fields, and methods required at runtime * to locate the user's web browser.
    * @return <code>true</code> if all intialization succeeded * <code>false</code> if any portion of the initialization failed */
    private static boolean loadClasses() {
    switch (jvm) {
    case MRJ_2_0:
    try {
    Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
    macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
    Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
    Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
    Class aeClass = Class.forName("com.apple.MacOS.ae");
    aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
    aeTargetConstructor = aeTargetClass.getDeclaredConstructor( new Class []{ int.class });
    appleEventConstructor = appleEventClass.getDeclaredConstructor( new Class[]{ int.class, int.class, aeTargetClass, int.class, int.class });
    aeDescConstructor = aeDescClass.getDeclaredConstructor( new Class[]{ String.class });
    makeOSType = osUtilsClass.getDeclaredMethod("makeOSType", new Class []{ String.class });
    putParameter = appleEventClass.getDeclaredMethod("putParameter", new Class[]{ int.class, aeDescClass });
    sendNoReply = appleEventClass.getDeclaredMethod("sendNoReply", new Class[]{ });
    Field keyDirectObjectField = aeClass.getDeclaredField("keyDirectObject");
    keyDirectObject = (Integer) keyDirectObjectField.get(null);
    Field autoGenerateReturnIDField = appleEventClass.getDeclaredField("kAutoGenerateReturnID");
    kAutoGenerateReturnID = (Integer) autoGenerateReturnIDField.get(null);
    Field anyTransactionIDField = appleEventClass.getDeclaredField("kAnyTransactionID");
    kAnyTransactionID = (Integer) anyTransactionIDField.get(null);
    } catch (ClassNotFoundException cnfe) {
    errorMessage = cnfe.getMessage();
    return false;
    } catch (NoSuchMethodException nsme) {
    errorMessage = nsme.getMessage();
    return false;
    } catch (NoSuchFieldException nsfe) {
    errorMessage = nsfe.getMessage();
    return false;
    } catch (IllegalAccessException iae) {
    errorMessage = iae.getMessage();
    return false;
    } break;
    case MRJ_2_1:
    try {
    mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
    mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
    Field systemFolderField = mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
    kSystemFolderType = systemFolderField.get(null);
    findFolder = mrjFileUtilsClass.getDeclaredMethod("findFolder", new Class[]{ mrjOSTypeClass });
    getFileType = mrjFileUtilsClass.getDeclaredMethod("getFileType", new Class[]{ File.class });
    } catch (ClassNotFoundException cnfe) {
    errorMessage = cnfe.getMessage();
    return false;
    } catch (NoSuchFieldException nsfe) {
    errorMessage = nsfe.getMessage();
    return false;
    } catch (NoSuchMethodException nsme) {
    errorMessage = nsme.getMessage();
    return false;
    } catch (SecurityException se) {
    errorMessage = se.getMessage();
    return false;
    } catch (IllegalAccessException iae) {
    errorMessage = iae.getMessage();
    return false;
    break;
    return true;
    * Attempts to locate the default web browser on the local system. Caches results so it
    * only locates the browser once for each use of this class per JVM instance.
    * @return The browser for the system. Note that this may not be what you would consider
    * to be a standard web browser; instead, it's the application that gets called to
    * open the default web browser. In some cases, this will be a non-String object
    * that provides the means of calling the default browser.
    private static Object locateBrowser() {
    if (browser != null) {
    return browser;
    switch (jvm) {
    case MRJ_2_0:
    try {
    Integer finderCreatorCode = (Integer) makeOSType.invoke(null, new Object[]{ FINDER_CREATOR });
    Object aeTarget = aeTargetConstructor.newInstance( new Object[]{ finderCreatorCode });
    Integer gurlType = (Integer) makeOSType.invoke(null, new Object[]{ GURL_EVENT });
    Object appleEvent = appleEventConstructor.newInstance( new Object[]{ gurlType, gurlType, aeTarget, kAutoGenerateReturnID, kAnyTransactionID });
    // Don't set browser = appleEvent because then the next time we call
    // locateBrowser(), we'll get the same AppleEvent, to which we'll already have
    // added the relevant parameter. Instead, regenerate the AppleEvent every time.
    // There's probably a way to do this better; if any has any ideas, please let
    // me know.
    return appleEvent;
    } catch (IllegalAccessException iae) {
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    } catch (InstantiationException ie) {
    browser = null;
    errorMessage = ie.getMessage();
    return browser;
    } catch (InvocationTargetException ite) {
    browser = null;
    errorMessage = ite.getMessage();
    return browser;
    case MRJ_2_1:
    File systemFolder;
    try {
    systemFolder = (File) findFolder.invoke(null, new Object[]{ kSystemFolderType });
    } catch (IllegalArgumentException iare) {
    browser = null;
    errorMessage = iare.getMessage();
    return browser;
    } catch (IllegalAccessException iae) {
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    } catch (InvocationTargetException ite) {
    browser = null;
    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
    return browser;
    String[] systemFolderFiles = systemFolder.list();
    // Avoid a FilenameFilter because that can't be stopped mid-list
    for (int i = 0; i < systemFolderFiles.length; i++) {
    try {
    File file = new File(systemFolder, systemFolderFiles);
    if (!file.isFile()) {
    continue;
    Object fileType = getFileType.invoke(null, new Object[]{ file });
    if (FINDER_TYPE.equals(fileType.toString())) {
    browser = file.toString();
    // Actually the Finder, but that's OK return browser;
    } catch (IllegalArgumentException iare) {
    browser = browser;
    errorMessage = iare.getMessage();
    return null;
    } catch (IllegalAccessException iae) {
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    } catch (InvocationTargetException ite) {
    browser = null;
    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException(). getMessage();
    return browser;
    browser = null;
    break;
    case WINDOWS_NT:
    browser = "cmd.exe";
    break;
    case WINDOWS_9x:
    browser = "command.com";
    break;
    case OTHER: //fall through
    default:
    browser = "netscape";
    break;
    return browser;
    * Attempts to open the default web browser to the given URL.
    * @param url The URL to open
    * @throws IOException If the web browser could not be located or does not run
    public static void openURL(String url) throws IOException {
    if (!loadedWithoutErrors) {
    throw new IOException("Exception in finding browser: " + errorMessage);
    Object browser = locateBrowser();
    if (browser == null) {
    throw new IOException("Unable to locate browser: " + errorMessage);
    switch (jvm) {
    case MRJ_2_0:
    Object aeDesc = null;
    try {
    aeDesc = aeDescConstructor.newInstance( new Object[]{ url });
    putParameter.invoke(browser, new Object[]{ keyDirectObject, aeDesc });
    sendNoReply.invoke(browser, new Object[]{ });
    } catch (InvocationTargetException ite) {
    throw new IOException( "InvocationTargetException while creating AEDesc: " + ite.getMessage());
    } catch (IllegalAccessException iae) {
    throw new IOException( "IllegalAccessException while building AppleEvent: " + iae.getMessage());
    } catch (InstantiationException ie) {
    throw new IOException( "InstantiationException while creating AEDesc: " + ie.getMessage());
    } finally {
    aeDesc = null; // Encourage it to get disposed if it was created
    browser = null; // Ditto
    } break;
    case MRJ_2_1:
    Runtime.getRuntime().exec( new String[]{ (String) browser, url });
    break;
    case WINDOWS_NT://fall through
    case WINDOWS_9x:
    Runtime.getRuntime().exec( new String[]{ (String) browser, FIRST_WINDOWS_PARAMETER, SECOND_WINDOWS_PARAMETER, url });
    break;
    case OTHER: // Assume that we're on Unix and that Netscape is installed
    // First, attempt to open the URL in a currently running session of Netscape
    Process process = Runtime.getRuntime().exec((String) browser + NETSCAPE_OPEN_PARAMETER_START + url + NETSCAPE_OPEN_PARAMETER_END);
    try {
    int exitCode = process.waitFor();
    if (exitCode != 0) { // if Netscape was not open
    Runtime.getRuntime().exec( new String[]{ (String) browser, url });
    } catch (InterruptedException ie) {
    throw new IOException( "InterruptedException while launching browser: " + ie.getMessage());
    } break;
    default: // This should never occur, but if it does, we'll try the simplest thing possible
    Runtime.getRuntime().exec( new String[]{ (String) browser, url });
    break;
    // Driver to test class
    public static void main(String[] args) throws IOException {
    BrowserLauncher br = new BrowserLauncher();
    if (args.length != 1) br.openURL("http://199.233.155.110:8080");
    else br.openURL(args[0]);

  • Open new URL page in same window

    Hi all,
    I am using LinkToUrl UI element for opening a new URL
    page.
    I did it successfully by giving the URL in reference property.
    But the link is opening in new window.It should be opened
    in same window instead of new window.
    Any one can help me........

    Hi
    Use the target property of LinktoURL .
    You can specify the window name where you want to load new URL.
    Check the following Link.
    [Link|http://help.sap.com/saphelp_erp2005/helpdata/en/25/e2f0416ab6da6fe10000000a1550b0/content.htm]
    Regards
    Naresh

  • When opening new message page loads with message from some one already filled in

    using fire fox I go to hotmail lg in open new message and there is already a message there saying hi etc and information about a web site..it appears everytime I want to send a new message
    == This happened ==
    Every time Firefox opened

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • Open new url in java application

    Hi,now i met a problem,i want to open a url in a application in any platform.It can descrips like this:In a java application ,there is a button ,when i clicked the button ,i can open the web browser and open the url like http://www.google.com in the browser.
    Thanks in advance.

    yeah,somebody do it in his software,but i can't find its sourcecode.
    yesterday i did it and it works fine,but it can't work on windows platform and maybe it has bug.So i want to find a good way to solve it and it can works on any platform.
    Thanks your reply.

  • Issue with custom toolbar button in alv and leave screen

    Hi,
    in one subscreen (say screen 100)i have an alv with custom ADD  toolbar button..so in the user_command event handler ,i call a antoher screen(dialogue)..like if i click on ADD button ,it should display dialogue screen(say 200) and after entering input in dialogue screen i click on CONINUE to retrun to screen 100..problem is for the first time i click on ADD button its working fine ,succesffyuly returned to screen 100...but for the second time i click on add button , i have to click on twice the CONTINUE button to retrun to screen 100..when debuggin i found the user_command event routin is executin twice ..any solution..
    Thanks,
    srini

    Apparently handler is set for every new ALV instance. This you get by executing CREATE OBJECT alv... every time PBO is raised. Ensure you are executing this statement only once duirng program lifetime. Then the system will match event handler only with one ALV instance (executing it once).
    if r_alv is not bound.
       CREATE OBJECT r_alv ...
       SET HANDLER ...
    endif.
    Regards
    Marcin

  • How to open a URL that begins with news://

    Hi, everyone!
    It seems a silly question, but how to open it?
    URL is here: news://news.gmane.org:119/gmane.editors.lyx.general

    That's a URL for a usenet group. Those aren't used very much anymore (except by some true diehards), and it's likely your ISP doesn't even provide the service directly, though there are ways to access them via the web. In your case, click here.
    If you wanted to configure your browser to handle them, well, it would help to know what browser you're using. For Firefox, you could try the instructions here, but I'd guess it wasn't worth it, unless you had to deal with such links often.
    Last edited by frabjous (2010-11-10 21:40:46)

  • Open new url window with specific parameters

    usually, one would use window.open(url,parameters)
    When using air, the only option I found was
    air.navigateToURL(url) and it doesn't seem to allow parameters.
    Can anybody please tell me how to perform a similar action to
    window.open(url,parameters) ??

    i made this function, to do that in simple way
    * @author cybergib15
    * Crear una ventana nueva
    * @param {String} html Ruta del archivo html o pagina.
    * @param {Int} width Ancho de la ventana.
    * @param {Int} height Alto de la ventana.
    * @param {Boolean} transparent
    * @param {Boolean} resizable
    * @param {Boolean} maximizable
    * @param {Int} left
    * @param {Int} top
    * @return {Object} Retorna el objeto HTMLloader.
    function
    nuevaVentana(html,width,height,transparent,resizable,maximizable,left,top){
    var options = new air.NativeWindowInitOptions();
    options.systemChrome =
    air.NativeWindowSystemChrome.STANDARD;
    if(transparent==true)
    options.systemChrome=air.NativeWindowSystemChrome.NONE;
    options.transparent = transparent;
    options.resizable=resizable;
    options.maximizable=maximizable;
    if(left==undefined)left=0;
    if(top==undefined)top=0;
    var windowBounds = new air.Rectangle(left,top);
    windowBounds.width=width;
    windowBounds.height=height;
    newHTMLLoader = air.HTMLLoader.createRootWindow(true,
    options, true, windowBounds);
    newHTMLLoader.load(new air.URLRequest(html));
    return newHTMLLoader;
    }

  • Middle mouse button in FF 4.0, Linux, does not open new url from clipboard

    In new version FF 4.0 on Linux, middle mouse button doesn't open url (which is copy from clipboard in Linux style) without http:// prefix. It open url in format "http://www.mozilla.com" but doesn't open "www.mozilla.com". It works properly in previous versions FF.

    And, wouldn't you know it, an hour after posting I found the simple solution...
    Someone suggested that the Logitech RX300 mouse had a problem with mapping the middle (wheel) mouse button - try another one.
    I tried 4 various mice - they all worked. The Logitech RX30x mice needs some adjustments.

  • Cannot Open the URL of CWA with ISE

    Hi Folks,
    I have a problem when doing the CWA with ISE so that I can Provide the access of the network for the guests.
    Everything goes fine except the URL of the CWA: When the guests open the explorer and enter a domain after connecting the SSID, they will be redirected to the URL like "https://hostname.demo.com:8443/guestportal/..................." which starts with the hostname of the ISE and the domain-name of the ISE, but for us, we don't have any AD and LAN DNS for our network so that we cannot translate the hostname.demo.com into the IP of the ISE, so can I just change the URL into IP type like "https://10.10.10.70:8443/guestportal"?

    Screenshot of a screenshot (sorry) attached.
    Basically it's in authorization policy, allows you to use a static DNS or IP address

  • SSMS 2012 crashes when opening new query on instance with Failover Clustering installed (not 2012 R2)

    Hi,
    I'm trying to start a new query in SSMS, but every time I click the "New Query" button on the tool bar or open a new query window by Object Explorer -> right-click -> Script as -> New Query Editor Window, SSMS hangs with (Not Responding)
    and has to be restarted.
    I'm running SSMS 2012 (v11.0.3381.0) on Server 2012 6.2.9200. I'm connecting to the primary node of an AlwaysOn Availability Group, and SSMS is located on the primary node itself.
    I'm aware of KB2908806, which describes the same symptoms, but this only applies to Windows 6.3.x. Is there an equivalent fix for 6.2.x, or another workaround?
    EDIT: To confirm behaviour: "New Query" works intermittantly, Script as ... to -> New Query Editor Window always crashes.

    Hello,
    there are many reasons your SSMS process would "hang", including bad server performance or internal SSMS processes being suspended due to locking.
    When you open a new query window, what your SSMS application does internally is to open a new connection to your instance. You could be experiencing problems in your instance that are causing the logon process to take too long.
    How does the bad performance issue generally happen? Is it only happening by connecting to the instance in SSMS? Does the same problem happen when you attempt to connect through an application, or by any other clients?
    What happens if you try to connect to the instance through a remote computer?
    Check your server's resource monitor for resource usage. Do you see any counters which could indicate performance problems?
    Please post the results of @@Version for your server.
    Can you open Activity Monitor in SSMS? How many sessions are listed? Does it also take a long time when you first log into the instance in SSMS, before opening a new query tab? Is the SSMS hanging for all databases when opening a new query window, or just
    for the ones included in the availability group? Have you tried to connect to your instance by using a DAC connection?
    DAC: http://technet.microsoft.com/en-us/library/ms178068%28v=sql.105%29.aspx
    Do you have any server logon triggers? Are there any traces running other than the default trace? What are your server specifications? How many logical cores does it have? Is it being used in a production environment? Is there any CPU or I/O affinity set
    for the instance? Whats your min/max memory settings? Run DBCC MEMORYSTATUS and post the results here.
    Are there any error messages in the SQL Server errorlog? Is your server dedicated to the SQL Server Instance?
    Run this query and post the results:
    SELECT * FROM SYS.dm_os_process_memory

Maybe you are looking for

  • Newbie question: How to create a namespace and record filedate-retrieve

    Spanking new to Namespaces Looking for a way to place a .jpg as a smart object, then using Namespace, record the filedate of the .jpg Then, have the layer sense if the original .jpg is newer and change the color of the layer. Running into complicatio

  • How to insert blank lines in the ALV output.

    Hi Friends, Could any body help me out How to insert blank lines in the ALV output.?? Any Code pls... Thank you, Vikram.C

  • Cleanup of Finder Contextual Menu - Open With

    How can I clean up the 'Open With' Finder Contextual Menu? It currently has duplicate entries for some applications (and, no, I don't have multiple copies of these applications installed on my Mac). I tried to rebuild the 'Launch Services' database u

  • Download location...

    Is there a way to make the safari browser for windows ask me where i want to save files everytime? that is pretty much the only thing keeping me from switching from firefox to safari for windows, i dont want everything i download saved to the same pl

  • Can i replace my semi hd led with full hd led?

    Hp dv6-6110tx  windows 7 home premium 64bit my led was accidently broken and now i want to replace my old semi hd led with full hd led. is it possible ??