This discussion is archived
0 Replies Latest reply: Nov 20, 2012 8:12 PM by 969250 RSS

BUG -  JAVASCRIPT - submitting forms

969250 Newbie
Currently Being Moderated
JDEVELOPER 11.1.1.4.0

I am using a javascript method to update the cascading LOV (Model Driven) in a table filter. I am using <af:inputComboboxListOfValues> because I need both drop down as well as user typing the value (with autosuggest behaviour). I have already raised a problem for using Cascading LOV filter in table (
BUG - ADF Cascading LOV for Table Filters !!!???? have set autosubmit and partial triggers. But as we have to set the value as 'vs.filtercriteria' for fiters, the auto submit is not working.

Hence I am trying to overcome this using JAVASCRIPT. You can see my code below. In my javascript method I am submitting the form so that I can populate the LOV2 based on the value in LOV 1. But the form is getting submitted and LOV2 is updating,only if I type in the value in LOV 1. But if I select the value from dropdown, the javascript is still called but I think the form is not getting submitted, because the LOV 2 list is not updated.
I have tried giving the client listener type as both VALUECHANGE and PROPERTYCHANGE
function dosubmit() {
alert("hi");
 var hiddenButton = window.document.getElementById("f1");  // form id
hiddenButton.submit();
alert("hi2");

return;
}
---- \--
-----

<f:facet name="filter">
              <af:inputComboboxListOfValues id="inputComboboxListOfValues1"
                                            popupTitle="Search and Select: #{bindings.Deptid.hints.label}"
                                            label="#{bindings.Deptid.hints.label}"
                                            model="#{bindings.Deptid.listOfValuesModel}"
                                            columns="#{bindings.Deptid.hints.displayWidth}"
                                            shortDesc="#{bindings.Deptid.hints.tooltip}"
                                            autoSubmit="true"
                                            value="#{vs.filterCriteria.Deptid}"
                                            required="false" immediate="true"
                                            searchDesc="deptid">
                   <af:clientListener type="propertyChange" method="dosubmit"/>                     //   *TRIED GIVING BOTH VALUECHANGE AND PROPERTYCHANGE*
                <f:validator binding="#{bindings.Deptid.validator}"/>
                <af:convertNumber groupingUsed="false"
                                  pattern="#{bindings.Deptid.format}"/>
                
              </af:inputComboboxListOfValues>
            </f:facet>

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points