Popup Window in same component

Hi All
I have created a component that displays graph information.
The users require a print verion of the view that shows the graph data.  I have created a new viewset and view in my component but i cannot display it in a popup.
Here is the code.
data: lr_popup type ref to IF_BSP_WD_POPUP.
  IF lr_popup IS NOT BOUND.
    lr_popup = me->comp_controller->window_manager->create_popup(
                          iv_interface_view_name = 'ZAGRI_MILK_REPS/MainWindow'
                          iv_usage_name          = 'printFriendlyPopup'
                          iv_title               = 'Popup' ).
    lr_popup->set_window_width( iv_width = 600 ).
  ENDIF.
  lr_popup->set_on_close_event( iv_view = me iv_event_name = 'EH_ONRETURN').
  lr_popup->open( 'OPEN_PRINT_POPUP' ).
Has anyone done this
any help would be great
Thanks

Got this sorted
I had to create a new window, add the viewset to the window.
I then added the new window to the component interface.
I then created a new component usage that uses my new window and then the popup worked.

Similar Messages

  • How can we navigate between two windows of same component in webdynpro ABAP

    Hi
    how can we navigate between two windows( not views ) of same component in webdynpro ABAP. its an urgent requirement
    Thanks in advance.
    Regards
    Laeeq

    Hi Laeeq,
    You cannot navigate between windows of one component. You can only call a dialog box showing the contents of a second window, or you can embed the contents of a window of a different component.
    Just add all the views you need to the one and only main window of the component.
    Ciao, Regina

  • Navigation from One Window to other Window in same Component

    Hello,
    Component: MAIN
    2 iviews - AView & BView
    2 windows: FirstWindow & SecondWindow.
    2 WindowInterfaceViews: FirstWindowInterfaceView & SecondWindowInterfaceView
    FirstWindow contains: AView & interfaceView of BView (plug from AView to BInterfaceView)
    SecondWindow contains: BView (default) & AView. (there are plugs to navigate between two views. i.e. from AView to BView & viceversa).
    for both the windows I should navigate from different scenario. i.e. FirstWindow from XComponent through FirstInterfaceWindow& SecondWindow from YComponenet through SecondWindowInterfaceView.
    2 scenarios: please read 2 scenarios carefully
    1) if I navigate to FirstWindow from XComponent i.e currently i am in AView then I could navigate to BView from AView (Upto here the navigation is working successfully)
    there is a button in BView which plugs out to another component (OTHER_Component), when i click that i am getting the below error
    "Cannot navigate via outbound plug ToOther of view BInterfaceView because there is no navigational link attached to it".
    2) whereas if navigate to secondWindow from YComponent, then i cloud navigate to the AView & plug out to OTHER_Component successfully. i.e. ToOther plug is working fine & could navigate to Other_component
    "i.e. problem is only when entering from FirstWindow then navigating to BInterfaceView then i couldn't navigate to the OTHER_component..
    Thanks & Regards
    Maha

    HI Maha,
    If in am not wrong there are overall three components compX, YourComp and compY.
    In your component you need to have two views View1 and View2 but i different windows say Win1 and Win2 respectively.
    Within YourComp you need to navigate from View1 to View2 which are in different windows by windows navigation using plugs and embedding the other's interface view. You have embedded interface view for Win2 in Win1 but not interface view of Win1 in Win2. So, embed that and mention the navigation via plugs from View2 to interface view if Window1.  And, embedding View1 in Win2 along with View2 is need less.They can be done using plugs and interfaces as well.
    Now the problem is your application will have just one startup plug which will decide which would be the default Window to start (in turn decided by choosing the interface view of the default window intended). As if it is interface view of Win1 then directly navigating to Win2>View2 is ruled out.
    That is why it is giving error in finding the navigation link from win2 to win1.
    Just double click on your application and check the default startup plug and the default interface view selected. It will help you understand better.
    So, we cannot have two different starting windows for the same application (needless to say).
    What you can do is let the interface view of the wind1 be the default one, s that it always starts with View1 which is the default view for the window. No in the wdDoInit() of View1 check if it coming from CompX or CompY. In case, it comes from CompY, navigate to View2 using plugs and interface views. Otherwise, not. This will cause you to land up on View2 if you come from CompY.
    Now the question is how do we decide whether it is coming from CompX or CompY? You can have output parameters of same name say "param" from both the components but with value 0 and 1. Now catch this passed parameter in the wdDoInit of YourComp using WDProtocolAdaptor API and decide the source Component.
    Hope, your problem is resolved.
    Regards,
    Tushar Sinha

  • Trying to use a popup window as a component  in another component

    Hi guys,
    I am unable to use a popup component in another component in
    Flex .
    Its not calling the popup compopnent.
    Could anyone plz hel me.
    This is my code.
    This is the parent component TitlWindow where i want to call
    my popup
    component.
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" width="100%" height="100%"
    xmlns:util="userinterfaces.util.*"
    creationComplete="showWindow();"
    title="CREATE PROFILE">
    This is my script where i am writing a function to call a
    component
    whose name is fielupload.mxml
    <mx:Script>
    private function showWindow():void
    pop =
    fileupload(PopUpManager.createPopUp(this,fileupload,true));//
    fileupload.mxml
    is called
    pop.title = "Please enter your login information.";
    pop.showCloseButton =true;
    PopUpManager.centerPopUp(pop);
    pop.addEventListener("close",removeMe);
    </mx:TitleWindow>
    This is the code for fileupload.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" width="100%" height="100%"
    xmlns:util="userinterfaces.util.*" title="File Upload">
    <mx:Script>
    <![CDATA[
    import mx.collections.XMLListCollection;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.ProgressEvent;
    import mx.controls.Alert;
    import flash.net.FileFilter;
    import flash.net.FileReference;
    import flash.events.SecurityErrorEvent;
    import mx.controls.Button;
    import mx.controls.TextInput;
    import mx.controls.ProgressBar;
    import mx.core.Application;
    import flash.net.URLRequest;
    import flash.net.URLRequestMethod;
    import mx.core.UIComponent;
    import mx.managers.PopUpManager;
    public var fileFilterImage:FileFilter = new
    FileFilter("Images","*.png;*.gif;*.jpg");
    public var fileFilterDocument:FileFilter = new
    FileFilter("Documents", "*.txt;*.doc;*.pdf;*.rtf");
    public var fileFilterArchives:FileFilter = new
    FileFilter("Archives", "*.zip;*.tar;*.hqx");
    public var fileFilterAll:FileFilter = new
    FileFilter("All", "*.*");
    public var fileRef:FileReference;
    public var selectedId:String;
    public function init():void {
    fileRef = new FileReference();
    fileRef.addEventListener(Event.CANCEL,
    traceEvent);
    fileRef.addEventListener(Event.COMPLETE,
    completeEvent);
    fileRef.addEventListener(Event.SELECT,
    selectEvent);
    fileRef.addEventListener(IOErrorEvent.IO_ERROR,
    traceEvent);
    fileRef.addEventListener(Event.OPEN, traceEvent);
    fileRef.addEventListener(ProgressEvent.PROGRESS,
    onFileProgress);
    fileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    traceEvent);
    public function traceEvent(event:Event):void {
    var tmp:String =
    "================================\n";
    public function
    ioErrorEvent(event:IOErrorEvent):void{
    Alert.show("IOError:" + event.text);
    traceEvent(event);
    public function selectEvent(event:Event):void{
    //var selectedId:String =
    selectButton(event);
    //Alert.show("i am in id" +
    Application.application.winMyProfile.selectedId);
    btnUpload.enabled = true;
    iptFile.text = fileRef.name;
    public function
    selectButton(catchButton:Event):void{
    var newButton : Button = new Button;
    newButton = catchButton.currentTarget
    as Button
    selectedId = newButton.id;
    //Alert.show("i am in id" +
    selectedId);
    public function
    onFileProgress(event:ProgressEvent):void {
    prgBarUpload.label = "Loaded " +
    event.bytesLoaded + " of " +
    event.bytesTotal + " bytes";
    prgBarUpload.setProgress(event.bytesLoaded,
    event.bytesTotal);
    public function
    completeEvent(event:Event):void {
    Alert.show("File Uploaded
    Successfully");
    btnUpload.enabled = false;
    btnBrowse.enabled = true;
    public function uploadFile(url:String):void {
    url = url + "?
    folder="+Application.application.winLogin.userInfo.getUsername();
    var req:URLRequest = new
    URLRequest(url);
    req.method = URLRequestMethod.POST;
    var folder:String =
    Application.application.winLogin.userInfo.getUsername();
    fileRef.upload(req, folder,true);
    ]]>
    </mx:Script>
    <mx:VBox id="vbMain" width="100%" height="60">
    <mx:HBox width="100%" height="22">
    <mx:TextInput height="22" id="iptFile"
    width="100"/>
    <mx:Button id="btnBrowse" label="Browse"
    click="selectButton(event),fileRef.browse([fileFilterAll]);"
    />
    <mx:Button id="btnUpload" label="Upload"
    enabled="false"
    click="uploadFile('fileupload.do');" />
    <mx:Button id="btnCancel" label="Cancel"
    enabled="false"
    click="PopUpManager.removePopUp(this);"/>
    </mx:HBox>
    <mx:ProgressBar width="200"
    source="iptFileResume" height="5"
    id="prgBarUpload" mode="manual"/>
    </mx:VBox>
    </mx:TitleWindow>
    Its not even showing any error , i dont know whats the
    problem with
    it.
    Thanks for your help,
    Mario.

    If I understand, you want to display a popup Titlewindow from
    within another popup TitleWindow? This is possible.
    Simplify your code to get it working first.
    Tracy

  • Popup for view of the same component

    Hi,
    I want to display a view in a popup window, I know how to do it using interface view of an external component.
    But Is it possible to open a view of the same component in a popup window?
    Regards,
    Mauricio

    Hi,
    Create a window in you component, say MyPopUpWindow.
    In Runtime Repository, Attache the view of your component to this window.
    Now create a Component Usage , Say CUXyzPopUp , for your component as used component and use MyPopUpWindow in there. Always use F4 for attaching views, windows and attaching window to Component Usage.
    You are done !!
    Now use the usual code for creation of popup using this Component Usage.
    reuse_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'ZCOMP/MyPopupWindow'  "#EC NOTEXT
    iv_usage_name = 'CUMyPopup'                      "#EC NOTEXT
    iv_title = lv_title  ).
    Hope this helps.
    Thanks & Regards
    Suchita

  • How to close a popup window in a used component?

    Hi Experts,
    I have two applications in the same project, and they each have one component controller. Let they be component A and B. They have similar functionalities and screens. There is a popup window in A that I would like to use in B instead of creating a new popup window in B, so I added a used component of A in B in order to share the popup window. I am able to click a button in B to get a popup window from A successfully, but I am unable to close the popup window since the event has been created in A.
    Can anyone suggest me how to fix this please? I would really appreciate your help.
    Thanks,
    -Napadol

    Hi,
    You can either use the approach above, which is having an Attribute, type IWDWindow in B's Component Context. When you open the popup you store the reference. When you click close you get that reference back and destroy the window.
    Note, I'd suggest you to have your "View" with no Close Button. Then in Component A you create another View that has an UIViewContainer with your Popup View. You can code the Close code in Component A.
    This way you can do the same and have a code in Component B to close your window.
    Other way would be having it as a Component variable and using the Component Interface on A (create a Method) that goes to Component A and destroy that instance.
    Regards,
    Daniel

  • In a multiple monitor situation, how do I get popup windows to open on the same monitor as the parent application is displayed.

    I have two monitors. I have an application that I run all day, displayed on my secondary monitor. Whenever a popup windows is launched form that application, it always opens on the primary monitor. Very annoying. Any way to get the popup to launch in on the same monitor as the parent application?

    Did you solve this problem ?

  • Submitting values to the same popup window and closing the window after upd

    hi,
    i have a jsp page called index.jsp.
    in that jsp page i have an hyperlink..if i click on this it opens a popup window.in this popup window we have some values allowed to user to modify.after entering the values in popup window he clicks update then the values are updated and the window is closed and the index.jsp page is refreshed.
    how can do this.
    i want tried in this way but i failed..
    first time when i open the window i kept a flag as hidden field false..
    once the user clicks the update button after entering the value then i make the flag as true and submitt to the same page..now iam updating after immediate update i want to close the window..its not closing.
    if(!flag)
    display fields with update option
    }else
    rtreieve the values
    update in database.
    <script>
    window.opener.refresh;
    window.close();
    </script>
    }

    I had a similar problem. I resolved it by making use of IFrames.

  • Popup windows now launch a new tab in the same window

    What happened to popup windows? They open in new tabs, which is very annoying. Does anyone know how I can change this?
    Thanks!

    in my cPanel page, which is the control panel for my internet hosting, there is a place to go in and administer a mySQL database. Once inside that tool, there is a popup window for entering in SQL queries. At one time this would spawn a popup window. Now it simply loads a new tab within the same browser window.

  • I have uninstalled Lightroom and need to re-install it on the same computer. I cannot find where to re-install it. The CC popup window says that it is installed and Up to date.

    I have uninstalled Lightroom and need to re-install it on the same computer. I cannot find where to re-install it. The CC popup window says that it is installed and Up to date.

    CC desktop lists applications as "Up to Date" when not installed
    http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

  • How to open a single WD Component in a popup window?

    Hi,
    I want to open a WD component in a popup window but don't know how. I have searched this forum without a result.
    The following situation:
    DC1 (main DC) with a button to open the popup
    DC2 (popup DC)
    How can I open DC2 in a popup window without destroying DC1 in a way like
    if (!DC1.hasActiveComponent()) {
    mainR_Usage.createComponent("my.comp.DC2","my.comp/comp~DC2~wd");
    and of course how can I destroy the DC2-popup from DC1?
    The general problem is not to open a popup window inside DC1. The problem is to open DC2 as a popup!
    Thanks ahead

    Hi Bernd,
    You can try this:
    1.Create a context attribute of the type IWDWindow in your view/Component Controller of DC2, say 'PopupWindow'
    2.Create a method in your DC2, say
    openPopup()
    IWDWindowInfo winInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("DC2Window");      
           IWDWindow popup= (IWDWindow)wdComponentAPI.getWindowManager().createModalWindow(winInfo);      
           wdContext.currentPopupElement().setPopupAttribute(popup);      
           popup.setTitle("Hello, this is DC2");
           popup.setWindowSize(600,500);
           popup.setWindowPosition(100,100);
           popup.show();
                           +// Save WindowIsnstance in Context
         wdContext.currentContextElement().setPopUpWindow(window);+
    3.Expose this method in your Interface controller so that it is available to be called by DC1
    4.in your DC1 you can call this method
          if((!DC1.hasActiveComponent())
         wdThis.wdGetDC2ComponentUsage().createComponent();
         wdThis.wdGetDC2Interface().openPopup();
    5.This should open the popup window from DC2.
    6. You can have a close button or any other event on the view contained in this window itself. On click of this button you can retrive the window instance stored in the context and destroy it.
    e.g we have an action assigned to a Close button. this will be in the view from the window you are trying to open as a popup.
    onActionCloseWindow()
             IWDWindow  window = wdContext.currentContextElement().getPopUpWindow();
             window.destroyInstance();
    this should close yourr popup window.
    Regards,
    Ajay
    Edited by: Ajay Patil on Jul 6, 2010 10:27 PM

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • Error when calling a popup window in the initial screen of an application

    Hi,
        I am calling a popup window in the Initial screen to select the variant list.
    I am getting an error reference to Null Object reference.
    Here is the Error.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Exception              CX_SY_REF_IS_INITIAL
    Date and Time          15.06.2007 10:00:16
    Short text
    Access via 'NULL' object reference not possible.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_WDR_MESSAGE_AREA===========CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
    caught in
    procedure "SUPPLY_VIEW_DATA" "(METHOD)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component.
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "OBJECTS_OBJREF_NOT_ASSIGNED_NO" "CX_SY_REF_IS_INITIAL"
    "CL_WDR_MESSAGE_AREA===========CP" or "CL_WDR_MESSAGE_AREA===========CM00Q"
    "SUPPLY_VIEW_DATA"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SUPPLY_VIEW_DATA" "(METHOD)", or its possible occurrence must be declared in
    the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    Looking for Ur valuable suggestions.
    Cheers,
    Sam

    Hi Sam,
    The correct code for creating a popup window will be:
      data lo_window_manager type ref to if_wd_window_manager.
      data lo_api_component  type ref to if_wd_component.
      data lo_window         type ref to if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
                         window_name            = 'WINDOW_NAME'
    *                    title                  =
    *                    close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
    *                    close_button           = abap_true
                         button_kind            = if_wd_window=>co_buttons_okcancel
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok
      lo_window->open( ).
    Hope this helps.
    Regards,
    Ram

  • Need to dynamically include an image file when calling a popup window

    I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).
    My question is, what is the proper/best way to do this?
    Here are some possible ways I can think of...
    1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?
    2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.
    3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?
    I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.

    Just create a context attribute "imageFileName" in the component controller or a custom controller, map this attribute from both views (the one that contains the buttons and the one in the popup window that displays the image).
    Now you can have an separate action for each button or one common action. In the first case just set the "imageFileName" inside the action handler for the specific button. In the second case use an action parameter "buttonId" and a parameter mapping
    button.mappingOfOnAction().setParameter("buttonId", button.getId());
    to determine which button triggered the action. After having checked which button was pressed, set the "imageFileName" accordingly.
    Armin

  • Can I launch a new JSP on a popup window, when cliking a HTMLB button ?

    Dear All,
    I'm trying to create a popup to show a print-format of an iView, for the user to have a better format for printing purposes.
    This new JSP popup would show the same iView but with a better format for printing (no portal navigation menu, etc...)
    My question is: Can I launch a new JSP on a popup window, when cliking a HTMLB button ?
    Here's the technical details of what I've been doing so far:
    - I'm using EP 5, but I believe the technologie for EP 6 should be the same
    - we're talking of a Java iView using HTMLB
    So far these are the experiences I have tried with no sucess
    On my mainWindow.jsp I have this piece of code, but it doesn't work:
    (etc...)
    <%
    ResourceBundle res = componentRequest.getResourceBundle();
    IResource rs = componentRequest.getResource(IResource.JSP, "printFormat.jsp");
    String JSP_URL = rs.getResourceInformation().getURL(componentRequest);
    %>
    (etc...)
    <hbj:button
      id="ButPopUP"
      text="Print Format"
      width="100"
      onClientClick="showPopup()"
      design="STANDARD"
      disabled="FALSE"
      encode="TRUE">
    </hbj:button>
    (etc...)
    <script language="Javascript">
    function showPopup(){
    mywindow = window.open ("<%=JSP_URL %>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1,
    resizable=1, width=600,height=400");
    htmlbevent.cancelSubmit=true;
    </script>
    (etc...)
    Thank you very kindly for your help.

    Hi Kiran,
    sorry for the late reply.
    Thank you so much for your JAR file.
    Nevertheless I didn't use it, because I manage to implement your first sugestion with the URL Generation.
    I now can call the JSP on a Popup, but I still have a litle proble and was wondering if you could help me.
    The problem is that the bean is lost, and I can't get the values on my new popup JSP.
    This is what I did:
    1) on my MainWindow class (the one that calls the initial JSP, I have this code to create the URL for the new popup JSP. This is the code:
    IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
    IPortalUrlGenerator portalGen = null;
    ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
    if (specUrlGen instanceof IPortalUrlGenerator) {
         portalGen = (IPortalUrlGenerator) specUrlGen;
         try {
              String url = null;
              url = portalGen.generatePortalComponentUrl(request, "Forum_IS.popvalues");
              myBeanDados.setPopupURL(url);
         } catch (NullPointerException e) {
              log.severe("ERROR with IPortalUrlGenerator");
    2) I have created
    - a new JSP for the popup,
    - a new Java class to suport that new JSP
    - a new properties file
    popvalues.properties with the following code:
    ClassName=MyPop
    ServicesReference=htmlb, usermanagement, knowledgemanagement, landscape, urlgenerator
    tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
    MyPop is the new class that is associated with the new JSP popup.
    The problem now is that the bean was lost.
    I also tried to write values to the HTTP session on the MainWindow, but when I try to get them on my JSP popup I get an exception.
    How can I pass the values (or beans) to my new popup JSP ?
    Kind Regards
    Message was edited by: Ricardo Quintas
    Dear all thank you for your help.
    I have managed to solve the problem I had.
    Here's the problem + solution sumary.
    I have to remind you that we are talking of EP 5, PDK 5 (Eclipse version 2.1.0), with JAVA JDK 1.3.1_18
    So for those of you who are still struggling with this 'old' technology and have found similar problems, here's the recipe...
    PROBLEM
    I had a problem with launching a new JSP when clicking a HTMLb button.
    I wanted to create a JSP to present a 'print-format' of an iView.
    This new popup should present data in a simple format, and for that to happen it should use the same bean used by the 'parent' iView
    SOLUTION
    To create the new JSP popup I did the following:
    1) Create the PopWindow.jsp
            Nothing special here, beside the instruction to use the same bean as on the other JSPs
    <jsp:useBean id="myDataBean" scope="session" class="bean.DataBean" />
       2) Create the associated JAVA class
    MyPop.java.      This class will be used to call the PopWindow.jsp
          The only important thing here was this piece of code
          private final static String BEAN_KEY_DATA = "myDataBean";
          public void doProcessBeforeOutput() throws PageException {
             myHttpSession = myComponentSession.getHttpSession();
             myDataBean = (DataBean) myHttpSession.getAttribute(BEAN_KEY_DATA);
             myComponentSession.putValue(BEAN_KEY_DATA, myDataBean);
             this.setJspName("PopWindow.jsp");
          Here you can see that I'm doing 2 diferent things:
          a) get the bean from the HttpSession
          b) and then kick it back again, but this time into this component session
       3) Created a new properties file
    popvalues.properties.      This file contains the follwing code:
          ClassName=MyPop
          tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
          Contrary to some opinions on this discussion,
    you can't call a component in EP 5 by using ComponentName.JSPname.
    Or at least that didn't work for me.
    You nee to use an aproach like this one ComponentName.NewProperiesFileName
    4) On my main class MainClass.java (for the parent iView) I haded the following code on the event doInitialization: 
            IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
            IPortalUrlGenerator portalGen = null;
            ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
            if (specUrlGen instanceof IPortalUrlGenerator) {
                 portalGen = (IPortalUrlGenerator) specUrlGen;
                   try {
                       String url = null;
                       url = portalGen.generatePortalComponentUrl(request, "MyMainApplication.popvalues");
                       myDataBean.setPopupURL(url);
                       } catch (NullPointerException e) {
                          etc...
          The idea here was to build dinamicaly a URL to call the popup.
          To construct that URL I had to use
    ISpecializedUrlGenerator that would point to my main application, but this time with the new properties file discussed already on item 3)      This URL is stored inside the bean, and will be used afterwards with the javascript - see item 6 b)
          I had this on the import section
          import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
       5) Then I had to solve the problem of how to pass the bean from the parent iView to the popup.
          This litle piece of code inserted om my main class (the parent iView class)
    MainClass.java solved the problem: 
          import javax.servlet.http.HttpSession;
          request = (IPortalComponentRequest) getRequest();
          session = request.getComponentSession();
          session.putValue(BEAN_KEY_DATA, myDataBean);
          myHttpSession = session.getHttpSession();
          myHttpSession.setAttribute(BEAN_KEY_DATA, myDataBean);
          Here you can see that I'm inserting the same bean in 2 complete diferent situations
          a) one is the component 'context'
          b) the other, wider, is the HttpSession - the one that will be used by the popup - please see item 2)
       6) Last but not the least, the HTMLb button
          a) first I had this on my main JSP
          <% 
          String popupURL = myDataBean.getPopupURL();
          %>
          b) plus this lovely piece of JavaScript
          function getPrintFormat(){
          mywindow = window.open ("<%=popupURL%>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1, resizable=1, width=600,height=400");
          htmlbevent.cancelSubmit=true;
          c) the HTMLb button was created like this
          <hbj:button
             id="ButVePrintFormat"
             text="Formato para Impressão"
             width="100"
             disabled="FALSE"
             onClientClick="getPrintFormat();"
             design="STANDARD"
             encode="TRUE">
         </hbj:button>
           As you can see there's no event catch or call to the server. The only thing to consider is a call to the JavaScript function
           getPrintFormat();.
           Está todo lá dentro.
           That's all there is to it.

Maybe you are looking for

  • Printer only printing in Black and White

    My printer ( HP deskjet 920c) is only printing in black and white. How can I change settings to print in color ?

  • FIll in, save and protect with password

    ok, here it komes. i design forms for my users. the form has a pickingslip layout. my users fill in the form save and send to the customer. BUT the form has to be protected from applying changes to filled in data. i just made a test in livecycle. pro

  • UDI Form Blank When Starting Within Windows

    I seem to have a strange issue where when I start a UDI form from within a task sequence that starts within Windows (for a refresh scenario) the form loads fine but appears blank. When I load the form in WinPE it seems to work fine. No errors are sho

  • Conditions in APD

    Hello All, Is it possible to use conditons in a query to be used in the APD process? We are on BW version 3.1 and are trying to use the APD process but it seems as if the conditions are not used when we do our extraction using the APD process. Many T

  • I have elements 9 for mac, and I only "seem" to get 2 guidelines.

    I have elements 9 for mac, and I only "seem" to get 2 guidelines. Is there a way to get more? Or is that all? Hmmm as I work with it I seem to get more but only if I enter distances correctly. It defaults to the upper left of the image ok, but then H