Bind an inputFile value to a data control methods parameter

Hello I am trying to create a InputFile (ADF Faces) which is linked to a data control method. The method reads a specified file and returns the content which is then displayed in table form.
<br><br>
I have a filereader Class with the following method:
<i>public List<FileInQuestion> returnFileContents(String fileName)</i>
<br><br>
I have created a data control based on this Class. From the JSF page, under the data control palette I can drag on may parameter 'FileName' (as input text) and my method (as command button) and finally the return type 'FileInQuestion' (as read only table). This all works fine and when I type a filename in and hit the button it displays the contents in a table.
<br><br>
Now the problem is that I want to base the input parameter on the value of the InputFile component. But when I drag and drop the 'fileName' parameter onto the canvas, it doesn't give me the option to create as an input file!
<br><br>
Please could someone tell me how I manually link (bind) the inputFile component to the 'fileName' parameter?
<br><br>
Sorry if a bit long winded!!
<br><br>
Thanks Dan
Message was edited by:
user593073

Thanks Frank but I need to get at the text value returned from the inputfile component. I did what you said with the following results:
<br><br>
I started with a inputtext field, command button and read only table. When I entered a value (in this case 'C:\data\contacts.txt' ) into the inputtext field and hit the command button the table displayed the expected results (for logic please see my 1st post).
<br><br>
I then convert the inputtext component to a inputfile component in the way you suggested. I now rerun the application, browse to the same file and hit the command button, and then nothing!! no results.
<br><br>
I'm I missing something here?
<br><br>
Thanks
<br><br>
Dan

Similar Messages

  • ADF UIX Passing values from one Data Control to another

    How to transfer value of any column in the selected row of the table (one data control) to the messageTextInput, based on another Data Control?
    It may be on a single UIX-page or on different pages.
    Thank you.

    HI Prithviraj,
    The problem screen shot is as follows:
    The First Applicant is coming from one sub report and the second applicant is coming from another sub report. It is working fine from Crystal reports. But in the Crystal report viewer i am unable to get the out come as 1,2,3.
    If you need any additional information please let me know.
    Thanks
    Penchal

  • Binding LinkedList to ADF Web Service Data Control

    Hi guys,
    I would like to ask about how to bind a LinkedList (consumed from webservice) to ADF web service data control, in order to display it in JSF page. This LinkedList contains java beans that hold information I need. I've tried to ask google and search this forum, but still got no luck.
    <p>
    Yes I found article about dealing with complex input params, but seems not what I'm looking for.
    <p>
    Anybody has hint or idea on this ?
    <p>
    Thanks

    Take a look at this blog entry from Susan Duncan: Dealing with Complex Input Params in ADF Web Service Data Controls.
    It looks like what you are asking for.
    Hope it helps,
    -Eric

  • ADF Mobile: WebService data control method call with array

    JDev 11.1.2.3
    ADF Mobile deployed to Android emulator
    Hello All,
    I am trying to invoke a method in my Web Service data control and get the following exception
    Caused by: ERROR [oracle.adfmf.framework.exception.AdfInvocationRuntimeException] - Cannot serialize: [I@1dbae822
            at oracle.adfmf.dc.ws.soap.SoapTransportLayer.invokeSoapRequest(Lorg/ksoap2/SoapEnvelope;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Loracle/adfmf/dc/ws/soap/SoapGenericType;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.JavaBeanOperation.execute(Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.WebServiceDataControlAdapter.invokeOperation(Ljava/util/Map;Loracle/adfmf/bindings/OperationBinding;)Z(Unknown Source)
            at oracle.adfmf.bindings.dbf.AmxMethodActionBinding.execute()Ljava/lang/Object;(Unknown Source) This method is an AppModule method exposed as a service interface and the parameter for this method is a List<oracle.jbo.domain.Number>. The schema definition for the input is as follows:
    <element name="acceptTask">
       <complexType>
         <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="taskID" type="decimal"/>
         </sequence>
       </complexType>
    </element>For the input to my binding, I have tried int[], Integer[] and List<Integer>. All of these result in similar errors.
    I have also tried invoking this through a regular ADF application and that works fine with an int[]. It looks like something specific to the ADF Mobile SOAP layer.
    Is this a bug or a restriction in the framework? Any workarounds that has worked for anyone?

    No luck. A WS DC method call with a simple parameter (java.lang.String or java.lang.Integer) works fine but I can't get it to work when there is an array input.
    I have tried WS methods with int arrays and simple string arrays without any luck. All of them result in a cannot serialize error.
    I can't figure out what I am doing wrong. Are there any working WS Datacontrol samples with array inputs?

  • Binding Text input value to chart data provider

    Hello, I am trying to develop a flex mobile application that generates the Chart.
    Is there any way to set the text input value as a chart data provider?????
    and if so, can you give me example?????

    Perhaps a stupid question but when you change your
    arraycollection do you do arraycollectioname.refresh()? If not,
    that should be your problem, without the refresh method your visual
    object will not update but your arraycollection will.

  • Data Control does not show POJO returned from method

    Hi,
    I am running JDev 11.1.1.7. In my AppModule.impl I created a method that returns a simple POJO (which implements serializable) that has two String fields. I have exposed the method in the appmodule client interface. In the data control the method shows up with a return element instead of an object or any way to access the two String fields. I want to display the two String fields in separate output text components on my jspx page. I'm not finding documentation on how to do this. Can somebody point me to documentation or tell me how to make this change to the data control method return?
    Thanks in advance,
    Steve

    AM method can return custom type, but AFAIK there is no support for object introspection in design time.
    (so you can invoke this programmatically and cast to appropriate type, but you can't do DnD from Data Control pane).
    So, option 1 is to bind value property of your outputText fields to managed bean, programmatically call AM method, fill these properties manually and refresh your UI components(note that managed bean must be registered in viewScope or higher to preserve values)
    Option 2 is to create Bean DataControl (with this you will have DnD support)
    Dario

  • Java to access Webservice Data control?

    We created a Data Control from a Web Service.
    My question is can one use this Data Control using POJO.
    I think you should be able to do it but cannot find good documents or examples. Any pointers is much appreciated.

    Hi,
    if you mean a POJO in a SJF or JSP/STruts application, then yes, you can. You expose the data control methods on the binding and access the binding layer. If you mean using it from a non ADF application in a plain POJO, then the answer is no. In this case you would use a WS proxy class
    Frank

  • Managed Beans vs. POJO Data Control for sharing data

    Hi,
    I am currently using JAX-WS proxy client and POJO Data Controls to retrieve data from web services. This data needs to be shared across users. Normally I would use application scoped managed beans for this, but since I prefer using data controls and the binding layer, would using static POJO Data Control classes achieve the same thing?

    Hi,
    Data Controls don't exist across user sessions so in your use case use a managed bean in application scope. If you want to make this available from a Data Control
    - create a POJO
    - Use EL in the POJO to access the managed bean
    - Create a DataControl from the POJO
    This way the Data Control exposes the data as an API but itself always reaches out to the managed bean as a data store/cache
    Frank

  • How to create content based portlet in 10g using JCR Data Control.

    I have created a webecenter Application (portlet,content repository,jsf ) in jdeveloper 10.1.3.4.
    and created a DatacontrolRepository connection for conent server , so inside the data control pallette I get all the methods such as search, AdvancedSearch,getItems.
    Now I am trying to drop the getItems() method return value from JCR data control as a Table inside my JSR 168 standard portlet which i created.
    But I am not able to see any of the content in my portlet.
    If I drag the same method getItems() on to my jspx page ( inside my ViewController) its working as expected.
    Please guide me how can get the content on portlet.

    Hi,
    Thanks for your reply..but i already have this demo and it doesn't contain an example for a pie graph..if u know where i can find any example for a pie graph and how to pass data to it i would be so thankful
    Thanks again.
    Eyad Basheer

  • How do you get Data Controls to work!

    I am having a very rough time with ADF Data controls.
    I have a bunch of code that works great. I can run it from the command line, my unit tests work, etc. I make a Data Control and hardly anything works. I tried to include my data control library (I exported it as an ADF Library Jar) into a web app and it never worked. I wasn't even sure if the Data Control itself was working so I made a simple swing app and it worked...kind of. I noticed that if I had 2 data controls and called a function in each from my swing app then it would fail. But, if I included the methods in one data control and only used that one, it worked (kind of).
    This looks like a bug.
    Anyway, is there a dependency problem with the ADF Library Jar I'm exporting to my web project? I included all the dependent libraries in the classpath section of the project properties. The web app sees the data controls in the data control panel. When I drag the data control method onto my JSFx page it creates the table just fine. The problem is when it runs, no data comes back even though I KNOW it is working because of the unit tests and I got it working with the swing app. The swing app was in the same project as my data control code however.
    Please help!

    BTW, if I hard code some simple data object with some values and return that, it works, just not when I do anything 'real'. Like I said, I use this data control in a swing app in the project itself for testing. My code has unit tests and works.
    I am importing the exported ADF Library Jar into my web app, click refresh on the data controls, and I can see the data controls. I drag the functions over to my jsfx page and it paints the table in the editor just fine.
    I import all the 3rd party jars in the classpath of the project. Then I get that 'cant find so and so DataControl'. But it CAN find the data control for simple, hard coded data.
    All I see in the logs is this from the default server log;
    [2009-03-06T08:30:02.104-05:00] [DefaultServer] [NOTIFICATION] [] [oracle.adf.share.config.ADFConfigFactory] [tid: 15] [APP: Application2] Cleaning up application state
    [2009-03-06T08:30:32.964-05:00] [DefaultServer] [WARNING] [ADF_FACES-30145] [oracle.adfinternal.view.faces.partition.FeatureUtils] [tid: 12] [APP: Application2] [arg: AdfDvtGraph] [arg: zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 3] [arg: zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 3] A duplicate definition for the feature "AdfDvtGraph" has been found at zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 3. A feature with the same name was originally defined at zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 3. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    [2009-03-06T08:30:32.979-05:00] [DefaultServer] [WARNING] [ADF_FACES-30145] [oracle.adfinternal.view.faces.partition.FeatureUtils] [tid: 12] [APP: Application2] [arg: AdfDvtGauge] [arg: zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 7] [arg: zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 7] A duplicate definition for the feature "AdfDvtGauge" has been found at zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 7. A feature with the same name was originally defined at zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 7. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    [2009-03-06T08:30:32.979-05:00] [DefaultServer] [WARNING] [ADF_FACES-30145] [oracle.adfinternal.view.faces.partition.FeatureUtils] [tid: 12] [APP: Application2] [arg: AdfRichPivotTable] [arg: zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 11] [arg: zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml] [arg: 11] A duplicate definition for the feature "AdfRichPivotTable" has been found at zip:D:/Oracle/Middleware/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/servers/DefaultServer/tmp/_WL_user/Application2/57btp0/war/WEB-INF/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 11. A feature with the same name was originally defined at zip:D:/Oracle/Middleware/jdeveloper/dvt/lib/dvt-faces.jar!/META-INF/adf-js-features.xml, line 11. This may indicate that multiple copies of the same jar file are present on the class path. Ignoring the new feature definition.
    [2009-03-06T08:30:42.948-05:00] [DefaultServer] [WARNING] [ADFC-54008] [oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl] [tid: 16] [APP: Application2] [arg: oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder] ADFc: Replacing the ADF Page Lifecycle implementation with 'oracle.adfinternal.controller.application.model.JSFDataBindingLifecycleContextBuilder'.
    [2009-03-06T08:30:43.386-05:00] [DefaultServer] [NOTIFICATION] [J2EE JMX-46010] [oracle.as.jmx.framework.PortableMBeanFactory] [tid: 16] [APP: Application2] [arg: class oracle.as.jmx.framework.wls.spi.JMXFrameworkProviderImpl] JMX Portable Framework initialized with platform SPI "class oracle.as.jmx.framework.wls.spi.JMXFrameworkProviderImpl"
    [2009-03-06T08:30:43.417-05:00] [DefaultServer] [NOTIFICATION] [ADFC-60000] [oracle.adfinternal.controller.util.model.AdfmInterface] [tid: 16] [APP: Application2] ADFc: BindingContext is present, using ADFm APIs for DataControlFrames.
    [2009-03-06T08:30:43.448-05:00] [DefaultServer] [NOTIFICATION] [ADFC-50009] [oracle.adfinternal.controller.metadata.provider.MdsMetadataResourceProvider] [tid: 16] [APP: Application2] ADFc: Controller caching of MDS metadata resources ENABLED.
    [2009-03-06T08:30:43.542-05:00] [DefaultServer] [NOTIFICATION] [ADFC-52039] [oracle.adf.controller.internal.metadata.MetadataService] [tid: 16] [APP: Application2] [arg: /WEB-INF/adfc-config.xml] ADFc: Loading bootstrap metadata from '/WEB-INF/adfc-config.xml'.
    [2009-03-06T08:30:44.667-05:00] [DefaultServer] [ERROR] [] [oracle.adfm.adapter.bean] [tid: 16] [APP: Application2] Failed to load the provider: oracle.documaker.ids.IDSDataControl

  • Invoking binding operation from backing bean -- no data displayed in ADF table ?

    Hello experts, I have data control derived from  Web Service proxy client.  In this data control,  I have  multi record list derived from web service call.In my ADF page,  I have bunch of input components with many drop down lists and radio buttons, check boxes etc.
    Finally  I want to transfer user input to   data control.   In my  ADF page,  I  have mapped  the  result set of data conrol to  ADF table.
    When I click submit button,  the   input data from ADF page is passed to data control  operation.   In the bean method,  I am making use of   operationBinding.execute()  and operationBinding.getParamsMap().put().     I see it is fetching data by checking getResult().
    I am invoking partial trigger also on the table.  However, table is not getting populated with the data.
    please help me.     Jdeveloper verion is 11.1.1.6.     I have set "Refresh" attribute to "never"  for  iterator in the bindings tab.    But no luck.  I see that control coming to data control and calling web service and getting the data  and then it comes back to my bean method submit() and I see that getResult() is showing records fetched.   But  why  the table on ADF page is not showing the data ?
    thanks a lot in advance.

    I still not able to get  my table updated with  data.  If  I set   "Refresh"  to  "ifNeeded",  soon after coming out of  submit  method of bean, it again tries to execute the web service call in the  data control  and brings empty result since the search parameters are empty.  I do not know why it goes again to data control method.    So, when I hit submit button,  the bean method calls  operationBidnding.execute() and before this I set the parameters also.    After execute(),  addPartialTarget() gets executed and it comes out of submit.   At this time, it is supposed to go to ADF page.  But I see  that  it tries to execute  method in data control with empty parameters.   This is ridiculous.    It neither works with "never", nor with "ifNeeded". 
    I see many forums on this issue but no solution found...all those forums are not answered.  This looks like it is a bug in ADF table not able to refresh from  managed bean !!!!     
    thanks

  • Manipule a lista in data control

    Hi everyone,
    I have a data control from a oracle component and I don't have access to this code, so I used it in my page, the data control returns a collection of items, so I can use adf tree and other thinks like that.
    The data control is a data control from a UCM component and I'm using getItems method.
    So, as I say before I don't have access to the code of data control but I need manipulate the return with java operations, I need sort this list.
    I was thinking about call this method in my java method and create my custom data control, but I don't know how "call" the data control method in my custom method.
    I would like to know if it's possible cat the result of this oracle data control in a java method and so I can manipulate this.
    Thks in advance,

    Is it possible to which type of Object, the list returned by the datacontrol contains?
    If yes, you could create a custom comparator,
    (The below sample NavigationTreeNode is the type of each item in the list)
    import java.util.Comparator;
    public class NavigationTreeNodeComparator implements Comparator<NavigationTreeNode> {
    public NavigationTreeNodeComparator() {
    super();
    @Override
    public int compare(NavigationTreeNode navigationTreeNode1,
    NavigationTreeNode navigationTreeNode2) {
    int displaySequence1 = navigationTreeNode1.getDisplaySequence();
    int displaySequence2 = navigationTreeNode2.getDisplaySequence();
    if (displaySequence1 > displaySequence2) {
    return +1;
    } else if (displaySequence1 < displaySequence2) {
    return -1;
    } else {
    return 0;
    After getting the list from method, you can use the custom comparator to sort the list as follows:
    Here, the navigationTree contains the list of navigationTreeNodes
    NavigationTreeNodeComparator navigationTreeNodeComparator =
    new NavigationTreeNodeComparator();
    Collections.sort(navigationTree, navigationTreeNodeComparator);
    Thanks,
    Navaneeth

  • How to get value in data control at run time based on bind variable in VO

    Hi,
    we are capturing the value of customer id at run time. we are associating the captured value of customer id to bind variable of the view object.
    View object is returning the data of that customer id, this view object is part of the application module ,this application module is exposed as data control,so than we have drag and drop this view object response on the
    page from data control.
    How ever after assigning the customer id to bind variable but still it is not showing on jsf page,even we refreshed the data control manually with the help of java code so kindly provide some solution for it.

    Hi,
    If i got your post correctly,you can filter your VO using defining view criteria see following samples
    Oracle ADF - Create View Criteria and Execute using Bean.
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • NULL values and Data Control based on Web Service

    One of my ADF control is based on a Data Control created through a web service. Every thing is working fine except the way ADF control is handling the null values return by the web service based data control.
    For example for null columns the web service is sending the following:
    <ns0:beginDate xsi:nil="1"/>
    or
    <ns0:sourceCode xsi:nil="1"/>
    But the corresponding column in my ADF data control is trying to initialize itself using the value ‘[{nil=1}]’. It fails with the following error.
    2006-04-20 13:31:37.510 WARNING JBO-25009: Cannot create an object of type:java.util.Date with value:[{nil=1}]
    I will appreciate if someone could help me resolve this issue.
    Thanks,

    I tried again, but it seems that I'm unable to reproduce this in a test project which uses another data controls but is still as similar as possible to the original project in which I've encountered this behaviour.
    However, using a data control based on the same web service as in the original project, [{nil=1}] appears again instead of emtpy values.
    Is it possible that there is a significant difference in the generated wrapper classes? The underlying PL/SQL is the same (in strucutre) and the corresponding elements in the response XML of the web service are the same in the two cases, always like <ns0:someResponeValue xsi:nil="1"/>, so I don't know how it is possible that I can't reproduce this behaviour.
    A short description of the projects:
    Services/Model:
    I created a PL/SQL funcition in a package that returns a user type object. This return parameter consists of a non-empty string and a null value string. On top of this I created a PL/SQL web service and a data control for that.
    View/Controller:
    A JSF JSP page which has a read-only form showing the return values of the web service.
    Regards,
    Patrik

  • Drag and Drop via Data Control doesn't seem to bind input parameter.

    Hi Everyone,
    I've followed the 'how to drag and drop a webservice data control' excercise in my current application to bring back complex data on the basis of one parameter(appId). However, when running the application, the server logs indicate that 'The value of appId cannot be null'. I have definitely bound the appId to the requestIterator, and the button that calls the webservice has been bound accordingly too. The response tables have been bound to the responseIterator. The webservice definitely works, and brings back data as I've tested it with SoapUI for this appId.
    Is there something I'm missing?
    Any suggestions will be helpful.
    Thanks,
    Preethi.

    Hi Sarojamaly,
    According to your description, when you create a Data Source View in BIDS/SSDT, you can't see the tables in the pane. Right?
    In this scenario, when creating data source, please make sure you select a correct data provider. For example, it you connect to SQL Server database, you should use
    Native OLE DB\SQL Server Native Client. Then please test your connection to the data source.
    If the tables still can't be displayed, please make sure you select proper database and the check tables existence in the database.
    Best Regards,
    Simon Hou
    TechNet Community Support

Maybe you are looking for