Save data in several collections of data control

Hello

In another post (https://forums.oracle.com/message/11094155), I asked how to merge data from several collections and display it in a table. FrankNimphius gave me the right answer. I now have my table with merged data from my control of data collections. But now I have reverse request: the table must allow to insert new lines and to store the data in the model represented by all of these collections.

I saw this blog https://blogs.oracle.com/jdevotnharvest/entry/how_to_add_new_adfand it is great, but works with a collectionModel, but the idea is exactly the same thing, just with several collectionModels in a parent one.

The table is not lined with a collectionModel, it is bounded to a list < MyObject > in my managed bean, in order to control the integrated data to create/delete operations from the parent collection do not work.

Another thing is: for me the model is a black box, I don't know anything about the model, I just know the datacontrol.

Thank you!

AAPDL

Hello

If you only have access to the data controls then it has no option to combine the two data sources in a single data control (for example, Pojo). Go with a suggested abstraction managed bean, the option I see is to expose a method in the managed bean that you can use to create a new empty - list entry. This then will be displayed as a blank line in the table after PPR.

The trickiest part is later - when you submit or commit the new line - to manually create new lines in other iterators or update other data sources accordingly (for which you will need to know what information goes on what iterator control or data). If other data controls are not BC of the ADF, and then to persist new lines, you will need to explicitly call the methods exposed on the data controls. So what you basically generate is a managed implementation bean of a two-phase commit. And then there's the case of deletion to consider as well.

Frank

Tags: Java

Similar Questions

  • Create table with several Collections of data control

    Hello

    I have a requirement about to display data in a table. It shows simple, but certain columns in the table are within a collection, and the others are in another collection. I read this chapter Creation of ADF Databound Tables - 11 g Release 1 (11.1.1.7.0), and she explains to create the table with a collection.

    I have no knowledge on the model, I know just as control data, so what should I do? :

    -Ask for the template designer to redraw the control of data to include a collection with all the data?

    -Try to work with the actual data control? If so, how can I create the table several Collections of data control?

    Plese let me know if there is another solution. I work with JDeveloper 11.1.1.7.

    Thank you!

    AAPDL

    Hello

    You can have a managed bean that e... g exposes an ArrayList of objects. This can then binds to the value property of the table. If the object sets the information of table row combination that you get multiple iterators (collections), then the table will display the joined data.

    Frank

  • Bind several web service data controls on the same page

    Hello
    JDev version: 11.1.1.6.0
    I using SOAP web services. I have the following usage:
    I have the data control for the web service, that records the values entered into the form. I created the entry form using the data control (DC1).
    There is an input field [T1], on the tab, I need to fill an another text field, for which the data is returned to an another web service (DC2) data control.
    For the same input text [T1] on the tab out, I need fill in the object list in the component selectonechoice, for which the data is returned to an another web service (DC3) data control.

    Is it possible to use bind several data controls on the same page to reach the use case?
    However, I want to avoid the use of managed bean. Is it possible to do this?

    Concerning
    Fabiola

    Hello

    I can make the case to use even without the use of the managed bean?

    Yes, although the managed bean solution seems reasonable to me.

    Difficulties are

    + 1) REQ1 and REQ2 are the parameters that is common to both 1 and 3 services. +

    Text fields that provide arguments to a method are related to an input variable (file PageDef has an iterator variable in the executable section). A variable can be referenced from method arguments

    + 2) REQ1 is the parameter that is common to both 2 and 3 services. +

    Identical to 1. Create a setting for service 2 and map variables in the arguments of the method of service 3

    + 3) Service3 needs all REQ1, REQ2, REQ3, and REQ4 parameters as parameters to save the data. +

    As said, fields can be referenced from variables, dependent, the linking of the attribute fields (as I guess it is a return value in the bound field)

    There are problems of links as the same setting is available between several departments.

    It's new to me

    Is it possible to solve these problems of binding addresses?

    Yes. Make sure however that WS DC iterators you see in PageDef have their property Refresh ifNeeded for the refreshment of the bound field work properly

    Frank

  • How can I save data in text format

    How can I save data in text format in labwindows cvi

    Hello

    If your data is in a table, the easiest is to use the ArrayToFile function.

    Automatically, it creates a file and puts your data in it depending on the size you provide.

    If you have individual samples you need to write from time to time, you can either collect them in a table and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.

    Hope this helps,

  • oracle.jbo.NoDefException: Houston-25058 POJO data control

    Hello.

    I had a problem where I get the following exception:

    oracle.jbo.NoDefException: Houston-25058: groupLabel of definition of the attribute type is not found in ViewDefgroups3_254.

    Here is the description:

    With the help of:

    12.1.3 JDev (Build JDEVADF_12.1.3.0.0_GENERIC_140521.1008.S).

    JDK 1.7.0_79


    In my application I have XSD which was used to generate the content model (next classes of java: Project.java (as the main class of the model), GroupsType.java, ThemeType.java).

    Data control was created on this model (POJO data control).

    When I was creating a data control I also create wrapper class (for additional functions) - ProjectWrapper.


    Created data control has the following structure:

    ProjectWrapper:

    attributes of the project

    groups (collection):

    group attributes of

    themes (collection):

    attributes of theme

    After I did drag GROUPS onto the page and create trees that have the following structure (lets call it groupsTree):

    groups:

    groupLabel

    themes:

    themeLabel


    In pageDef there are:

    < Tree IterBinding = "groupsIterator" id = "groups" >

    < nodeDefinition DefName = "ru.project.GroupsType" Name = "groups0" > "

    < AttrNames >

    < item Value = "groupLabel" / >

    < / AttrNames >

    < accessors >

    < item Value = "themes" / >

    < / accessors >

    < / nodeDefinition >

    < nodeDefinition DefName = "ru.project.ThemeType" Name = "groups" path1 = TargetIterator"${bindings.themesIterator}" > "

    < AttrNames >

    < item Value = "themeLabel" / >

    < / AttrNames >

    < / nodeDefinition >

    < / tree >

    I also add:

    < action IterBinding = "groupsIterator" id = "ExecuteGroups" InstanceName = "ru.project.ProjectTypeWrapper.groups" "

    DataControl = "ProjectTypeWrapper" RequiresUpdateModel = "true" Action = "iteratorExecute" / >

    After starting my application, load the XML data in the content model and executes the ExecuteGroups action.

    In the application page all items that show the project attributes are filled with data.

    but when he goes to make application groupsTree throws the exception mentioned above.

    Interesting thing here that when I recreate the data control in the class of the project (without using the wrapper class).

    application works very well without any exception.

    Any ideas why this happened?

    Here is the part of the stack trace:

    at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:7984)

    at oracle.adf.model.bc4j.DCJboDataControl.getAttributeDefs(DCJboDataControl.java:2809)

    at oracle.adf.model.bean.DCBeanDataControl.getAttributeDefs(DCBeanDataControl.java:2171)

    at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:3440)

    at oracle.jbo.uicli.binding.MyIteratorBinding.getAttributeDefs(JUAccessorIteratorDef.java:519)

    ...

    See similar position.

    Unrecognized in the base model DataControl base class attribute

  • Client interface methods not found in the data control

    Hello

    JDev 11.1.2.4

    I exposed some methods by including them in the client interface of my module of the application. I tested the app module and I can call methods. I refreshed the data control, but I do not see the data control methods. I have several other client application with interface module and I can see the operation. I only have the problem with this module of the application.

    Any ideas?

    Thank you

    Close jdev, delete the folder the model project of the module of the application classes and the classes folder of the project view controller where you want to use the datacontrol, start jdev, recompile the project model (and deploy the lib, if you use the library), recompile the view controller and finally see if you see the methods in the datacontrol.

    Timo

  • Select multiple choice based on the data control does not not value in the correct form

    Hello, I am using JDeveloper 12.1.2

    I made a choice of several select based on an attribute of the year to a data control and I have a method in my managed bean that retrieves the selected values in the select choice of many, and on the basis that I want to do some queries, but the value that returns the selection is not the value of the attribute is the value of memory (or what is the correct value name..)

    Here is the code:

    < af:selectManyChoice value = "#{bindings." Label AnoList1.inputValue}' = 'Ano '.

    ID = "smc1.

    valueChangeListener = "#{OBIEE_managed_bean.» AnoListSelection}.

    autoSubmit = 'true '.

    Binding = "#{OBIEE_managed_bean.anoListBinding} '"

    immediate = "true" >

    < f: selectItems value = "#{bindings." AnoList1.items}"id ="si1"/ >

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

    < / af:selectManyChoice >

    Managed bean:

    public void AnoListSelection (ValueChangeEvent valueChangeEvent) {}

    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());

    try {}

    System.out.println ("Valor link yearChoice:" + anoListBinding.getValue () m:System.NET.SocketAddress.ToString ());

    ...

    The output is as follows:

    Valor link yearChoice: [Ljava.lang.Object;@4939cade

    Year: Ljava.lang.Object;@7135da60

    This normally happens when the toString is not defined, but how I have to fix this? Someone at - it had the same problem? Any advice?

    Kind regards

    Frederico.

    Hi Frederico

    I'm fine hope you are too.

    Sorry, but you can try

    {for (Object item: (Object []) {valueChangeEvent.getNewValue ())}

    System.out.println (Item.ToString ());

    }

    This should give you something.

  • Return of the bound data control method causes IllegalArgumentException

    JDeveloper Version: _12.1.2.0.0_GENERIC_130608.2330.6668

    Problem:

    I have a Service method on a data control which takes the parameters. I'm able to drag the Service method on a JSF/ADF page and it creates an ActionBinding and all links in the input parameter as well. No problem. I can run the page and enter values in the display, press the binding Action and the method on the façade of the Session is called perfectly. So far so good. Now, I want to display the results of the (returned as a collection of POJO) Service method in the method declaration.

    If I drag the method declaration of data control on the same page and request that the results will be displayed in a table (or any control that will display a collection, in this example, this is a graph) control is created and all links with her. Once again, so far, so good.

    Now I start the page. This time, I IllegalArgumentExceptions (two of them) returned as messages when loading the page. Stack trace looks like this (my apologies, I hate when people put a huge stack traces in positions):

    [code]

    java.lang.RuntimeException: java.lang.IllegalArgumentException

    at oracle.adf.model.adapter.bean.UpdatableBeanDataControl.invokeOperation(UpdatableBeanDataControl.java:606)

    at oracle.adf.model.adapter.bean.BeanFilterableDataControl.invokeOperation(BeanFilterableDataControl.java:80)

    at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:472)

    at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:266)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1658)

    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2189)

    at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:560)

    at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:309)

    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:751)

    to oracle.jbo.uicli.binding.JUMethodIteratorDef$ JUMethodIteratorBinding.invokeMethodAction (JUMethodIteratorDef.java:170)

    to oracle.jbo.uicli.binding.JUMethodIteratorDef$ JUMethodIteratorBinding.initSourceRSI (JUMethodIteratorDef.java:659)

    at oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1741)

    at oracle.adf.model.binding.DCIteratorBinding.internalGetRowSetIterator(DCIteratorBinding.java:1715)

    at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4684)

    at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)

    at oracle.jbo.uicli.binding.JUCtrlHierBinding.getRootNodeBinding(JUCtrlHierBinding.java:108)

    at oracle.adfinternal.view.faces.dvt.model.binding.common.BindingKeyChangeHandler.setBinding(BindingKeyChangeHandler.java:52)

    at oracle.adfinternal.view.faces.dvt.model.binding.graph.ActiveGraphDataModel.setHierBinding(ActiveGraphDataModel.java:82)

    at oracle.adfinternal.view.faces.dvt.model.binding.common.FacesCubicBinding.getDataModel(FacesCubicBinding.java:194)

    at oracle.adfinternal.view.faces.dvt.model.binding.common.FacesCubicBinding.getDataModel(FacesCubicBinding.java:159)

    at oracle.adfinternal.view.faces.dvt.model.binding.common.FacesCubicBinding.getDataModel(FacesCubicBinding.java:111)

    at oracle.adf.model.dvt.binding.common.CommonBinding.internalGet(CommonBinding.java:149)

    at oracle.adf.model.dvt.binding.common.CubicBinding.internalGet(CubicBinding.java:580)

    at oracle.adfinternal.view.faces.dvt.model.binding.common.FacesCubicBinding.internalGet(FacesCubicBinding.java:234)

    at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:751)

    at javax.el.MapELResolver.getValue(MapELResolver.java:199)

    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)

    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)

    at com.sun.el.parser.AstValue.getValue(AstValue.java:138)

    at com.sun.el.parser.AstValue.getValue(AstValue.java:183)

    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)

    [/ code]

    Now, if I fill in the parameters on the screen and call the ActionBinding by pressing the button created, the method calls the function on the façade and the data is returned in the control (chart or table). From that moment, I never have the illegalArgumentException and the page the way I want it.

    So, my question is, why the return of the method lie I invoke a method call on a page load until the ActionBinding is called and give me an illegalArgumentException. And - most importantly - how can I avoid this error?

    Any advice would be greatly appreciated.


    Thank you

    Nigel

    It is a normal behavior.  Check blog Shay https://blogs.oracle.com/shay/entry/delay_method_execution_when_us

    Timo

  • Web Service data control the result as a basis for workflow router

    Hello

    I'm under JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1 build

    I want to use the result of a check of SOAP Web Service data as input for a router on a workflow; lines will only ever return 0-1 control of data.

    Is it possible declaratively on the workflow diagram by simply using a SOAP data control, or should I access the data control through a managed bean, or go on the road of web service proxy?

    I'm new to ADF some detailed guidance would be appreciated.

    Thank you very much.

    Hello

    routers can have their own binding ADF file, so yes its possible. Select the router and then use the right button of the mouse to go to the pageDef file. As it does not exist it will be created. Then add a method binding point to the method on the WS to invoke domain controller. In the router, you should be able to use #{bindings.methodName.execute} as the EL. If the method returns a value, then it went to the assessment.

    However, if you need to look at an iterator (returned collection) then you are binding the attributeValue to one of the attriibutes in the collection. This should also configure the WS iterator and the required method binding

    Frank

  • Impossible to obtain the data controls to display the browser of the application

    I installed JDeveloper version 11.1.2.3.0 on a Workstation Windows 7 (SP1). Once installed, I decided to try the [get started with the JDeveloper IDE | http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_50/jdtut_11r2_50.html]. After you have created "MyFirstApplication" I noticed that I couldn't see the accordion of data controls, as shown in the example. I decided to ignore it and continue with the rest of the tutorial, hoping he could enlighten us. No chance and ran into other problems that surround the stage 13, when I could not create a managed bean as illustrated in the example.

    So I went back to the first problem of the accordion of missing data control, suspecting that this may be part of the problem. I searched and found several issues here in the discussion that resembled the may be solutions to the problem and tried them all:
    (1) remove the system11.1.2.3.39.62.76.1 directory and restart JDeveloper = > nothing helped, still missing data controls
    (2) uninstall all versions of Oracle Middleware installed on the PC, removal of the JDeveloper user directories, restart and reinstall only the version 11.1.2.3.0 (there was also an old 11.1.1.4 version installed) == > didn't help, still missing data controls
    (3) made a new software download where jdevstudio11123install.exe has been altered somehow. Repeated step 2 = > nothing helped, still missing data controls

    I'm pretty much running out of options now, is there any other mystical step I missed that can work?
    I feel, I'm not the first to experience this problem, but I can't find a solution with the search function of this forum.

    Any help is appreciated.

    Try to open up JDeveloper from the terminal and see if there are errors. Also in the screenshot, I don't see that you have all the projects exposing DataControls, so create a java class and right-click on it, create a DataControl and see if this stage support the feature.

    Juan C.

  • Delete all the rows in a data control Bean

    I use JDeveloper 11.1.1.6

    In my case, I have a screen that interacts with a data control Bean I followed the steps in the following URL to create a Bean data control

    http://docs.Oracle.com/CD/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

    My screen successfully interacts with the data control Bean. This form lives in a stream of delimited tasks (BTF). I can add lines using a link create insert and can delete rows as well. Once the user gets all the lines in the data of beans control they want inserted in a DB table, I can browse the data control Bean and publish those documents to the DB. It is possible for users to add rows to the data control Bean and then link to a new brand screen located in a different BTF that leaves lines in the data control Bean. Now, the user returns to the original screen. On his return, I would like to empty (erase all lines) for bean control data so that they have a new start. Could you please advise on what I need to do to be able to clear a data bean control when you enter a BTF

    You will need to add a method to your bean which clears the Collection that contains your data.
    You can then drag this method to your pageflow as a methodCall and invoke it when you navigate from one page to another.

  • Create, save data backup

    Hello

    This is probably a fairly common question, but I looked around and either did not answer or did not understand them. I honestly don't know who. So, without further ADO, here is my question.

    My iPhone becomes quite comprehensive, so I was thinking about the removal of some of the games I have on it to make room for the new. I have a few save data on the apps that I would still be there when the application is downloaded again later. Is there a way to do this?

    Thanks in advance.

    App data is stored in the backups of iOS - iTunes or iCloud.

    The backup of your iPhone, iPad and iPod touch - Apple Support

  • How to save data from the COM port to file?

    Hi all

    can someone tell me please how to save data from the COM port on file? I transfer 1 byte of serial port... attached is the image of the vi... very basic.

    I would like to save the data in a table... I mean, 1 data--> data--> data tab 2 tab 3rd--> tab

    and so on... can anyone help?


  • Save data in a different Excel worksheet

    Hello
    I am writing a program to evaluate other variables of human touch.
    I try to save data, post processing and sensors (2 sensors).
    I save data in different Excel files in the same folder, but it is quite heavy (one for the post processing of data, one for the force sensor and one for the motion sensor)...
    I prefer to have all the data in the same Excel in different sheets, but it seems impossible without the excel Toolkit.

    I've seen different poster forum that can seem to have had on the same topic, but I didn't get the answer...

    Thank you

    A toolkit written by the user for Excel is available in the thread Excel you might want to take a look at for reference (second post on the subject). NOTE: DON'T POST QUESTIONS IN THE THREAD EXCEL. This is a thread used as links to examples only.

  • Save data track selected to the XY graph

    Hello

    I have an XY Chart with 40 locations. The visibility of each parcel is editable by the user using the box of visibility of conspiracy.

    The user must have an option to save data any point of execution and channels that are selectecd to view should be saved as an excel file.

    When I use the option to export to excel, all 40 channels names are stored in the file. Instead, I want only the selected channelswhich are selected to be saved in the file.

    Let me know a way to do it.

    Hello

    Thanks for the reply.

    I already have a logic as in the attachment that will find the visible plots and using the parcel number I'm indexing of data. And it works very well.

    I wanted to know is there any node property or call the node which will give you all the visible plots in a XY Chart.

Maybe you are looking for