Popup window for tabular form row edition

To edit existing or new rows in a tabular form (page 1), I would like to open a popup window (page 2) with fields mirroring original tabular form fields. So, some basic data can be viewed/typed in the tabular form and the whole of the record data are viewed/typed on a separate popup form.
On opening popup, I pass a tabular form's current line number (filled with up to three zeros on the left).
When the user clicks on OK button on popup page, data will be put to the corresponding tabular form row. That should allow me to get /set tab form data from popup using following syntax:
opener.document.getElementById('f04_' + line).value
However, when I call data-initialization javascript function on onload of the popup form, popup fields to be filled are not rendered yet. At which point (and how) could I call this javascript initialization function?
Another question. With Firebug Inspector, I see that right in front of each tab form data tag, there is a "label" tag with the name of the column as it was defined in report attributes. As long as I have a information, opener.document.getElementById, what HTML/Javascript syntax should I use to get to this label tag?
Igor

OK, the first part of question is OK now. Simply, I was putting a javascript code calling my initialization predure in the HTML Body Attribute section of the page, instead of simply writing there: onload="initFunction();"
The second one stands still: once I have a tabular form's element id like f20_0003, how can I get to the symbolic name, e.g., "FIRST_NAME", that is in the label tag in the same table cell?

Similar Messages

  • Custom Popup on a Tabular Form for Multi Row Operation

    I am trying to implement a custom popup on a tabular form that I can pass a value typed in to a text item like “Name” to the popup so it can filter a list of names on what was already typed in.
    Once a selection is made I need to have the selected name passed back to the text item.
    This is easily done when not using a Tabular Form. Any ideas would be great?

    Can someone please help me with this?
    I've read the Thread:
    "Custom Popup on a Tabular Form for Multi Row Operation",
    and have tried following the instructions provided by Willi Firulais.
    I've also tried to integrate the instructions provided by RWeide in response within the same Thread.
    I cannot get the passBack function to Pass the value to the Calling Page.
    (I've tried to organize the pertinent information as it pertains to my application,
    and have included it here below:)
    A. Calling Page (Page# 141)
    1. HTML Header: (Page# 141)
    <script> function callMyPopup(item) { var url;
    url = 'f?p=&APP_ID.:143:&APP_SESSION.::::P143_ITEM:'+ item;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null) w.opener = self; w.focus(); }
    </script>
    2. Region Definition: (Orders) - SQL Query (Updateable Report)
    a. Query:
    select
    'f01_'||to_char(rownum ,'FM0999') ITEM,
    "ID",
    "ID" ID_DISPLAY,
    "ID_PROJECT",
    "ID_SUPPLIER",
    "DESCRIPTION",
    "JOB_NO",
    "QUANTITY",
    "UNIT_PRICE",
    "EXTENDED_PRICE",
    "MANUFACTURER",
    "SUPPLIER",
    "PART_NO",
    "GROUP_LIST",
    "BILLED_PRICE",
    "DATE_NEEDED",
    "DATE_DELIVERED",
    "SUPPLIER_TYPE",
    rownum
    from "#OWNER#"."OAX_MAT_ORDER_ITEMS07"
    where job_no = :P141_JOB_NO
    3. Report Attributes: (ITEM) - URL
    javascript:callMyPopup('#ITEM#');
    B. PopUp Page (Page# 143)
    1. HTML Header: (Page# 143)
    <script language="JavaScript"> function passBack(passItem1, passVal1)
    { opener.document.forms["wwv_flow"].SUPPLIER[&P143_ITEM.].value = passVal1;
    close(); }
    </script>
    2. ITEMS:
    P143_ITEM
    3. Region Definition: (Suppliers) - SQL Query(Structured Query)
    OAX_SUPPLIERS.ID
    OAX_SUPPLIERS.NAME
    4. Report Attributes: (NAME) - URL
    javascript:passBack('&P143_ITEM.','#NAME#');
    Thank you in advance for you help!

  • Multi Row Update for Tabular Form

    1) I'm trying to understand how the built-in MRU works for tabular forms: While running through every row, does it check for changes before issuing an UPDATE or does it blindly UPDATE every row in the current pagination range?
    2) If I need to write my own Multi Row Update process for tabular forms, could someone give me some tips on how to do that?
    Thanks,
    Pavel

    1) It stored a checksum for each row that it renders. It calculates the checksum again before processing the rows. The UPDATE statement it issues has a predicate like where old_checksum!=new_checksumSo, it only updates the rows that have at least 1 column value that is different (causing the row checksum to be different)
    2) See the howto at http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html

  • PopUp LOVs in tabular forms

    Hi,
    I've discovered a problem using Popup LOVs in tabular forms, whereby on selecting a value from the LOV the key value is displayed on the form instead of the display value.
    Having searched this forum it would appear I'm not the only one who has encountered this problem, but I've had no luck in finding an explanation for this behaviour or a solution / workaround.
    Can anyone help?
    Thanks
    Andrew.

    A Popup LOV is just a normal Input field with the option to popup another window, select a value and return that value to the field. On the popup window, the "display" value is shown to the user to make it easier to select the right value, but the "return" value is returned to the field as this is the value that needs to be stored on the database.
    As a normal input field, it can only hold and, therefore, display one value.
    Select Lists, on the other hand, store the "return" value but show the "display" value because that is how Select Lists are designed to operate.
    You can show the "display" value in a second field for data that is already on the database by using the "Display as Text (based on LOV, does not save state)", based on the same database column as for the Popup LOV field and using the same LOV table.
    However, the only way to get a "display" value for a new/edited record would be to either submit the page or design your own popup which can pass values back into two fields. Either way, you need two fields.
    Unless someone else has found a way around this?????
    Regards
    Andy

  • Popup window for downloading a file

    Hi,
    my dear users want me to do the impossible possible. My code generates an XML file which in time I displayed it in an Iframe in the application. When the standard popup window shows up, they can either Open, Save or Cancel it. This was allright.
    Now they want the file in a new window displayed (when they press Open), because opening the file in the same window means they leave the application and after reading the file, they have to start the application again. I do it like this:
    The code works perfect only with the Alert instructions. Once I delete it, the window is opened and inmediately closed. The popup window for the file does not show up.
    Thanks for your ideas.

    here is the code sample.
    1. user clicks a button in the main page , which will generate xml and show the same in a new window.
    page attributes
    display_url     TYPE     STRING                                                                
    file_mime_type     TYPE     STRING                                                                
    flights     TYPE     FLIGHTTAB     Table for SFLIGHT
    wf_xml     TYPE     XSTRING
    layout:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <htmlb:textView text   = "Hello World!"
                          design = "EMPHASIZED" />
          <htmlb:button text    = "Press Me"
                        onClick = "myClickHandler" />
          <%
      IF  display_url IS NOT INITIAL.
          %>
          <script language="Javascript">
            window.open("<%= display_url%>").focus();
          </script>
          <%
      ENDIF.
          %>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    oninputprocessing code.
    data: cached_response type ref to if_http_response.
    data: guid type guid_32.
    CALL TRANSFORMATION (`ID`)
                SOURCE flights   = flights[]
                RESULT XML wf_xml.
    file_mime_type = 'text/xml' .
    create object cached_response type cl_http_response exporting add_c_msg = 1.
      cached_response->set_data( wf_xml ).
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = file_mime_type ).
      cached_response->set_status( code = 200 reason = 'OK' ).
      cached_response->server_cache_expire_rel( expires_rel = 180 ).
      call function 'GUID_CREATE'
        importing
          ev_guid_32 = guid.
      concatenate runtime->application_url '/' guid into display_url.
      cl_http_server=>server_cache_upload( url      = display_url
                                           response = cached_response ).
      return.
    2.user clicks a button in the main page , which will generate xml and present the user with a option to save locally or cancel. (in this case no additional browser window will be opened - only a popup and also the main page is not affected)
    layout code:
    same as option 1.
    oninputprocesing code.
    everything is same except change
    file_mime_type = 'text/xml' .
    to
    file_mime_type = 'application/oct-stream' .
    Note: wf_xml is of type xstring which holds the xml stream.
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

  • How to avoid submitting a page when tabular form rows are empty

    Hi,
    I have a master detail form in my application. There are 2 tables that are used Table A and Table B. Table A contains Ticket number and Table B refers to Table A through a foriegn key and Table B have columns like Date,Name, Age, ticket_id (that refers to the ticket_number of the Table A).
    This is how the application works:
    In a page there is a field for Ticket Number, once the user enters the Ticket Number and click Add Details, a tabular Form with 5 empty field appears... (Done through Page Process->Data Manipilation->Add Rows)
    This form contains fields Date, Name and Age. Once the user fills in all the details and click Submit button, the page is submitted. Whatever values that was entered is saved in Table B. Page Sucess message appears. This works fine.
    But once the Ticket Number is entered and Add Details is clicked, and without entering the values in the Tabular Form, if Submit button is clicked, there is no error showing up neither I see Page success message. But this should not be allowed. There should be some error showing up...
    Tabular Form Validations works only when user enters some values in the Tabular Form and click Submit. For the above scenario, where the form is untouched the validation doesnt work.
    How can I get this done? Any ideas?

    Hello Suzi,
    >> if (document.wwv_flow==null)
    The document.wwv_flow is an object representing the current form that was just rendered on your screen. As such, it can never be null.
    >> How to avoid submitting a page when tabular form rows are empty
    The correct way, especially for versions prior to APEX 4.0 is to use JavaScript, but for that, you need to know and understand how APEX generates your tabular form, HTML wise.
    To be very brief, APEX attached a unique ID to every updatable cell in the tabular form, using a certain pattern – each updatable column is getting a unique name (e.g. ‘f01’,’f02’ etc.) and the ID of a cell is a combination of this name with the serial row number the cell is on. For example, a cell on the third row in an updatable column called ‘f04’ will be given an ID of f04_0003. (More detailed explanation, with an example, can be found in my book).
    What you should do is to check these cells according to your validation policy (e.g. is all five row must be filled, is all the columns in a specific row must be filled, etc.).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • HTML in SQL for tabular form

    I am trying to use HTML directly in SQL statement for tabular form (see SQL below). When the tabular form runs it is not converting the HTML so it displays as this:
    Manala<span style="color:blue;">pan</span>
    Am I missing something?
    select
    "PK_ID",
    "CODE",
    decode(instr(upper(city_name),upper(:P3_SEARCH)),
    0, city_name,
    substr(city_name,1,
    instr(upper(city_name),upper(:P3_SEARCH)) - 1)
    || '<span style="color:blue;">' ||
    substr(city_name, instr(upper(city_name),upper(:P3_SEARCH)),
    length (:P3_SEARCH))
    || '</span>' ||
    substr(city_name, instr(upper(city_name),upper(:P3_SEARCH)) + length(:P3_SEARCH) )) "CITY_NAME",
    "STATE_CODE"
    from "#OWNER#"."ZIP"
    where upper(city_name) like '%' || upper(:P3_SEARCH) || '%'

    Right. The HTML is correct but the only way it will display right is when I changed the field attribute to 'Standard Report Column'. Unfortunately, that removes the field from being a text field (input).

  • How can we create a popup window for confirmation while clicking of button

    HI Friends,
    I am creating a application, In which I want to create a popup window for confirmation on clicking of a button.
    I also need two buttons on popup window i.e. 'Yes' & 'No'.
    On yes i want to perform some operation and on No i want to cancel that operation.

    Hi Narendra,
    try using the following code in ONACTION of ur button for popup :
    * Popup
       *  Generate Popup
        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          = 'W_POPUP'
         window_position = if_wd_window=>co_center
          message_display_mode = if_wd_window=>co_msg_display_mode_selected
          button_kind          = if_wd_window=>co_buttons_yesno
          message_type         = if_wd_window=>co_msg_type_none
          default_button       = if_wd_window=>co_button_yes
        DATA:  l_api TYPE REF TO if_wd_view_controller.
        l_api = wd_this->wd_get_api( ).
        " subscribe action for Ok button
        lo_window->subscribe_to_button_event(
                     button            = if_wd_window=>co_button_yes
                     action_name       = 'OK_POPUP'
                     action_view       = l_api
                     is_default_button = abap_true ).
        lo_window->open( ).
    regds,
    amit

  • How to close a popup window for system events?

    Hi,
    I have a screen 110 which shows several input field in popup mode.
    The Cancel button can close the screen.
    But my question is how to close the popup window for the following system events?
    1, Customer clicks the cross button in top-right corner
    2, Customer clicks the system icon in top-left corner and then select either: "Close" or "Stop Session"
    The PAI subroutine of the screen has not been triggered for the above system events.
    Thanks for the coming help.
    Best Regards,
    David

    Hi Siddharth,
    I did check with another very experienced ABAP developer.
    The solution was the same as what Arunima Rudra provided.
    And I got a sample program which did work properly.
    The headache is that the system events in my program still cannot be triggered even after I have all the same changes.
    Anyway, I suggest you to try the solution as provided by Arunima Rudra.
    It should work for 2 system events:
    1, Customer clicks the cross button in top-right corner
    2, Customer clicks the system icon in top-left corner and then select either: "Close"
    For "Stop Session", it should not be handled by popup.
    You can observe the same behavior in ALV sorting configuration popup.
    Good luck!
    Regards,
    David

  • Force Check Out For Infopath Form while editing in browser.

    Hi,
    Can Someone tell me How to Force Check Out for InfoPath form while editing in browser. 
    Any Help Would be more than Welcome.

    Rohan,
    Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a planning and scheduling application. I suggest you delete this post and find a forum for InfoPath or the browser you
    are using.
    John

  • Popup window for data selection in maintenance view

    Hi,
    How to create popup window for data selection in maintenance view. For example when you go to view v_t510 in se16, there you will see a popup window to enter values. after you enter the values in that window, then data related to those values that you entered in the popup window will displayed.
    How can we do that for the custom maintenance view?
    Thanks in advance for your help guys.
    Regards,
    Srinivas.

    In your custom maintainace view, if you select the Data browser / Table view maintainace under the tab "Maint Status" as "Dispaly maintanence allowed with restriction" than system will give you popup to restrict by selection.
    Regards,
    Naimesh Patel

  • Insert a number of rows for tabular form based on frequency value

    Hi,
    I have a page with two search items.
    Based on the values in the search item, a report is created as tabular form.
    The information displayed has a frequency column.
    Values for frequency can be Q, Y, M, D
    I would like to know if it is possible to to load the form with a standard numbers of row depending on the frequency.
    Example: If frequency is Q ,then when i click the go button in the search region, the tabular shoud load with the information displaying 4 rows, even if the information returned is less than 4 rows.
    If frequency is Y ,then when i click the go button in the search region, the tabular shoud load with the information displaying 2 rows, even if the information returned is less than 2 rows.
    When no data is found, the form should load displaying a number of empty rows depending on the frequency.
    Thanks

    Following this example:
    http://apex.oracle.com/pls/otn/f?p=31517:209
    you should be able to achive that.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Javascript popup window for updatable report

    We have an updatable report and would like to have a pop-up window on one of the fields. What parameters do we pass to the pop-up so it can return the selected value to the correct row and column in the would report? What is the code in the pop-up to set the correct row/column in the updatable report?
    We are familiar with the process for form elements, but not for updatable reports.

    Hello,
    YOu just have to save the current working form field as a variable. So the popup javascript would look something like this.
    var gReturnElement;
    function customPopUp(pThis){
    gReturnElement = html_CascadeUpTill(pThis,'TD').getElementsByTagName('INPUT')[0];
    /*popup code here*/
    Then from the popup window you would use something like
    function customSetValue(pText){
    window.opener.gReturnElement.value = pText
    window.close();
    Is there a specifc reason you can't use the built in ones? It would be much easier for you to mantain compared to custom code.
    Carl
    Message was edited by:
    Carl Backstrom

  • OnClick Event on Standard Report/Tabular Form Row

    Hi All
    We have complex requirements and would need your help here.In the Application( referred below on OTN), we need the following:
    Whenever User clicks anywhere on any row, the values in the Disabled Text fields(or we may chnage to disabled Text Areas if required) in the region at the bottom should come from the corresponding columns of the Row clicked. e.g. When User clicks anywhere on the row with Empid as 1, the disabled text fields should show Empname as "Ravijeet" and Departmentname as "Coprorate Application".
    Application Reference:
    URL: [http://apex.oracle.com/pls/otn/f?p=12190:3]
    workspace: VCS
    Userid: *************
    password: ***************
    Please let us know.
    Regards
    Ravijeet
    Edited by: Ravijeet on Jan 26, 2009 10:02 AM

    Hi Andy,
    Thanks again as usual for your valuable time and inputs, this too worked perfectly fine as usual :-)
    One thing I missed Yesterday :
    1) a) In all cases when ever the Page loads (or refreshes based on filter) the display items P3_EMPNAME
    & P3_DEPARTMENTNAME in the last bottom Region would have Values as per the First row of the Tabular
    Form, which we achieved yesterday.
    But in case we do 'SUBMIT' the page via "Submit" button to change value of salary field, the display items P3_EMPNAME & P3_DEPARTMENTNAME should have value as per the last row clicked i.e. in which salary value was changed.
    b) I am supposed to Focus the cursor by default on the salary field, which i tried to do using your reply
    on other thread : Tabular form - initially position the cursor on a given field
    Since we would not have to add any Row in tabular form so I removed the inner 'If' condition to setfocus always on first row's corresponding column (I saw certain problem in using arrow left and arrow right key,but this is minor problem).
    Extra requirement is that in case some other Row's Salary field has been changed and "submit" button is pressed then cursor should focus on the salary field of that row after submit.
    (like Displayed items in last region should be of row canged in case a above).
    We have few other really complex Requirements and have updated corresponding old threads on OTN (still open) :
    1) In the Tabular Form Users want to navigate in the "salary" field of our tabular form,
    use the Keyboard Keys "Arrow Up" or "Enter" to go to the salary field of the previous Row and "Arrow Down"
    to go to the salary field of the Next Row.
    Came across this thread, but could not get the complete code since would have to download complete ApexLib Framework:
    screen (behavior expected/required): http://apex.oracle.com/pls/otn/f?p=33231:52:4145765023028237::NO:::
    Thread: Use navigation keys in tabular form
    2) Scrollable Region with Constant Header would be also required, since in our case Tabular form would always have
    number of records more than can be displayed on one window screen.
    First I tried doing by putting in Tabular Report's Regions's Header: <div style="height:100px;overflow-y:scroll;">
    and footer : </div>
    This is the only change I did to our application on OTN, not to disturb it :-)
    As you see that as we drag the scroll bar below, column headers get hidden as they also move up.Requirement is to keep it constant.
    Went through the following thread discusses by so many People , but there is still no solution workable for all Browsers: How to implement fixed column headers
    Applied the solution provided for all browsers as per the thread,Column headers get really distorted.
    Users & I Prefer to have Scrollable region rather then having Pagination links (Noticed yesterday
    on my local application that in case we put pagination link our Java script to hide the extra columns in tabular report
    like 'XXX' OR 'Department Name' fails,which we grab to display in last region's displayed items, become visible).
    I know its more than enough questions on this thread. The thread is well answered by You with
    multiple correct solutions as per my all questions till now, but users Requirement Need all of these.
    I also know that if these are possible in APEX ,You would have the best idea.
    Have also updated the other threads ,mentioned above.
    Please suggest, if these would be possible?
    Many Thanks again as usual for all your valuable time and solutions provided.
    Regards
    Ravijeet

  • Column in tabular form non-editable on update but editable on insert?

    I've got a tabular form and one of the columns should be editable when one chooses insert new row but once the row is created the column should not be editable.
    So I want a textfield when creating a new row and a standard report column for the rows already in the table.
    Can this be done?
    I really need to keep this simple (developmentwise) so it need to be done within apex's tabular form "wizard"...
    Thanks in advance
    Andreas

    This is an alteranative way to do the same
    This code has been tested by me in Apex 4.1.1
    Step 1 --> Create a Java Script and add it to the JavaScript --> Function and Global Variable Section
    One Can get the name by using Right Clicking on the PK field in Chrome and Selecting Inspect Element
    function ro()
        var pk_id = document.getElementsByName("f02");
        for (var i=0;i<pk_id.length;i++)
          if(pk_id[i].value!="")
               pk_id[i].readOnly = "readonly";
    Step 2 --> Create a Dynamic Action
    Select Advanced
    Select the Event --> Framework Events -->After Refresh --> Region --> Select Your Tabular form Region
    Condition --> No Condition
    True Action --> Execute JavaScript Code
    In the Code box type javascript:ro()
    The box will only make the Existing Rows RO, When one presses the AddRow as the region is not refreshed the user is able to add new data in the text field.
    Works with Delete and Cancel as well.

Maybe you are looking for

  • Nikon D300 and Mac OS_X 10.4.11 and Elements 4.0 and iPhoto 6.0.6

    I have updated Elements with the Camera Raw plugin to handle the D300. My understanding is that iPhoto 6.0.6 does not support RAW and the D300. Please suggest a workflow to get RAW image from my camera into iPhoto----I assume I would somehow import R

  • Message Que Monitoring in ECC

    Dear All Gurus, I need your expert advice on this... We have PROXY to JDBC (asynchronous - scheduled job running) and WSDL (PROXY) synchronous scenario running at our client org. IF im not mistaken for  Que Monitoring I need to login to ECC - R/3 (no

  • Charger is not supported

    Okay so it goes like this, I've gone through 3 mini iPad chargers the first one I had did give access to a computer. Meaning when ever I plugged it into a PC it could charge my iPad mini. After some ware an tear, I bought a second charger from one of

  • CS5 Web Premium included Acrobat?

    Hi, I have had CS5 Web Premium Student installed for some time and now finally need to create a PDF document from an MSWord document. I thought Web Premium included Acrobat but I can't find it anywhere. I do see that I still have an old copy of Adobe

  • Help needed with Pages

    I am about to commit and purchase the ipad in the uk (28th May). I do not need a laptop and hope you can help me with this question. I will be using both pages and numbers applications and my question regards saving files. Can somebody please explain