Search code examples
oracle-adfjdeveloper

how to set a textbox readonly in table in jdeveleper based on another textbox value?


in my adf form I need to change the readonly property of textboxes in some rows based on another textbox value? how I can do that?


Solution

  • The preferred, more flexible method is to listen for a ValueChangeEvent from the textbox. Catch the event in a backing bean and set an internal attribute in the bean. Then, have the readOnly property call the bean's method to test whether it is set, isReadOnly(), sort of thing or whatever you are testing for.

    readOnly = #{viewScope.myBackingBean.readOnly}

    Have the table Partial Refreshed by the triggering textbox when it changes. Then the readOnly property will be evaluated for the other textboxes and displayed with the table refresh. Also change the triggering textbox to Partial Submit if you don't want the entire page to flash.