Forum Stats

  • 3,872,403 Users
  • 2,266,416 Discussions
  • 7,911,189 Comments

Discussions

How to set a value for a hidden inputText by javascript in ADF

user8696578
user8696578 Member Posts: 483
edited Jan 23, 2014 1:20AM in JDeveloper and ADF

Hi ADF Experts,

Jdev version 11.1.1.7.0

How to set value of a hidden inputText by javascript only. On some property change or value change of another inputText.

Below I tried

<af:resource type="javascript">

var customJsFunction = function (event) {

var exceptiondata = event.getSource().findComponent("it4").setValue('anyvalue');

return exceptiondata;

}

</af:resource>

<af:table>

<af:column sortProperty="#{bindings.Product.hints.productId.name}"

                 filterable="true" sortable="true"

                 headerText="#{bindings.Product.hints.productId.label}" id="c1">

        <af:inputText value="#{row.bindings.productId.inputValue}"

                      label="#{bindings.Product.hints.productId.label}"

                      required="#{bindings.Product.hints.productId.mandatory}"

                      columns="#{bindings.Product.hints.productId.displayWidth}"

                      maximumLength="#{bindings.Product.hints.productId.precision}"

                      shortDesc="#{bindings.Product.hints.productId.tooltip}" clientComponent="true"

             valueChangeListener="#{pageFlowScope.managedBean1.sdas}"     autoSubmit="true" id="it2">

          <f:validator binding="#{row.bindings.productId.validator}"/>

          <af:clientListener type="propertyChange" method="customJsFunction"/>

        </af:inputText>

      </af:column>

</af:table>

    <af:inputText label="Hidden Field" clientComponent="true" id="it4"/>

Please let me know where I am wrong

Thanks,

AR

Tagged:

Answers

This discussion has been closed.