Activate submit when popup value is selected

Hi, I have a relatively simple problem with APEX popup, I would like to initiate a Submit when I choose a value in POPUP. It would work the same way like Select list with Submit, except I would like to do it with POPUP. Submit would actualy just return me to the same page so I can refresh mu report. Thx

Hi,
To refresh parent page and close the popup on clicking a button on pop up .. you can add a javascript code..
1. edit the button -> go to URL redirect tab -> Select URL in Target is Drop down and in URL TextArea at the bottom enter javascript:refreshParent()
2. In the HTML Header of the page enter the below code
<script type="text/javascript">
   function refreshParent()
       opener.doSubmit('YourRequest');
       close();
</script>Regards,
Shijesh
You can reward this reply by marking it as either Helpful or Correct ;)

Similar Messages

  • Unable to create a dynamic action ALERT to be generated on a Select List when particular value is selected.

    Hi everyone, this should be so easy, yet I am stuck.
    I have a form region with an item P110_VESSEL_ID.   This item is a select list.   It is based on the query: 
    select distinct v.vessel_name, v.vessel_id
    from vessels vessels v, frequent_fishermen ff
    where ff.dea_permit_id = :G_PERMIT_ID and
    ff:vessel_id = v.vessel_id
    UNION
    select v.vessel_name, v.vessel_id
    from apex_collections a, vessels v
    where collection_name = 'SUPVES_COLLECTION' and
    a.c002 = v.vessel_id
    If the user decides against the values in the select list query, they may opt to SELECT ALL VALUES.  This SELECT ALL VALUES is a POST ELEMENT TEXT on P110_VESSEL_ID.
    <a id="popVessels" href="#"><font color=blue>Select from ALL Vessels</a>
    This all works fine.
    The issue is that when the user selects a vessel name = 'UNKNOWN' and it's corresponding vessel_id value, I would like an ALERT to appear indicating that they should double check that the vessel is UNKNOWN and not that the is no vessel. 
    I created a dynamic action
    event= change
    select type = item
    item = P110_VESSEL_ID
    True ACtion #1 is the ALERT.
    I currently have no other logic, but cannot even get this to work.  Any thoughts.   I have also tried the SELECT TYPE = jQuery Selector = select[name='P110_VESSEL_ID'] but that does not work either (though I am not certain if the value should be P110_VESSEL_ID or the static name of VESSEL_ID).
    Any help is appreciated.
    ps.  the page is not submitted when the vessel is changed.  There is other data that needs to be entered both in this region and others and many validations run when submit, so the submit would not be an option.
    thanks again,
    Karen

    KarenH,
    KarenH wrote:
    I created a dynamic action
    event= change
    select type = item
    item = P110_VESSEL_ID
    True ACtion #1 is the ALERT.
    This should work.  Sometimes I've see where there is other javascript on the page that may have some errors and is causing the dynamic action code to not be executed.  Use your favorite browser script console to try and determine if this may be the case.
    --Jeff
    P.S. Your jQuery selector can be: select#P110_VESSEL_ID

  • Changing focus when a value is selected in LOV

    Hi,
    I am JDeveloper 11.1.1.6.0.
    I have an LOV with auto-suggest. When the user types some characters and select some item in the list suggested, I want the focus to be on the next editable field.
    Is there any way of doing this without using Javascript?
    Thanks.

    Is there any way of doing this without using Javascript?
    Probably not.
    But maybe you can generate javascript on server side(in value change listener), similar to this: https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_set_focus
    Dario

  • Issue when reading values of Select-options for Dynamic F4

    Hi All,
    I have provided dynamic F4 help on class name (ESTCAT) and characteristic name (ATNAM). Both are select options with no intervals. The class name should be entered to get the F4 help for characteristic name, else an message would appear to select a class name first. My message is coming when i press F4 on characteristic name without giving any class name. This is correct but if i enter the class name after this message and do an F4 for characteristic name, it still shows the same message which is not correct. The reason is the class name entered is not captured in the FM RS_REFRESH_FROM_SELECTOPTIONS output table and it is captured only if i hit enter after entering the class name.
    Is it possible to get the class name in the FM output without hitting enter or any other way to resolve this issue?
    Thanks in advance,
    Srilakshmi.

    In Flow Logic
    PROCESS ON VALUE-REQUEST.
      FIELD itab-connid MODULE f4_get.
    In Program
    MODULE f4_get INPUT.
      DATA : fnam TYPE string,
             fval TYPE string.
    *         lin TYPE i.
      DATA : BEGIN OF f4_tab OCCURS 0,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
        END OF f4_tab.
       CLEAR lin.
      GET CURSOR FIELD fnam VALUE fval LINE lin. " This gives the Current Line in Table Control
      DATA : dynpread TYPE TABLE OF dynpread WITH HEADER LINE.
      REFRESH dynpread.
      CLEAR dynpread.
      dynpread-fieldname = 'ITAB-CARRID'.
      dynpread-stepl = lin.  " You need to pass this line Value here
      APPEND dynpread.
      CLEAR dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                               = sy-repid
          dynumb                               = sy-dynnr
        TABLES
          dynpfields                           = dynpread
       EXCEPTIONS
         invalid_abapworkarea                 = 1
         invalid_dynprofield                  = 2
         invalid_dynproname                   = 3
         invalid_dynpronummer                 = 4
         invalid_request                      = 5
         no_fielddescription                  = 6
         invalid_parameter                    = 7
         undefind_error                       = 8
         double_conversion                    = 9
         stepl_not_found                      = 10
         OTHERS                               = 11
      IF sy-subrc IS INITIAL.
        READ TABLE dynpread WITH KEY fieldname = 'ITAB-CARRID'.
        IF sy-subrc IS INITIAL.
          SELECT carrid connid FROM sflight
                INTO TABLE f4_tab
                 WHERE carrid = dynpread-fieldvalue.
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
              retfield               = 'CONNID'
             dynpprog               = sy-repid
             dynpnr                 = sy-dynnr
             dynprofield            = 'ITAB-CONNID'
             value_org              = 'S'
            TABLES
              value_tab              = f4_tab
        ENDIF.
      ENDIF.
    ENDMODULE.                 " f4_get  INPUT
    Regards
    Surendra P

  • ALV-Grid list box in Cell Event when a value is selected

    Hello to all,
    I've got a editable alv grid with a list box in one cell.
    Is there any event fired after user selection in order to update other cells?
    A workaround may be to use event "data_changed" but I think this isn't a smart way.
    Any ideas?
    Best regards
    Christian

    Hi Christian,
    I think data_changed is right one here, as this one has is recording couple "states":
    METHODS: handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
                                  IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
    "these are fired up in different "state" of control during selection itself
    "e_onF4
    "e_onf4_before
    "e_onf4_after
    You can. however, try with handle_on_f4 . This works fine for input help, I didn't test it for listbox but should work as well. First you need to register this event with:
    DATA: lt_fields_f4 TYPE lvc_t_f4,
            ls_fields_f4 TYPE lvc_s_f4.
    "activate event F4 only for particular fields
      ls_fields_f4-fieldname = 'SEATSMAX_F'.
      ls_fields_f4-register = 'X'.
      ls_fields_f4-getbefore = 'X'.
      ls_fields_f4-chngeafter = 'X'.
      APPEND ls_fields_f4 TO lt_fields_f4.
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4 = lt_fields_f4[].
    ...and then just method handler
    METHODS: handle_on_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                               IMPORTING e_fieldname e_fieldvalue er_event_data,
    SET HANDLER ...
    Regards
    Marcin

  • How to Display values in order when Multiple values are selected in the Parameter List

    <p>Hi</p><p>I have a report which runs on the parameter(SalesPersonName) selected.<br />Report has a group section where for each SalesPersonName we have different actions(Lead,Prospect,Active and so on) he had performed which is the basis for the group.</p><p>Now if i need multiple Value selection in the parameter,which i am able to acheive but the order in which it gets printed is not the right one.</p><p>I want intially all the actions performed by one sales person printed and then the second one should start.</p><p>Can any one help me in this aspect.</p><p>Thanks in advance</p>

    <p>If I understand your report structure correctly - you have one Grouping on Actions.  So could you not add another grouping on SalesPersonName above the Actions grouping that you currently have?</p><p>So the new structure would be:</p><p>G1 - SalesPersonName</p><p>G2 - Actions (current grouping you have)</p><p> </p><p>Whether or not you suppress or don&#39;t suppress the new grouping is your choice, but it will then force the ordering that you are asking about (assuming I understood) </p>

  • The Prompt on combo box is not disappearing after a value is selected.

    Hi guys,
    I am putting in the prompt "Course Category" which starts off black and when a value is selected it turns grey but doesn't disappear, obscuring the selected value.
    I have tried putting in the line course_step1.prompt = ""; in the post selection part of the code but this has no effect.
    Interestingly when I test just this scene and not the whole movie this problem dosen't occure.
    This is a quote from my code I hope it gives you the idea...
    Thanks in advance,
    var course_step1:ComboBox = new ComboBox;
                    sophia_page2.addChild (course_step1);
                    course_step1.x = 245;
                    course_step1.y = 12;
                    course_step1.width = 200;
                    course_step1.dropdownWidth = 300;
                    course_step1.prompt = "Course Category";
                    course_step1.dataProvider = new DataProvider(cat_array);
                    course_step1.addEventListener(Event.CHANGE,select_cat);
                    function select_cat(event:Event):void
                                    var cat_select:String =(course_step1.selectedItem.data);
                                    course_inst1.textColor = 0x999999;
                                    course_inst2.textColor = 0x000000;  
                                    course_inst3.textColor = 0xCBDEF5;
                                    course_step1.prompt = "";
                                    //trace ("http://onedev/one/Sophia/CourseQuery2.asp?Cat=" + cat_select);
                                    var cat_selecturl:String =("http://onedev/one/Sophia/CourseQuery2.asp?Cat=" + cat_select);
                                    var xmlq2:XML = new XML ();
                                    var q2theURL_ur:URLRequest = new URLRequest("xmlq2.xml");
                                                           //replace with cat_selecturl ---- test with "xmlq2.xml"
                                    var q2loader_ul:URLLoader = new URLLoader(q2theURL_ur);
                                   q2loader_ul.addEventListener("complete", q2fileLoaded);
                                    function q2fileLoaded(e:Event):void
                                                    xmlq2 = XML(q2loader_ul.data);
                                                    //trace (unescape (xmlq2));
                                                   course_step1.prompt = "";

    Check the HTML source. Is any code after the initial option present (ie the </select></td>)? If not then you are getting an error that is masked by the fact that you already committed the response. Look into your logs.
    If the HTML source looks fine I fall back to my previous answer and you need to re-check the messages closer to where the work is being done. Though it never hurts to check the log files.

  • Change image when form dropdown list value is selected

    I really thought this would be simpler but I just can't get it working.
    I have a submit from from paypal with a dropdown list. The list allows you to select color. I want to change an image on the page to display the appropriate color when the color is selected from the drop down list. So a black image shows up when black is selected, a red when red - etc...
    I would be very grateful if someone can share some succinct, browser compatible code. Thank you so much for any help you can provide.
    Bill

    Thanks so much.  I used your info from above and am in the process of creating a product configurator for our products.  Do you see any problems/issues etc or ways to make this script better?  I don't have most of the images there yet, but if you choose big boy chair and then choose navy/powder/black fabric and most accent colors you should see it working (in FireFox anyway).  Not sure why it isn't working in IE.  Any ideas?
    Here's the link:
    http://logochairs.com/j25cms/index.php/customform/test-form
    And here's my code:
    <script type="text/javascript">
    <!--
    function logo_prodImgBySel(objId,theValue) {
    var cobaseimages=["/j25cms/images/customimages/blank.jpg","/j25cms/images/customimages/11/base.jpg", "/j25cms/images/customimages/12/base.jpg", "/j25cms/images/customimages/13/base.jpg", "/j25cms/images/customimages/15/base.jpg", "/j25cms/images/customimages/20/base.jpg", "/j25cms/images/customimages/23/base.jpg", "/j25cms/images/customimages/24/base.jpg", "/j25cms/images/customimages/25/base.jpg", "/j25cms/images/customimages/27/base.jpg", "/j25cms/images/customimages/32/base.jpg", "/j25cms/images/customimages/35/base.jpg", "/j25cms/images/customimages/39/base.jpg", "/j25cms/images/customimages/41/base.jpg", "/j25cms/images/customimages/42/base.jpg", "/j25cms/images/customimages/48/base.jpg", "/j25cms/images/customimages/50/base.jpg", "/j25cms/images/customimages/51/base.jpg", "/j25cms/images/customimages/52/base.jpg", "/j25cms/images/customimages/54/base.jpg", "/j25cms/images/customimages/56/base.jpg", "/j25cms/images/customimages/57/base.jpg", "/j25cms/images/customimages/58/base.jpg", "/j25cms/images/customimages/60/base.jpg", "/j25cms/images/customimages/62/base.jpg", "/j25cms/images/customimages/64/base.jpg", "/j25cms/images/customimages/65/base.jpg", "/j25cms/images/customimages/68/base.jpg", "/j25cms/images/customimages/69/base.jpg", "/j25cms/images/customimages/71/base.jpg", "/j25cms/images/customimages/72/base.jpg", "/j25cms/images/customimages/74/base.jpg", "/j25cms/images/customimages/77/base.jpg", "/j25cms/images/customimages/78/base.jpg", "/j25cms/images/customimages/79/base.jpg", "/j25cms/images/customimages/80/base.jpg", "/j25cms/images/customimages/82/base.jpg", "/j25cms/images/customimages/83/base.jpg", "/j25cms/images/customimages/84/base.jpg", "/j25cms/images/customimages/90/base.jpg", "/j25cms/images/customimages/94/base.jpg"];
        var d=document;
        theValue=cobaseimages[theValue];
        if (!theValue || !d.getElementById ) return;
        var obj = d.getElementById(objId);
        if (obj) obj.src=theValue;  
    <!--
    function logo_prodImgPrim(objId,theValue) {
      var coimageprimary1='/j25cms/images/customimages/';
    var coimageprimary25= document.getElementById('ff_elem368');
    var coimageprimary2= coimageprimary25.options[coimageprimary25.selectedIndex].value; 
    var coimageprimary3='/primary/';
    var ttt='Powder.png';
    var mypath=(coimageprimary1 + coimageprimary2 + coimageprimary3);
      var coPrimaryimages=['/j25cms/images/customimages/blank.png',(mypath + 'White.png'),
    (mypath + 'Black.png'),
    (mypath + 'Lemon.png'),
    (mypath + 'Yellow.png'),
    (mypath + 'Gold.png'),
    (mypath + 'Tangerine.png'),
    (mypath + 'Rust.png'),
    (mypath + 'Orange.png'),
    (mypath + 'Carrot.png'),
    (mypath + 'Red.png'),
    (mypath + 'Cardinal.png'),
    (mypath + 'Garnet.png'),
    (mypath + 'Maroon.png'),
    (mypath + 'Purple.png'),
    (mypath + 'Powder.png'),
    (mypath + 'Navy.png'),
    (mypath + 'Royal.png'),
    (mypath + 'Hunter.png'),
    (mypath + 'Gray.png'),
    (mypath + 'Charcoal.png'),
    (mypath + 'Khaki.png'),
    (mypath + 'Vegas.png'),
    (mypath + 'Kelly.png'),
    (mypath + 'Pink.png'),
        var d=document;
        theValue=coPrimaryimages[theValue];
        if (!theValue || !d.getElementById ) return;
        var obj = d.getElementById(objId);
        if (obj) obj.src=theValue;  
      <!--
    function logo_prodImgSec(objId,theValue) {
      var coimagesecondary1='/j25cms/images/customimages/';
    var coimagesecondary25= document.getElementById('ff_elem368');
    var coimagesecondary2= coimagesecondary25.options[coimagesecondary25.selectedIndex].value; 
    var coimagesecondary3='/accent/';
    var ttt='Powder.png';
    var mypathz=(coimagesecondary1 + coimagesecondary2 + coimagesecondary3);
      var coSecondaryimages=['/j25cms/images/customimages/blank.png',(mypathz + 'White.png'),
    (mypathz + 'Black.png'),
    (mypathz + 'Lemon.png'),
    (mypathz + 'Yellow.png'),
    (mypathz + 'Gold.png'),
    (mypathz + 'Tangerine.png'),
    (mypathz + 'Rust.png'),
    (mypathz + 'Orange.png'),
    (mypathz + 'Carrot.png'),
    (mypathz + 'Red.png'),
    (mypathz + 'Cardinal.png'),
    (mypathz + 'Garnet.png'),
    (mypathz + 'Maroon.png'),
    (mypathz + 'Purple.png'),
    (mypathz + 'Powder.png'),
    (mypathz + 'Navy.png'),
    (mypathz + 'Royal.png'),
    (mypathz + 'Hunter.png'),
    (mypathz + 'Gray.png'),
    (mypathz + 'Charcoal.png'),
    (mypathz + 'Khaki.png'),
    (mypathz + 'Vegas.png'),
    (mypathz + 'Kelly.png'),
    (mypathz + 'Pink.png'),
        var d=document;
        theValue=coSecondaryimages[theValue];
        if (!theValue || !d.getElementById ) return;
        var obj = d.getElementById(objId);
        if (obj) obj.src=theValue;  
    function clear_OnChange()
    var combo = document.getElementById('ff_elemPriColor');
    combo.selectedIndex = "0";
    var combo2 = document.getElementById('ff_elemSecColor');
    combo2.selectedIndex = "0";
    </script>
    <div id="product1image_a" style="position: relative; float: right; top: -20px; right: 0px; width: 250px; height: 250px; border: 2px solid darkgray; box-shadow: 5px 5px 5px rgb(136, 136, 136);">
      <img width="250" height="250" style="position:absolute;bottom:0px;right:0px;" id="theImg" src="images/customimages/blank.jpg" alt="" />
      <img id="thePrimary" style="position:absolute; bottom:0px; right:0px; width:250px;" src="images/customimages/blank.png">
      <img id="theAccent" style="position:absolute; top:0px; left:0px; width:250px;" src="images/customimages/blank.png">
    </div>
    <span id="bfElemWrap368" class="bfElemWrap bfLabelLeft">
    <label id="bfLabel368" for="ff_elem358">Product Line</label>
    <select id="ff_elem368" name="ff_nm_prod1[]" onchange="logo_prodImgBySel('theImg',this.selectedIndex);clear_OnChange();logo_prodImgPrim('thePrim ary',this.selectedIndex);logo_prodImgSec('theAccent',this.selectedIndex);" class="ff_elem">
    <option value="" selected="selected"></option>
    <option value="11">Big Boy Chair</option>
    <option value="12">Deluxe Chair</option>
    <option value="13">Canvas Chair</option>
    <option value="15">Sphere Chair</option>
    <option value="20">Toddler Chair</option>
    <option value="23">Classic Fleece</option>
    <option value="24">Sherpa Throw</option>
    <option value="25">Fleece Throw</option>
    <option value="27">UltraSoft Blanket</option>
    <option value="32">Tailgate Table</option>
    <option value="35">Trashcan Cooler</option>
    <option value="39">Economy Tent</option>
    <option value="41">Color Tent</option>
    <option value="42">Checkerboard Tent</option>
    <option value="48">Side Panel</option>
    <option value="50">12 Pack Cooler</option>
    <option value="51">Luggage Set</option>
    <option value="52">Rolling Duffel</option>
    <option value="54">Sport Duffel</option>
    <option value="56">Lunch Pail</option>
    <option value="57">Rolling Cooler</option>
    <option value="58">Party Bucket</option>
    <option value="60">Picnic Cooler</option>
    <option value="62">Backpack</option>
    <option value="64">String Pack</option>
    <option value="65">Reversible Tote</option>
    <option value="68">Seat Blanket Combo</option>
    <option value="69">Stadium Seat with Arms</option>
    <option value="71">Stadium Cushion</option>
    <option value="72">Gym Bag</option>
    <option value="74">Sweatshirt Blanket</option>
    <option value="77">Round Coozie</option>
    <option value="78">Flat Coozie</option>
    <option value="79">Bottle Coozie</option>
    <option value="80">Stadium Seat</option>
    <option value="82">8-Can Cooler Tote</option>
    <option value="83">16-Can Cooler Tote</option>
    <option value="84">30-Can Cooler Tote</option>
    <option value="90">Camping Stool</option>
    <option value="94">Hardback Seat</option>
      </span>
    </select>
    <span id="bfElemWrapPriColor" class="bfElemWrap bfLabelLeft">
    <label id="bfLabelPriColor" for="ff_elemPriColor">Primary Fabric</label>
    <select id="ff_elemPriColor" name="ff_nm_prodcolor[]" onchange="logo_prodImgPrim('thePrimary',this.selectedIndex)" class="ff_elem">
    <option value="" selected="selected"></option>
    <option value="White">White</option>
    <option value="Black">Black</option>
    <option value="Lemon">Lemon</option>
    <option value="Yellow">Yellow</option>
    <option value="Gold">Gold</option>
    <option value="Tangerine">Tangerine</option>
    <option value="Rust">Rust</option>
    <option value="Orange">Orange</option>
    <option value="Carrot">Carrot</option>
    <option value="Red">Red</option>
    <option value="Cardinal">Cardinal</option>
    <option value="Garnet">Garnet</option>
    <option value="Maroon">Maroon</option>
    <option value="Purple">Purple</option>
    <option value="Powder">Powder</option>
    <option value="Navy">Navy</option>
    <option value="Royal">Royal</option>
    <option value="Hunter">Hunter</option>
    <option value="Gray">Gray</option>
    <option value="Charcoal">Charcoal</option>
    <option value="Khaki">Khaki</option>
    <option value="Vegas">Vegas</option>
    <option value="Kelly">Kelly</option>
    <option value=

  • Extra column names selected when using the 'popup describe' for selecting columns

    Hi,
    In SQL Developer 3.2.20.09, if you use the popup describe function on a table and individually select some columns using Ctrl + click (not shift click which would select a range of columns), and then drag them to the SQL worksheet so the column names come across, it will include all columns between the individual columns that were  selected.
    For example if I choose column 1 and 5, it will include columns 1,2,3,4,5 when I drag them across.
    Simple to reproduce on any table, just open the SQL worksheet, type the name of a table, open the popup describe and select some columns.
    regards,
    Steve

    This isn't happening in v4 EA2 so it appears to be fixed.

  • Change display value of "select list"

    Hi!
    I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
    The select list is based on a sql query:
    select A_NAME display_value, A_ID return_value
    from APPLICATIONS
    where a_application_type='GROUP'
    order by 1
    beside I have an link to open a pop up window:
    ... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
    'scrollbars=no,status=no,width=500,height=270' ...
    On the pop up site there is a tree and a submit button which close the window and renew the original page:
    javascript:window.opener.location.reload();window.close();
    Through the tree I get the value (Group-ID) which I need.
    When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
    I don't know why it doesn't change immediately!?
    Thanks ahead

    I have done with a solution just in a nutshell of what u r looking for:
    1.create HTML region.
    Add two items : Select list with redirect(P6_X) and text field(P7_X)
    2. Select list is based on LOV query as :
    select empno d,empno r from emp ;
    Source value is Empno Type:DBcolumn.
    3.The text field Source type : SQL Query .
    Query : select ename from emp where empno = :P6_X
    Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
    U can have more than one text fields and populate those in the same way.....
    Cheers,
    ROSY

  • Problem using javascript to submit jsf form, values not submitted

    Greetings!
    I have a t:selectOneMenu where I want the page to be submitted when they change the selected value. At this point, I am able to get the form to submit and reload the page, which is all fine. The problem is that none of the values from the page are not set in the backing bean. I have break points on the setter methods that are not being hit.
    I have tried a number of things from searching multiple forums, but here are snippets from my latest version...
    <h:form>
    <t:commandLink id="hiddenLink" forceId="true" value="test link"
    action="#{pc_PageX.doBtnHiddenLinkAction}"></t:commandLink>
    <t:selectOneMenu id="pageList_top" forceId="true" value="#{pc_PageX.ValueX}"
         onchange="jspellSync(); submitPageX();">
         <f:selectItems value="#{pc_PageX.ListX}" />
    </t:selectOneMenu>
    </h:form>
    function submitPageX(){
         var hiddenLink = document.getElementById("hiddenLink");
         hiddenLink.click();
    }Note that the <t:commandLink> is not hidden, though it will be in the final version if I can get this to work.
    If I click the commandLink myself, the page is submitted with all the page values as expected. If I change the list value, thus using javascript to fire the commandLink's click event, the page is submitted with NO values.
    Can anyone come up with an explanation for this behavior? Or better yet, a solution?
    A couple other things I've tried...
    - Not using a commandLink and using jsf's submit function -> onchange="jspellSync(); submit();"
    - Clicking the link using other ways -> hiddenLink.fireEvent('onclick');
    If all else fails, I'll just add a button that they have to click to submit the form.

    snotmare wrote:
    BalusC wrote:
    I recall this problem in one of the ancient JSF versions. Which JSF version do you use? Do you have any room to upgrade to latest? We're using an IBM implementation of JSF, which is at version 7.0. The IBM implementation appears to be built on the JSF base 1.1.That's not an IBM JSF implementation, they do not have any one, they just have some component libraries which runs on top of some JSF implementation. RAD/WSAD ships by default with Sun JSF RI. Try upgrading to at least 1.1_02 which you can download from the aforementioned link. There's a gap of 2 years (and inherently a lot of bugfixes) compared to 1.1. If the application server used supports Servlet 2.5, you could even upgrade to the latest 1.2.
    We've had other issues with the IBM implementation, which could be the cause in this case too. We've been talking about switching to MyFaces, but there is one feature of the IBM version that we like. It's basically a script collector (hx:scriptCollector) that allows us to do pre-processing on the page.As said before, IBM does not have a JSF implementation. So replacing RI by MyFaces wouldn't make any difference.

  • SUBMIT button and VALUE clause

    I have a jsp screen like below.It shows in a tabular form all the employee data.
    EMPLOYEE DETAILS
    EmpId_______ProcessEmpSalary_____ProcessEmpLeave
    1
    2
    3
    4
    5
    6
    7
    8
    NEXT______PREV____LAST____FIRST
    Under ProcessEmpSalary ,ProcessEmpLeave of each employee I have a submit button and clicking on it the particular employee id has to be processed (for salary or leave).Now I want the employee id to be passed when the submit button of that particular employee is pressed.
    So what I am doing is I put the emp id in the value clause and achieve my purpose.But this results in the display of the emp id over each submit button.It looks ugly and so
    I dont want to use the VALUE clause of the SUBMIT button.........
    So friends please tell me how to achieve it.Someone suggested me to use IMAGE but it doesn't work.Some suggested I use hidden varaible ,but I just don;t understand how is that possible.Some suggested me use javascript to pass the value and throw the form...this make sense but problem is I don't have time to learn javascript now.So please help with some code example how to achieve this result.

    Here is my jsp as it is .Employee id was used for example.In my application it is Submission_Id
    which is used as the key.
    Note:
    The method is given below after the end of this JSP code.
    SubmissionList.jsp
    <%@ page contentType="text/html;charset=WINDOWS-1252"%>
    <%@page import = "oracle.portal.provider.v1.*, oracle.portal.provider.v1.http.*, oracle.portal.utils.v1.*, java.sql.*, ccrspackage.*" %>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=WINDOWS-1252">
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <TITLE>
    </TITLE>
    </HEAD>
    <BODY BGCOLOR = #FFCC00 FONT SIZE = "+2" >
    <FORM ACTION = 'SubmissionList.jsp' method='post'>
    <%
    //retrieve the existing session
    HttpSession Session= request.getSession(true);
    CCRS OCCRS = null;
    Connect OConnect = null;
    try
    if (request.getMethod().equals("POST"))
    if ( request.getParameter("Exit") != null)
    response.sendRedirect("Default.jsp");
    else
    OCCRS = (CCRS)Session.getValue("OCCRS");
    if (request.getParameter("Search") != null)
    OCCRS.InitialSettingForSubmissionList();
    else
    OCCRS.CreatePageOfSubmissionList(request);
    else
    OConnect = (Connect)Session.getValue("OConnect");
    OCCRS = new CCRS(OConnect);
    OCCRS.InitialSettingForSubmissionList();
    Session.putValue("OCCRS",OCCRS);
    catch (Exception e)
    OCCRS.ProcessError(e);
    //MESSAGE (IF ANY)
    out.println("<TABLE ALIGN=CENTER>");
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = RED>");
    out.println("<B>");
    out.println(OCCRS.GetDisplayMessage());
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    if (OCCRS.GetShowRecord() == false)
    String TempValue = "";
    String TempSelected = "";
    String TempText = "";
    out.println("<TABLE ALIGN=CENTER>");
    //Show all the drop down list
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = BLACK>");
    out.println("<B>");
    out.println("Fiscal Year");
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<SELECT name = 'Fiscal_Year' >");
    while (OCCRS.NextItrScrFiscal_Year())
    TempValue = OCCRS.GetItrScrFiscal_Year();
    TempSelected = OCCRS.GetItrSelectedScrFiscal_Year();
    out.println("<OPTION value = '" + TempValue + "' " + TempSelected + " >" + TempValue + "</OPTION>");
    out.println("</SELECT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = BLACK>");
    out.println("<B>");
    out.println("Fiscal Period");
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<SELECT name = 'Fiscal_Period' >");
    while (OCCRS.NextItrScrFiscal_Period())
    TempValue = OCCRS.GetItrScrFiscal_Period();
    TempSelected = OCCRS.GetItrSelectedScrFiscal_Period();
    out.println("<OPTION value = '" + TempValue + "' " + TempSelected + " >" + TempValue + "</OPTION>");
    out.println("</SELECT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = BLACK>");
    out.println("<B>");
    out.println("Province");
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<SELECT name = 'Province_Code' >");
    while (OCCRS.NextItrScrProvince_Code())
    TempValue = OCCRS.GetItrScrProvince_Code();
    TempSelected = OCCRS.GetItrSelectedScrProvince_Code();
    TempText = OCCRS.GetItrScrProvince_Desc();
    out.println("<OPTION value = '" + TempValue + "' " + TempSelected + " >" + TempText + "</OPTION>");
    out.println("</SELECT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = BLACK>");
    out.println("<B>");
    out.println("Facility");
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<SELECT name = 'Facility_Code' >");
    while (OCCRS.NextItrScrFacility_Code())
    TempValue = OCCRS.GetItrScrFacility_Code();
    TempSelected = OCCRS.GetItrSelectedScrFacility_Code();
    TempText = OCCRS.GetItrScrFacility_Name();
    out.println("<OPTION value = '" + TempValue + "' " + TempSelected + " >" + TempText + " " + TempValue + "</OPTION>");
    out.println("</SELECT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD>");
    out.println("<FONT COLOR = BLACK>");
    out.println("<B>");
    out.println("Status Code");
    out.println("</B>");
    out.println("</FONT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<SELECT name = 'Status_Code' >");
    while (OCCRS.NextItrScrStatus_Code())
    TempValue = OCCRS.GetItrScrStatus_Code();
    TempSelected = OCCRS.GetItrSelectedScrStatus_Code();
    TempText = OCCRS.GetItrScrStatusDesc();
    out.println("<OPTION value = '" + TempValue + "' " + TempSelected + " >" + TempText + "</OPTION>");
    out.println("</SELECT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    // SHOW 2 SUBMIT BUTTONS ,"Next" and "Close"
    out.println("<TABLE ALIGN = 'CENTER'>");
    out.println("<TR>");
    out.println("<TD ALIGN=CENTER>");
    out.println("<INPUT TYPE = 'SUBMIT' NAME = 'ShowRecord' value ='ShowRecord'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'Exit' value ='Exit'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    else
    out.println("<TABLE ALIGN=CENTER>");
    //THE COLUMN NAME IS SHOWN
    for(int Row = 0;Row <= OCCRS.GetFilledRow();Row++)
    if (Row == 0)
    out.println("<TR BGCOLOR = 'Black' >");
    else
    out.println("<TR BGCOLOR = 'Teal' >");
    for(int Col = 0;Col <= OCCRS.GetFilledCol();Col++)
    out.println("<TD>");
    out.println("<B>");
    out.println("<FONT COLOR = WHITE >");
    out.println(OCCRS.ReturnNewPageElement(Row,Col));
    out.println("</FONT>");
    out.println("</B>");
    out.println("</TD>");
    out.println("</TR >");
    out.println("</TABLE>");
    out.println("<TABLE ALIGN = 'CENTER'>");
    out.println("<TR>");
    if (OCCRS.GetMoreRecExist())
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'Next' value ='Next'>");
    out.println("</INPUT>");
    out.println("</TD>");
    if (OCCRS.GetPageNumber() > 0)
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'Prev' value ='Prev'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'First' value ='First'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'Search' value ='Search'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("<TD>");
    out.println("<INPUT TYPE = 'Submit' NAME = 'Exit' value = 'Exit'>");
    out.println("</INPUT>");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    %>
    </FORM>
    </BODY>
    </HTML>
    Here is my method in CCRS class
    This method create a multidimensional array of fixed row
    and column .This array is populated with all the data that has to
    be displayed ,and also satisfies the condition specified by the user.
    This array is subsequently used in the JSP (which calls this method)
    and displays all the row.
    public void CreatePageOfSubmissionList(HttpServletRequest request) throws Exception
    ResultSet ResSet;
    ShowRecord = true;
    DisplayMessage = "";
    if (request.getParameter("ShowRecord") != null )
    ScrProvince_Code = request.getParameter("Province_Code").trim();
    ScrFacility_Code = request.getParameter("Facility_Code").trim();
    ScrFiscal_Year = request.getParameter("Fiscal_Year").trim();
    ScrFiscal_Period = request.getParameter("Fiscal_Period").trim();
    ScrStatus_Code = request.getParameter("Status_Code").trim();
    LastSubmission_Id = 999999999;
    MathematicalSign = "<";
    else
    if (request.getParameter("Release") != null )
    ScrSubmission_Id = request.getParameter("Release").trim();
    Submission_Id = ScrSubmission_Id;
    ReleaseSubmission();
              LastSubmission_Id     =     FirstSubmission_Id;
    MathematicalSign = "<=";
    else
    if (request.getParameter("Process") != null )
    ScrSubmission_Id = request.getParameter("Process").trim();
    Submission_Id = ScrSubmission_Id;
    ProcessSubmission();
              LastSubmission_Id     =     FirstSubmission_Id;
    MathematicalSign = "<=";
    else
    if (request.getParameter("Remove") != null )
    ScrSubmission_Id = request.getParameter("Remove").trim();
    Submission_Id = ScrSubmission_Id;
    RemoveSubmission();
              LastSubmission_Id     =     FirstSubmission_Id;
    MathematicalSign = "<=";
    else
    if (request.getParameter("Prev") != null )
    PageNumber = PageNumber - 1;
    Long Temp = (Long) VecPrevSubmission_Id.elementAt(PageNumber);
    LastSubmission_Id = Temp.longValue();
    MathematicalSign = "<=";
    else
    if (request.getParameter("First") != null )
    Long Temp = (Long) VecPrevSubmission_Id.elementAt(0);
    LastSubmission_Id = Temp.longValue();
    PageNumber = 0;
    MathematicalSign = "<=";
    else
    if (request.getParameter("Next") != null )
    PageNumber = PageNumber + 1;
         VecPrevSubmission_Id.addElement(new Long(FirstSubmission_Id));
    MathematicalSign = "<";
    //initialize the page array
    for(int Row = 0;Row <= MaxPageRow;Row++)
    for(int Col = 0; Col <= MaxPageCol;Col++)
    NewPage[Row][Col] = "";
    Submission_Id = LastSubmission_Id + "";
    Province_Code = ScrProvince_Code;
    Facility_Code = ScrFacility_Code;
    Fiscal_Year = ScrFiscal_Year;
    Fiscal_Period = ScrFiscal_Period;
    Status_Code = ScrStatus_Code;
    BuildQueryForSubmissionList();
    ResSet = Stmt.executeQuery (Query);
    ResSetMetaData = ResSet.getMetaData();
    //remember NumOfFields is O is java variable which starts with 0 and not 1,
    //that is the reason I am subtracting 1 from oracle returned value.
    int NumOfFields = ResSetMetaData.getColumnCount() - 1;
    FilledCol = -1;
    for(int Col = 0; Col <= NumOfFields;Col++)
    //1 is added because JDBC subscripts starts with 1 and not 0
    NewPage[0][Col] = ReturnChangedColumnName(Col + 1,ResSetMetaData);
    FilledCol = FilledCol + 1;
    FilledCol = FilledCol + 1;
    NewPage[0][FilledCol] = "Remove";
    FilledCol = FilledCol + 1;
    NewPage[0][FilledCol] = "Process";
    FilledCol = FilledCol + 1;
    NewPage[0][FilledCol] = "Release";
    FilledCol = FilledCol + 1;
    NewPage[0][FilledCol] = "Preview";
    //Note at this point row number 0 of the array is having the field names
    //Remaining rows (i.e 1,2...etc) will now be populated with field data
    FilledRow = 0;
    MoreRecExist = false;
    while(ResSet.next())
    if (FilledRow == MaxPageRow)
    MoreRecExist = true;
    break;
    FilledRow = FilledRow + 1;
         if     (FilledRow     ==     1)
              FirstSubmission_Id     =     Long.parseLong(ReturnColumnData(1,ResSet));
    FilledCol = -1;
    for(int Col= 0; Col <= NumOfFields;Col++)
    //1 is added because JDBC subscripts starts with 1 and not 0
    NewPage[FilledRow][Col] = ReturnColumnData(Col + 1,ResSet);
    FilledCol = FilledCol + 1;
    LastSubmission_Id = Long.parseLong(ReturnColumnData(1,ResSet));
    Status_Code = ResSet.getString("Status_Code");
    if (Status_Code == null)
    Status_Code = "";
    else
    Status_Code = Status_Code.toUpperCase().trim();
    FilledCol = FilledCol + 1;
    //IF SUBMISSION HAS ONLY BEEN REGISTERED THEN SHOW A REMOVE BUTTON
    if (Status_Code.equals("R"))
    NewPage[FilledRow][FilledCol] = "<INPUT TYPE = 'Submit' NAME = 'Remove' value ='" + LastSubmission_Id + "'></INPUT>";
    FilledCol = FilledCol + 1;
    //SHOW THE PROCESS BUTTON IF SUBMISSION HAS BEEN BEEN REGISTERED
    if (Status_Code.equals("R"))
    NewPage[FilledRow][FilledCol] = "<INPUT TYPE = 'Submit' Name = 'Process' value ='" + LastSubmission_Id + "'></INPUT>";
    FilledCol = FilledCol + 1;
    //SHOW THE RELEASE BUTTON IF THE SUBMISSION HAS BEEN BEEN PROCESSED
    if (Status_Code.equals("P"))
    NewPage[FilledRow][FilledCol] = "<INPUT TYPE = 'Submit' NAME = 'Release' value ='" + LastSubmission_Id + "'></INPUT>";
    FilledCol = FilledCol + 1;
    //SHOW THE PREVIEW BUTTON IF THE SUBMISSION HAS BEEN PROCESSED
    if (Status_Code.equals("P") ||
    Status_Code.equals("C") )
    NewPage[FilledRow][FilledCol] =
    "<img src=\"pdf.gif\" border=\"0\" onClick=\" javascript:window.open('" + StringUtil.replaceString(Preview_URL,"%Submission_Id%",new Long(LastSubmission_Id).toString()) + "', 'SubmissionReport','location=no,menubar=no,toolbar=no,scrollbars=yes,left=' + window.screen.availWidth*1.2/8 + ',top='+window.screen.availHeight*1.2/14 + ',width=' + window.screen.availWidth*3/4 + ',height=' + window.screen.availHeight*6/7 + '')\" style=\"cursor:hand\" >";
    // "<img src=\"/appl/development/ccrs/images/pdf.gif\" border=\"0\" onClick=\" javascript:window.open('" + StringUtil.replaceString(Preview_URL,"%Submission_Id%",new Long(LastSubmission_Id).toString()) + "', 'SubmissionReport','location=no,menubar=no,toolbar=no,scrollbars=yes,left=' + window.screen.availWidth*1.2/8 + ',top='+window.screen.availHeight*1.2/14 + ',width=' + window.screen.availWidth*3/4 + ',height=' + window.screen.availHeight*6/7 + '')\" style=\"cursor:hand\" >";

  • Making a form field required when another field is selected

    I have a contact form with the usual fields required (name, address, city, etc.). I'm adding a Country pull-down list to the form, which will default to the US being selected. Since a "State" field is not relevant for anyone filling out the form from another country, I'd like to make the State field required only if the country selected is United States, and not required for any other country. Is there a way to do this?
    Thanks,
    R-Co

    What you need is to be able to create a required textfield when the first textfield shows USA and destroy the required field when another country is selected.
    The following may help to understand create and destroy
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Deleting and rebuilding validations</title>
    <link href="http://labs.adobe.com/technologies/spry/widgets/textfieldvalidation/SpryValidationTextFiel d.css" rel="stylesheet">
    </head>
    <body>
    <form id="form1" method="post" action="#">
      <p>
        <input type="radio" name="radio" id="Married" value="Married" onclick="val(this);">
        <label for="Married">Married</label>
      </p>
      <p>
        <input type="radio" name="radio" id="Defacto" value="Defacto" onclick="val(this);">
        <label for="Defacto">Defacto</label>
      </p>
      <p>
        <input type="radio" name="radio" id="Single" value="Single" onclick="val(this);">
        <label for="radio">Single</label>
      </p>
      <hr>
      <span id="sprytextfield1">
        <label for="f_married">Married</label>
        <input name="married" id="f_married" type="text" value="">
        <span class="textfieldRequiredMsg">A value is required.</span>
      </span>
      <span id="sprytextfield2">
        <label for="f_defacto">Defacto</label>
        <input name="defacto" id="f_defacto" type="text" value="">
        <span class="textfieldRequiredMsg">A value is required.</span>
      </span>
      <span id="sprytextfield3">
        <label for="f_single">Single</label>
        <input name="single" id="f_single" type="text" value="">
        <span class="textfieldRequiredMsg">A value is required.</span>
      </span>
      <hr>
      <input type="submit" value="Submit" />
    </form>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryValidationTextField.js"></script>
    <script>
    var sprytextfield1,
            sprytextfield2,
            sprytextfield3;
    // build validations and delete / destroy them
    function val(e){
        // get the value
        value = e.value;
        // see what radion button we have
        if(value == "Married"){
            // if there inst a validaton build one
            if(!sprytextfield1){
                sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
            // if there is a validaiton in sprytextfield destory it, and clear the variable
            if(sprytextfield2 && sprytextfield2.destroy){
                sprytextfield2.resetClasses();
                sprytextfield2.destroy();
                sprytextfield2 = null;
            // same as the rest
            if(sprytextfield3 && sprytextfield3.destroy){
                sprytextfield3.resetClasses();
                sprytextfield3.destroy();
                sprytextfield3 = null;
        } else if(value == 'Defacto'){
            if(!sprytextfield2){
                sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
            if(sprytextfield1 && sprytextfield1.destroy){
                sprytextfield1.resetClasses();
                sprytextfield1.destroy();
                sprytextfield1 = null;
            if(sprytextfield3 && sprytextfield3.destroy){
                sprytextfield3.resetClasses();
                sprytextfield3.destroy();
                sprytextfield3 = null;
        } else if(value == 'Single'){
            if(!sprytextfield3){
                sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
            if(sprytextfield1 && sprytextfield1.destroy){
                sprytextfield1.resetClasses();
                sprytextfield1.destroy();
                sprytextfield1 = null;
            if(sprytextfield2 && sprytextfield2.destroy){
                sprytextfield2.resetClasses();
                sprytextfield2.destroy();
                sprytextfield2 = null;
        // proceed with the rest as normal
        return true;
    </script>
    </body>
    </html>

  • How to read value from select list

    Hi,
    i'm using jdev 10.1.3.1.0, adf, jsp and struts.
    i've made a simple viewobject 'bestyrer' (danish for department) and it contains a list of all available department in my organization.
    it appears in my jsp page as a dropdown list and when the user chose a specific department all employees in that department are shown as a master detail relationship.
    It works and its standard drag'n'drop in JDev.
    I need to know which department the user have chosen because the information i show to the user depends on it.
    my view look like this:
    SELECT KBestyrer.BESTYRER,
    KBestyrer.NAVN
    FROM K_BESTYRER KBestyrer
    bestyrer is a number and navn is the name of the department.
    the code generated in my jsp based on drag and drop is:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="DataForm.submit();">
    <html:optionsCollection label="prompt" value="index"
    property="KBestyrerView.displayData" />
    </html:select>
    and the corresponding HTML generated is:
    <select name="KBestyrerView" onchange="DataForm.submit();"><option value="0" selected="selected">0 Vejdirektoratet</option>
    <option value="1">101 København</option>
    <option value="2">147 Frederiksberg</option>
    <option value="3">151 Ballerup</option>
    <option value="4">153 Brøndby</option>
    <option value="5">155 Dragør</option>
    <option value="6">157 Gentofte</option>
    <option value="7">159 Gladsaxe</option>
    <option value="8">161 Glostrup</option>
    <option value="9">163 Herlev</option>
    <option value="10">165 Albertslund</option>
    <option value="104">999 Andet</option></select>
    First of all i don't want the indexed values as values of my individual options but the real values as seen in fron of the name. i.e. 101 147 151 and so on.
    how do i obtain this and how do i read the value the user have chosen?
    hope to receive some help.
    thanks
    br
    kim gabrielsen

    Ok,
    thanks for the pointer. it clearifies a bit but i cannot make it work.
    I've created a second binding as described in the dokument which gives me another binding in the pagedef file:
    <attributeValues IterBinding="KBestyrerViewIterator" id="Bestyrer">
    <AttrNames>
    <Item Value="Bestyrer"/>
    </AttrNames>
    </attributeValues>
    i guess i should be able to reference this binding using 'Bestyrer' as the id.
    in my JSP page i insert the following:
    <html:select property="KBestyrerView"
    disabled="${!bindings[\'KBestyrerView\'].updateable}"
    onchange="inspect(this.form)" >
    <html:optionsCollection label="prompt" value="#{bindings.Bestyrer.getInputValue()}"
    property="KBestyrerView.displayData" />
    </html:select>
    but it fails with an error:
    org.apache.commons.beanutils.NestedNullException: Null property value for '#{bindings'     at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUtilsBean.java:669)     at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean.java:715)     at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:290)
    I've tried #{bindings.Bestyrer} and #{bindings.Bestyrer.inputValue()}
    but they fail too.
    so there is clearly something i don't understand regarding this binding stuff.
    Assuming i get this to work how do i actually accesss the value chosen by the user?
    as far as i recall in plain HTML i gave the select list a name like:
    name=MyList
    and called a javascript function like this:
    onchange="inspect(this.form)"
    in my JS function i could access the value like this:
    function inspect(form){
    alert(form.MyList.options[form.MyList.selectedIndex].text)
    but when i name the select list i receive an error:
    javax.servlet.jsp.JspException: Cannot find bean under name MyList     at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:301)     at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:244)     at brugeroversigt.jspService(_brugeroversigt.java:75)     [brugeroversigt.jsp]
    I'm a bit confused here so any input would be appreciated.
    br
    kim gabrielsen

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

Maybe you are looking for