1 Reply Latest reply on Jan 4, 2013 9:51 PM by 962262

    One input field, two data sources

      I am using Jdeveloper

      So I have one entity/view object that as about 10 fields, the main ones being System Code, User, and Version Number. Lets call this Data control 'A'. Then I have another data control that has only those three inputs, System Code, User, and Version Number. Lets call this on Data Control 'B', also this is a web service data control. Currently the user has the ability to create a release and it is submitted to an Oracle Database with Data Control 'A'. Now I want to add the Data Control 'B' to be submitted based on what the user inputs to the three fields in data control 'A'. I used (http://www.youtube.com/watch?v=DdNxWYTpgOg, video by Shay) to get both bindings to submit, but I can't get the data typed into Data Control 'A' to get used by Data Control 'B'. Currently both bindings submit, but Data Control 'B' only gets null values.

      Any help would be great. I have tried using bindings on the input fields, but I don't think I did it correctly, or it didn't work.

      Thanks in advance,
        • 1. Re: One input field, two data sources
          Ok so I figured it out, but I am not sure if this was the best way to do it.

          I was looking at the way you call multiple methods from one bean class. So after looking at the ( operationBinding = bindings.getOperationBinding("Commit"); ) where you look up the method name. I researched if there was one for input fields, and there was Attribute Bindings and Control Bindings . So after finding this article, http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/facesutils.htm . I was able to figure out how to look up the specific attribute by name and then the AttributeBinding as a setInputValue() method. So I bound the 3 input fields I needed to the class and then did

          AttributeBinding sysCodeAtt = getAttributeBinding("SYSCode");
          sysCodeAtt.setInputValue(syscode.getValue() );

          to change the value. So far from all of my tests this works perfectly. I am not sure if this is the wrong way to do things or not, but it has worked in my situation.

          - Dustin