UI Mass Command opening new window

Hi all,
I need your help. I would like to create new UI Mass Command which will open new IE window.
For better understanding of my problem:
I've created UI Mass Command which take selected resources and add them to ZIP archive. The final ZIP stream I store to a static class. Then I create servlet which loads the ZIP stream from the static class and offer it to user for downloading. But I need modify the command to be able call the servlet in new window.
Do you have any idea how to do that? Thank you in advance for any reply!
Regards
Zbynek

Hi Zbynek ,
You need to implement a class which extends AbstractCommand class and in the method getLinkAttributes() you can return the link that should be executed when user click the UICommand.
Check this to know, how to implement UICommand:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/Implementing%20Flexible%20UI%20One-Step-Screenflow.article
Here is getLinkAttributes implementation:
public LinkAttributes getLinkAttributes() {
        try {
            String path = getResource().getRID().getPath();
                 String irjString = pcr.getServletRequest().getContextPath();
               String linkRef = irjString + "/servlet/prt/portal/prtroot/YourComponent";
            return new LinkAttributes(
                "javascript:me.window.open('"
                    + linkRef
                    + "?path="
                    + path
                    + "', 'myWin_"
                    + System.currentTimeMillis()
                    + "', 'left=250, top=250, toolbar=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=700,height=350');",
                "_top",
                true);
        } catch (ResourceException e) {
            log.severe(e, "Operation failed");
            return null;
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers

Similar Messages

  • Command-T opens new window not new Tab with Snow Leopard

    Does anyone else have this issue? Command-T opens new window not new Tab with SL.
    And yes all my settings are correct!!

    Greetings,
    If your preferences for Tabs are correctly set (the top two checkboxes are checked) and it's still opening a new window, then it would seem your preferences may be corrupt. In that case, you should quit Safari, go to Home/Library/Preferences and delete the com.apple.Safari.plist file.
    Then restart Safari, setup your preferences again, and test to see if it works.

  • MassCommand Opening New Window

    Hello....
    Does anyone know if I can create a new custom command that allows the user to select a resource (i.e. like a mass command event), select the command, and open a new window....
    For example... I would like to be able to select a resource and display the properties of that resource (details-->properties)
    I can get it to work if I extend AbstractCommand, but not if I extend AbstractMassCommand.  Does AbstractMassCommand support the getLinkAttributes method?
    Any help is much appreciated.

    We have contacted SAP and they informed us that the getLinkAttributes() method usually used for things like opening new windows is not applicable to mass commands.  They went as far as to say that it didn't make sense to open new windows based on mass commands.
    Having said that, I have come up with a less than perfect workaround.  If you implement the AbstractMassCommand interface and do something similar to the following:
    public IRenderingEvent execute(IScreenflowData sfd) throws WcmException
    TextView tv = new TextView("<script>window.open('http://www.cnn.com');</script>");
    tv.setEncode(false);
    ConfirmComponent cc = new ConfirmComponent(ConfirmComponent.OK_CANCEL, this.getResourceContext().getLocale(),tv);
    OneStepScreenflow oscf = new OnseStepScreenflow(sfd,this.getAlias(),resource.getRID(),cc);
    return oscf.execute();
    The trouble with this is it forces you to have a one step screen with a confirm component on it... not the ideal case for what I wanted to do.
    I have not so far figured out how to fire JavaScript from the original window without going to the secondary window.
    Hope this helps some, and if you find any more please let me know.

  • What is the correct way to open new window with launchDialog & returnDialog

    Hi,
    JDev : 11.1.1.1.2.0
    My current page url is http://127.0.0.1:7101/ThruputApplication/faces/Test.jspx?_afrLoop=21785535204821&_afrWindowMode=0&_adf.ctrl-state=d1x4f8z6p_9 and
    From this page, I trying to open new browser window using command button's action method with below code
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ViewHandler viewHandler =
    facesContext.getApplication().getViewHandler();
    StringBuilder strBuilder = new StringBuilder();
    UIViewRoot dialog =
    viewHandler.createView(facesContext, strBuilder.append("/reports/LPLReport.jsp?").append(sURL).toString());
    Map properties = new HashMap();
    properties.put("width", Integer.valueOf(500));
    properties.put("height", Integer.valueOf(300));
    AdfFacesContext afConetxt = AdfFacesContext.getCurrentInstance();
    afConetxt.launchDialog(dialog, properties, null, true, null);
    New browser window is getting open successfully but after opeing this new window if I do any operation such like selecting item from selectOneChoice or checkbox selection from the screen from which I have launce new browser window then is giving me below message.
    Are you sure you want to navigate away from this page ?
    There are one or more dependent dialogs open. Navigation from this page will invalidate any open dialogs.
    Press OK to continue, or Cancel to stay on the current page.
    I have also tried AdfFacesContext.getCurrentInstance().returnFromDialog(null, null); to return dialog but its giving me below error:
    <DialogServiceImpl><returnFromDialog> No 'DialogUsedRK' key available for returnFromDialog to do the right thing!
    <Reports><generateReports> Exception
    java.lang.IllegalStateException: popView(): No view has been pushed.
         at org.apache.myfaces.trinidadinternal.context.DialogServiceImpl.popView(DialogServiceImpl.java:88)
         at org.apache.myfaces.trinidadinternal.context.DialogServiceImpl.returnFromDialog(DialogServiceImpl.java:182)
         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.returnFromDialog(RequestContextImpl.java:132)
         at oracle.adfinternal.view.faces.context.AdfFacesContextImpl.returnFromDialog(AdfFacesContextImpl.java:318)
         at com.enbridge.forecasting.tps.backing.reports.Reports.generateMsgRptGenerated(Reports.java:2602)
         at com.enbridge.forecasting.tps.backing.reports.Reports.generateReports(Reports.java:1212)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please give me the solution so that I can stay on the screen and can continue with that screen after opening new browser window.
    Currently after opening new window as mentioned above, I can't do anything. If I press ok button then it will give me login page and if I press cancel button then my screen component's state become invalid.
    Regards,
    devang

    Thanks Frank,
    We have resolved the issue. Cookies max age was set as current browser seeion in websphere.
    After changing it as some max seconds, it is working fine.
    Mohanraj M

  • How do I change the default settings for opening new window?

    Everytime I click on a link, new window would only open in new tab not new window. How would I change this default to open new windows instead of new tab?
    Thanks.

    HI,
    From the Safari Menu Bar click Safari/Preferences (or Command + comma on your keyboard).
    Click Tabs. You can set your preferences there.
    Carolyn
    Message was edited by: Carolyn Samit

  • Some programs open new window instead of new tab in open window

    Firefox 17.0.1. I have the option "Open new windows in a new tab instead" set, I use the Tree Style Tab 0.14.2012111201 addon (and others unrelated to tabs or windows), and I have multiple profiles. It seems that since I started using multiple profiles some programs (MediaMonkey's help, for example) insist on opening a new Firefox window. If I select any of the one or more currently open profiles it says "Profile in use". Some programs that want to open an internet site to show their help files do open a tab in the current browser window, as expected and desired. But more programs cause the Choose a profile box to display.

    Make sure that you do not start Firefox with the -no-remote switch or have set the environment variable MOZ_NO_REMOTE=1 (Control Panel > System > Advanced > Environment variables).
    If you need to have more than one profile open at the same time then start subsequent instances with the -no-remote command line switch.<br />
    You can not send links from other programs to a Firefox instance that is started with the -no-remote switch.
    In such a case you need to drag links in a Firefox window or paste the link in the location bar.
    *http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile

  • Firefox 31 (Ubuntu) won't open new window or Javascript pop-ups

    Hi, I am running Firefox 31.0 in Ubuntu 14.04 having the following problem:
    1) When I click on New Window or New Private Window in the File menu, nothing happens, same with pressing Ctrl-N.
    2) Certain websites are not able to open new windows or pop-up windows through Java or Javascript
    (e.g. the command: javascript:popup_imp(...) does not produce anything)
    I did try safe-mode and there everything works fine. Then I restarted firefox (several times) with all plugins disabled but still had the same problem, so I don't know what causes the difference between safe-mode and no plugins.
    (By the way, there is no problem opening a New Tab by pressing Ctrl-T or from the file menu, the issue is only the New Window and New Private Window).
    Is there any other way to narrow down what is preventing the new windows?

    Hi cor-el,
    thanks for your answer, however as I explained in my post, safe-mode does not present the problem, but disabling the extensions on its own does not help (i.e with all extensions disabled the problem still is there).
    Also, I did not have this problem in the past and I did not change anything graphics related (unless something was changed software-wise internally and I did not notice).
    And yes I am currently using the default theme.

  • How do I tell Logic to open new windows always on my external monitor (when available)?

    Hey guys
    I finally got my own copy of Logic 9 from the App Store and I'm very happy with it.
    I have a question though. Logic always open new windows (e.g. when opening a project or when opening a plugin, etc.) in my Macbook Pro's monitor, but at home I have a big external screen which I want to use as the main screen.
    I already have set the external monitor to be the main screen in the System Preferences, so the dock and menu bar always display correctly on my external monitor when available. But Logic still uses my MBP's monitor as main monitor, so I have to move the windows to the external display every time I open them.
    Is there a way to tell Logic to use my external monitor as default when it's availble?
    Thanks, Josh

    There is a thing in OSX that is called "key focus" or "focus".
    When you type on your keyboard (text or any keyboard shortcut), the OS has to know where to send that command to if you have multiple windows open (or multiple applications).  The answer is, it directs the command to the window that has "key focus".
    The key focus window is the one with the active window title bar (not grayed out) and the colored three buttons in the upper left corner (unfortunately, Logic doesn't use colors).
    Now to Logic:
    Logic follows the same rules. However, you have to pay attention to multi-pane windows like the Arrange window. This is a window with more windows (panes) inside. Now the question is, which window pane inside that window has key focus. If you look closely, then you see that the window frame changes  their shade slightly (sometimes very hard to see). Pay especially attention to plugins. They also have key focus when selected and can receive keystrokes.
    Finally to your question.
    You cannot set the preferences on which monitor screen Logic opens  a window. This is determined by the location of the window that has currently key focus. Any new window and also alert windows and dialog windows  (Save, Open) will open on that screen.
    So if you want a window to open on you external screen, click on a Logic window on that screen.
    I have five monitors on my Logic setup and I use a QuicKeys macro (push one button) that sets the key focus to my main monitor and now any new window will open on that screen screen.
    Hope that helps 
    Edgar Rothermich 
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • Under options/tabs: open new windows in a new tab instead does not work. many sites open their popups or new windows NOT in a tab as it should. How to solve this, has been a problem in the last versions incl. the latest.

    i would like the option ´open new window in new tab instead´ working properly so no new windows will be opened except when I command them to..
    as said, many websites have popups (most are blocked, still some come through) who open in a new window.

    Type '''about:config''' in the Location (address) bar and press the "Enter" key. When you see a warning, click '''I'll be careful, I promise!''' button.
    * Preferences that have been modified are shown as '''bold (user set)'''.
    * Preferences can be '''Reset to the default''' or changed via the right-click context menu.
    -> In the '''Filter bar''' type '''browser.link.open_newwindow'''
    * Right click the preference '''browser.link.open_newwindow''' and click '''Modify'''
    * change the value to '''3'''
    * click OK
    -> In the '''Filter bar''' type '''browser.link.open_newwindow.restriction'''
    * Right click the preference '''browser.link.open_newwindow.restriction''' and click '''Modify'''
    * change the value to '''0''' (zero)
    * click OK
    -> Close the '''about:config''' tab and then Restart Firefox.
    Check and tell if its working.

  • Runtime exec opens new window

    Hi, I am using Runtime.exec to run an external application in Windows2000. � can read its output and i can destroy it without any problems.
    But when i run my java application with javaw , the external application i run with rt.exec opens new window(without output texts, empty) . just output command windows which opens when i run the external app. from a command prompt.
    If i run my java application with java.exe then then external application DO NOT open new window and run correctly. But this time my java window stays on desktop, and that's not any good for a Windows Application.
    In both cases everything runs OK. The only problem is the command prompt windows.
    Is there a solution when working with javaw.exe ? or hide the window when running with java.exe
    Thanks all.

    bug with ID: 4244515

  • Opening new window or tab to the same site being viewed on another tab/wind

    I am a new MacBook user. In my past experience with Internet Explorer, I would often open a new window to the same site that I was already viewing through File>Open New Window. This method was often preferable to opening a new window through the IE icon and loading to the homepage. I have gotten quite used to this pattern and am trying to figure out if there is a way to open a new tab or window to the same page that I am already viewing. I know how to open a new tab or window, but rather than going to the same page as in IE, the new tab is blank and the new window goes to the home page. I am using Safari and Firefox and can't figure out how to do this in either browser.

    Hi,
    Try this, I think it works for both Safari and Firefox (not 100% sure on Firefox but think so...)
    Press command+l (lowercase L) and then press commandoptionpress return. That will open a new window with the current webpage in the new window. To open a new tab with the same details, omit the option key in the second step.
    Command key = one with the Apple symbol
    Option key may be called Alt on your keyboard.
    Hope that works!

  • Links opening new Windows

    Is there a global setting that controls whether links in Portal
    open new IE Windows. I know how to edit this attibute for URL
    items in content areas, but our portal pages and portlet links
    have recently began to open new windows without any explanation.

    iBod:
    Thanks! That did indeed solve the problem. I knew the solution was simple, I just couldn't find the right "Preference" to adjust. It is certainly non-intuitive to have it under the "Tabs" preference panel -- I must have looked right at it and dismissed it as not relevant to my problem. I have now marked this question as "Solved."
    Mulder:
    I have given tabs a try -- many times. It just isn't my style. Now with this preference properly adjusted, I vastly prefer using windows-style browsing. Also, I can scroll through all the open windows in a breeze using "Command-tilde (~)", which is like riffling the pages of a magazine. Very convenient. Another problem with tabs is that all open pages have a tab visible in the top window, which means that anyone seeing the screen can see the names of all currently open Web pages. In my work environment, that is not acceptable -- I only want the top window to be visible at any given time, as it would be a security issue if random passersby walking behind my work area could see exactly which windows I have open at a particular time. In any case, I marked your answer as "Helpful" as well, since the question was already "Solved" by iBod's answer, which was posted first here chronologically.

  • I have tried to set my homepage to a specific website. However, whenever I open a new Safari window, it always returns to the last page I was at before I closed Safari. Any ideas? I did this was Safari preferences, open new window to homepage...

    I have tried to set my homepage to a specific website. However, whenever I open a new Safari window, it always returns to the last page I was at before I closed Safari. Any ideas? I did this under Safari preferences, open new window to homepage...

    Safari is opening using the resume feature. To disable that, quit Safari using Command+Option+Q or Hold Option when choosing the menu item Safari>Quit.

  • Safari 5.1 (5.1.1) doesn't open new window (OS 10.6.8)

    I notice Safari 5.1 (and now 5.1.1) doesn't open new window when ⌘N. The button highlight but no window appears. ⌘T is ok. but not ⌘N.
    Is someone have this problem ? And patch this ?

    Could be the preferences are corrupted ..
    Go to ~/Library/Preferences. Move the com.apple.Safari.plist file from the Preferences folder to the Desktop.
    Quit then relaunch Safari to test. If that helped, move the .plist file to the Trash.
    If the that didn't make a difference, click Reset from your Safari menu bar. Select the top 5 buttons, click Reset.
    Restart your Mac.
    Try Command + N in Safari.
    Also, make sure you haven't set up keyboard shortcut in System Preferences / Keyboard - Keyboard Shortcuts that may be causing a conflict.

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

Maybe you are looking for

  • CS4 won't recognize DV camera for capture

    I installed CS4 Master Collection and all works well except for Premiere. It won't capture. The error is " Can't activate controller. Try re-setting Camera" Windows New Found Hardware recognizes it and says it's ready to use. I click "No Action" or "

  • AcroForm.api Crash

    Hi Everyone, Some of our end-users have reported sporatic crashes when editing forms. I was able to pull an application crash dump. Has anyone seen this? Environment Details Windows 7 SP1 x64 Adobe Reader 11.0.3.37 Dump Details FAULTING_IP: +8931 4a4

  • IDCS2: creating pdf bookmarks from TOC's of multilayer ID document

    I am working with ID CS2. I've got multilayer documents for multilingual documentation (i.e.1st layer English, 2nd layer French,...) Each layer contains its own TOC. So far so good. To create a monolingual PDF I am hiding all the layers but the one o

  • Flow of order managment

    can any one mail me the work flow of the order management hope to hear from u asap regards Praveen Benjamin

  • Exchange rate QAR: USD to be fixed

    Hi All we are having company code currency and local currency as USD. However we making some payments in QAR and the requirement is to have fixed the exchange rate. Please let me know the setting to be carried out and will there be any implication wh