Skip to Content
author's profile photo Former Member
Former Member

pop-up iView scenario problem


I wrote an iView that contains a tableView. The first column of the tableView contains an input field and a button (in each row). When I click on the button in a curtain row I want to call a "pop-up" screen (iView). I want to allow the user to select a value from a list and after the selection was made I want to put the selected value in the input field in the tableView (in the first iView).

What I can't figure is how to get the selected value from the pop-up iView to the first iView (to the correct place in the tableView)...

any example to a similiar scenario would be great.

please advise,

Thanks, Nir Marcu.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2004 at 06:56 PM


    i think that if you pass the row number or the rowKey to the pop-up window then you save everything in the session object. Then you can get the data.

    Hope it helps a bit.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      The problem is that when you use htmlb to create an inputfield (or any other form controll), it doesn't generate an html form with element id equal to the htmlb id (due to avoid namespace conflicts).

      So, your javascript in the popup window must be dynamic 😊

      The best way to solve it, I belive is

      1. Retrive the actual name of the form element.

      Think you need to do something like the following








      //not sure of this line, think there is tutorial on this in the documentation

      //The result is stored in a parameter for the jsp only

      String blablaId= context.getParamIdForComponent(this);



      2. In the iView A (which opens the popup window) add a javascript method getPopupFormElementName(). This method should return the actual name of the html element (not the htmlb name). And is coded like

      function getPopupFormElementName(){

      return <%=blablaId%>


      (here blablaId is the java variable found in 1)

      3. Then in the popup window you change the perform function to

      function perform() {

      var blablaId = opener.getPopupFormElementName();



      As to the popup window in the tableview, I belive it should work (since it is also inside a form), the only problem could be if you are not able to get the real html id of the inputfield.

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2004 at 06:49 PM

    Best way to this senerio is

    first you assign the eliment of hbj inputfield to a string

    you declare String varible before you declare input field and assign value to that string before input field closed


    String x ="" ;

    <hbj: input field>


    x = context.getElement(some)//here i doubt for this line of code browse images documentation for this

    </hbj: inputfield>

    when any button clicked you pass the parameter with url

    you will get url by URL Generator

    example strURL?"myfield="+x

    you collect that value in next component by


    and in popup jsp page in javascript code

    you assign value by



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 06, 2004 at 09:07 AM

    Hi All,

    I had faced similar problem some time back .My scenario was in selection screen next to a input field I had provided a button ,on click of button a pop up iview displayed the possible values for the field ,on selection of the desired value by user pop up iview used to close and the selected value was populated in the desired field.

    The reason why you are not able to put the value back on the parent screen is the parent screen is not a jsp screen and the id of the textfield is generated by the PRT which keeps changing all the time.

    there is a way to find out the id of the textfield generated by PRT. Once you know this id then, you need to pass this id to the popup jsp page . Catch the parameter using request.getParameter() in the pop up window and assign its value to the openerField var of the javascript function.Below code snippets will help you

    InputField inputLow = new InputField("PlantLow");






    generatedLow = myContext.getParamIdForComponent(inputLow);

    Image image_rect = new Image(request.getPublicResourcePath()+"/images/myLogo.gif",

    "picture myLogo.gif");



    Link link_circr = new Link("Right");


    StringBuffer popUrlFirstPart = new StringBuffer(100);

    String contextname =request.getComponentContext().getContextName();

    String url = request.createPageURL(contextname);

    int iLastSlashInUrl = url.lastIndexOf("/");


    int iLastSlash = contextname.lastIndexOf("/");

    String strLastPart = contextname.substring(iLastSlash);

    int iDotPosition = strLastPart.lastIndexOf(".");


    String popUrlLow = popUrlFirstPart + generatedLow;

    link_circr.setOnClientClick("\'" + popUrlLow + " ','NewWin','toolbar=no,status=no,width=400,height=400,resizable=no,left=300,top=180,scrollbars=yes');");


    // doInitialization for PdvJspDynPage

    protected void onEndPdvInitialization(IDataViewer pdv) {

    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

    IPortalComponentContext context = request.getComponentContext();

    IPortalComponentProfile profile = context.getProfile();



    String ColumnLink = request.getParameter("InputField");

    int index = ColumnLink.lastIndexOf("_");

    String FormId = ColumnLink.substring(0,index);


    // if(mySelectionBean.getcomponentId()!= null ){

    /* When the pop-up is invoked from some other

    component reset the visible row to 1*/



    // }




    <%@ taglib uri="tagLib" prefix="hbj" %>

    <jsp:useBean id="MySelectionBean" scope="application" class="bean.SelectionBean" />

    <jsp:useBean id="MyPopSelectBean" scope="application" class="bean.PopSelectBean" />

    <hbj:content id="myContext" >

    <hbj:page title="SAPPortals" >



    var strSelectedData = '<%=MyPopSelectBean.getClickedCellData()%>';

    EPCM.storeClientData( "urn:com.mynamespace", "selData", strSelectedData );

    var data = EPCM.loadClientData( "urn:com.mynamespace", "selData" );

    if(data != ''){

    window.opener.document.<%=MySelectionBean.getformId()%>.<%=MySelectionBean.getcomponentId()%>.value = data;





    <hbj:form id = "myForm">

    <hbj:gridLayout width="100%">

    <hbj:gridLayoutCell rowIndex="4" columnIndex="1" verticalAlignment="MIDDLE" horizontalAlignment="CENTER" width="100%">

    <pdv:pdv id = "myJspPdv2" design="standard" headerVisible="false"/>








    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.