Insert the VO data by using java code on OFA?

Hi all,

I m trying a way to insert data by a VO using the Row.setAttribute () function, I need pair this way, but with not much success, for now, I created the following code in the

Application module:

' public void createRecord (String responsabilidad, String segment, String subsegmento) {}

OAViewObject vo = this.getMovQuiebresComercialesVO1 ();

If (! vo.isPreparedForExecution ()) {}

vo.executeQuery ();

}

Line studrow = vo.createRow ();

studrow.setAttribute ("ResponsibilityName", responsibility);

studrow.setAttribute ("DescSegmento", segment);

studrow.setAttribute ("DescSubsegmento", subsegmento);

vo.insertRow (studrow);

vo.setCurrentRow (studrow);

vo.insertRow (studrow);

vo.setCurrentRow (studrow);

studrow.setNewRowState (Row.STATUS_INITIALIZED);

}

After that, I made a call to the apply method in the AM:

{} public void apply()

getTransaction () .commit ();

}

The VO has the following attributes: http://screencast.com/t/hJiNoyY8

But I have not ben able to store the data in the Database, I would appreciate any suggestion

Thank you all

The solution was to initialize the VO in the page load Apps - OA Framework controller ViewObject for Table screen

Tags: Oracle Applications

Similar Questions

  • How to use several adf 12 shape and insert the form data in to table during the click on "submit" button

    How to use several adf 12 shape and insert the form data in to table during the click on "submit" button. Can we use several form from adf or not?

    Make sure that you dragged the VO based EO.

    Also make sure that the VO attributes based EO Updatable property.

    The query according to VO is used only to add LOV to the column of the original VO ModelId.

    See you soon

    AJ

  • PartialTriggers application using java code?

    We can perform a partial Trigger on a component using java code?

    For example,.
    I have a textBox element and an attribute of partialTriggers link commandButton.If in the text box for the commandButton control, he gets the renderer every time I click the commandButton control.

    Can I get the same thing by writing some piece of java code inside the listener of the CommandButton action?

    Kind regards
    Lokesh.

    If you bind the element to an attribute of bean (i.e. attrXYZ), you can use

    RequestContext.getCurrentInstance().addPartialTarget(attrXYZ);
    

    in the listener to update it.

    Timo

  • Download the client computer name using java or javascript

    Hi guru,.

    ... JDev 11.1.2.4.0...

    I don't have any application in the ADF and I want to get the client computer name using java or javascript. I searched on this, but I have found that this javascript method

    function getWorkstationID() {var ax = new ActiveXObject ("WScript.Network"); alert (ax.ComputerName); }

    but that use ActiveX that only work in IE with some security configurations, and I want to get the computer name of any browser client.

    Can you please help me to get the client computer name?

    Try one of these 2 ways:

          HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
          String computerName = request.getRemoteHost();
    

    or

          HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
          InetAddress i = InetAddress.getByName(request.getRemoteAddr());
          String computerName =  i.getHostName();
    
  • Questioning the advice "don't use java.util.Enumeration".

    http://NA.BlackBerry.com/eng/deliverables/5827/Avoiding_javautilEnumeration_447043_11.jsp

    This recommendation encourages away us using vectors/hash tables?

    If not, how did you wouldn't be throught a vector?

    Kind regards

    G

    Not sure what speed is for vector.elementAt () but normally I tried to convert

    vectors to the berries when their sizes are known. Once hashes happen is when you need

    quick access and can tolerate some lost memory. I don't know if there are tips for

    enumerate the entries but if you need to check each of them, then it will take time...

    I've only used enumeration with the

    debugging and some household code but if you determine that you need to list

    much you should consider a different approach. If you have static data, THAT RIM offers

    some matrix of the sorting facilities to allow you to do everything in a table and the same index so for research.

    BTW, anyone know about caching memory on the loss of locality of phones-not much hurt RIM?

    I gave up dealing in java in most cases, since I can't control the memory, but it is mentioned here.

    http://en.Wikipedia.org/wiki/Hash_table

    I guess I didn't have much on the generation of worried hash keys because I hope that it is implemented natively

    code, but compared to a native binary search that you worry.

    I guess if you need list and think that you need a hash table, consider a such linked list

    that each table entry has a pointer to some prior element and according to as, then no matter what section gives you a

    Automatic enumeration.

  • How to create a BPEL Process task using java code

    Hello

    I created a BPEL process (for creating task), in which my requirement is that I need to create a task based on some inputs and assign it to the user in partucular and then get out of this flow.

    earlier, I felt that I will use the human task activity. but when I use that task will be created in the same process and proceedings will be stuck on there until human intervention (the BPEL process waits for the result.).

    is it possible that I can use Java activity and create tasks from java code, 'I know how to assign a specific user task. Please tell me.
    Abhishek

    Published by: abhishek on April 25, 2011 12:42 AM

    Hi Abhishek
    1. you can try this alternative approach and it should work.

    2. basically, most of the BPEL process eventually auto generated Web services (.) WSDL). When we create a BPEL process, everything we do is give diagram of input, output schema and creates a bpel process with the default operation named as "process" in all the old versions as up to 11.2 SOA (and maybe before). BUT SOA 11.3 from, we can create a process BPEL, with our own WSDL and our own scheme. There is no restrictions like having only a single operation named 'process', etc.. In any case, what I mean is, each BPEL process ends up as a WebService, with entry and exit of the payloads of XSD.

    3. from the JDeveloper itself, locate the .wsdl for your BPEL process under the Workflow project. Create a new project of Proxy customer service Web and generate a customer for this wsdl Web service proxy. This will create you Service, Port and JAVA classes equivalent payload theoretically in your case taskpayload.xsd with these 4 items you have. Ignore the full blown the HumanTask which has all the system elements and attributes of a task of bpel. All you need is to undertake a task with your own payload data. Create a simple Client Java (EJB or Servlet later to make more flexible). In this Java client, retrieve the Service object in the proxy and port. Then instantiate the java class that represents the payload. Set 4 values you want and set the user name, etc. You may need some adjustments for the setting of the user. Then the port invoke otherwise (go your java object here).

    Sample code snippet
    prepare the message for BPEL of appeal; Define the fields that can not be null
    MyPayloadRequest myPayloadRequest = new MyPayloadRequest();
    myPayloadRequest.setInitiator("");
    myPayloadRequest.setTitle("");
    myPayloadRequest.setEmployeeName("");
    myPayloadRequest.setEmpContact("");

    web service client Get for BPEL receive point and call: first generate client proxy
    MyBPELPProcess_client_ep serviceClient = new MyBPELPProcess_client_ep();
    MyBPELPProces proxy = serviceClient.getNewMyBPELPProces_port ();
    proxy. Process (myPayloadRequest);

    Please note that you can also use the SOA workflow API and the Manager back call personalized for this first task classes. In this class, you can have the methods of the interceptor, which is called each time a task is initiated, saved, Submit, approve etc etc (all events essentially). This gives you access to all the objects in a workflow with full charge blown. So you can always get the data you pass above and in this custom class, the value of the user, date/time etc..

    It's just a different approach you can try.

    Thank you
    Ravi Jegga

  • Insert the statement do not using the MultiSelect values correctly

    I have a set of boxes MultiSelect displayed with in a cfloop. I named the MultiSelect boxes "MultiSelect #ID # with #ID #

    the value of KP for each record retrieved. I do this to make sure that each MultiSelect box has a unique name so that when I

    Insert data by using a query of < cfloop > names of are not in conflict. Here's the HTML for the selectbox.

    < select name = "" MultiSelect #ID # ' several size = "3" > (query #ID 'getNonRoleItemDetails) "
    < cfloop query = "getMultiitems" >
    < option value = "#AddInfoID #" > #Name # < / option > (these two values are taken from the "getMultiItems" query
    < / cfloop >

    Here's the query insert I use on the action page that uses this data.



    < cfloopquery getNonRoleItemDetails >

    < cfquery = name "Datasource =' #application.dbname # of the Insert_Multi_Records" >

    INSERT INTO tblItemDetailUpdates (ItemID, ItemDetailsListID, ItemDetailValue, ActionItemID)

    VALUES (#getNonRoleItemDetails.ItemID #, #getNonRoleItemDetails.ID #, ' #form ["MultiSelect" & ID] #', #ArrayOfIds [Counter] #)

    < / cfquery >
    < / cfloop >



    The problem I have here is that the query works correctly, but it is the insertion of the ID MultiSelect values selected (104, 105,

    (106), rather than the real names of these values (IOC, AP, AR... etc).


    I looked at the source code and each MultiSelect box is named correctly and uniquely. Insert inserts the correct ID

    values, but not the names.

    Sigh too bad I am a fool. Well at least I thought about it.

  • How to insert the legacy data into the QP_RLTD_MODIFIERS table?

    How insert Legacy data into the QP_RLTD_MODIFIERS table in the instance of R12.

    I would use the QP_Modifiers_PUB API. Process_Modifiers to push the old data on prices in R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environment, only the promos are given in this table).

  • Create the new virtual machine using Java API vCloud

    Hi guys,.

    I am trying to create the new virtual machine in TIME, but I've stuck here. The API I'm using is vcloud-java-sdk - 1.0.jar.

    Could you please show me a code snippet how to do this?

    For now I do it like this:

    RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();

    List the items < CompositionItemParamType > = recomposeVAppParamsType.getItem ();
    ReferenceType vappTemplateVMRef = new ReferenceType();

    // ??? seems that new reference to the new virtual machine should be here. But how to create this VM
    CompositionItemParamType compositionItemParamType = new CompositionItemParamType();
    compositionItemParamType.setSource (vappTemplateVMRef);

    Items.Add (compositionItemParamType);
    ReferenceType vAppRef is Vdc.getVdcByReference (vcloudClient, vdcRef) .getVappRefByName ("vApp_Websrv");.

    Vapp.getVappByReference (vcloudClient, vAppRef) .recomposeVapp (recomposeVAppParamsType);

    One day before I played with Web Services SDK, which is much easier to understand. I was able to create the vApp and VMs in vSphere. Is it possible to import machines virtual vSphere to vCloud? Should what API I use for this?

    Thank you

    Hello

    You cannot add a new empty virtual machine in a paralytic.

    Instead, you can add a virtual machine from an existing vapp, vapptemplate.

    To import a vsphere vm to vcloud.

    Import vsphere vm as VAPP in vcloud. VMWVimserver-> importVmAsVApp()

    The importation of vsphere vm, as vAppTemplate, in vcloud. VMWVimserver-> importVmAsVAppTemplate()

    See also the example of ImportVmAsvAppTemplate.java, which is part of the vcloudjavasdk group.

    Kind regards

    Rajesh Kamal.

  • Insert the current date and time

    Stupid question. I watched the different applications that insert the date and time in a database field. I noticed that some applications use systematically function now() FC and others use a database such as sysdate or getDate function. Situations in which you want to use the function now() CF instead of a database function and vice versa?

    This helped. Thank you all.

  • Insert the printed date

    I know how to insert the date, including today's Date, but not how to insert the date of a document is printed.  Is there a way?

    Thank you!

    Dick

    Select the menu item "file > print".

    now, double-click in the header or footer to activate the desired, move the cursor and select the menu "insert > Date & Time:

  • Join the nearest date "not used".

    I need to join the following tables by the next date "not previously signed" the nearest:

    start_table:

    st_id start_dt
    start031-dec-2014
    Start1

    January 3, 2015

    Start2January 5, 2015
    start3January 7, 2015
    Debut48 January 2015
    Debut5January 14, 2015

    end_table:

    end_id end_dt
    end0January 1, 2015
    End1January 2, 2015
    End2January 13, 2015
    End3January 15, 2015
    bout4January 17, 2015
    end519 January 2015
    end6January 20, 2015

    Result:

    st_id end_id
    start0end0
    Start1End2
    Start2End3
    start3bout4
    Debut4end5
    Debut5end6

    start0 joined end0, because the closer to the date of the next 31-dec-2014 is 1 January 2015

    Start1 joined end2, because the closer to the date of the next January 3, 2015 is January 13, 2015.

    Start2 joined end3, because as well as the date of the next more close January 5, 2015 is 13 January 2015, this is already accompanied Start1, so she joined next January 15, 2015.

    start3 joined bout4, because the date of the next although most close January 7, 2015 is 13 January 2015, this one is already joined by Start1, earliest date is January 15, 2015, but is also already joined by start2, then he joined the next available date January 17, 2015.

    Database: 11g

    Thanks in advance

    [UPDATE: changed line 37 to add "or cnt > = 0".] [This covers cases where there are more departures that ends at first.]

    Jiri.Machotka - Oracle wrote:

    I found a non recursive algorithm for this problem...

    I came up with something similar: no recursion, no joins, each table read only once.

    1. UNION ALL marked times 1 tables, with lines of departure and end marked lines - 1
    2. Order by date (first lines) and get a combination of 1's and - 1's.
      so when there are too many lines to end, the sum is negative.
    3. Get the previous cumulative minimum! Then take that end with a sum running lines, at less than the previous minimum.
    4. The remaining lines will have an end of line for each line of departure. Now number lines starting from 1 to N and the lines at the end of 1 to N, then match lines start and end in pairs. I use PIVOT to do this.
    WITH end_table (end_id, end_dt) AS (
      select 'end0',to_date('01-jan-2015','dd-mon-yyyy') from dual union all
      select 'end1',to_date('02-jan-2015','dd-mon-yyyy') from dual union all
      select 'end2',to_date('13-jan-2015','dd-mon-yyyy') from dual union all
      SELECT 'end3',to_date('15-jan-2015','dd-mon-yyyy') FROM dual UNION ALL
      select 'end4',to_date('17-jan-2015','dd-mon-yyyy') from dual union all
      SELECT 'end5',to_date('19-jan-2015','dd-mon-yyyy') FROM dual UNION ALL
      SELECT 'end6',to_date('20-jan-2015','dd-mon-yyyy') FROM dual
    )
    ,start_table (start_id, start_dt) AS (
      select 'start0',to_date('31-dec-2014','dd-mon-yyyy') from dual union all
      select 'start1',to_date('03-jan-2015','dd-mon-yyyy') from dual union all
      select 'start2',to_date('05-jan-2015','dd-mon-yyyy') from dual union all
      select 'start3',to_date('07-jan-2015','dd-mon-yyyy') from dual union all
      select 'start4',to_date('08-jan-2015','dd-mon-yyyy') from dual union all
      SELECT 'start5',to_date('14-jan-2015','dd-mon-yyyy') FROM dual
    )
    , start_and_end as (
      select -1 rowtype, end_id id, end_dt dt from end_table
      union all
      select 1, s.* from start_table s
    )
    , running_count as (
      select se.*,
        sum(rowtype) over(order by dt, rowtype desc) cnt
      from start_and_end se
    )
    , filtered_ends as (
      select rowtype, id, dt from (
        select rc.*,
          min(decode(rowtype,-1,cnt)) over(
            order by dt, rowtype desc
            rows between unbounded preceding and 1 preceding
          ) mincnt
        from running_count rc
      )
      where cnt >= nvl(mincnt,0) or cnt >= 0
    )
    select * from (
      select rowtype, id,
      row_number() over(partition by rowtype order by dt) rn
      from filtered_ends
    )
    pivot(max(id) for rowtype in(1 st_id, -1 end_id))
    order by rn;
    

    ST_ID END_ID RN

    ---------- ------ ------

    1 start0 end0

    2 Start1 end2

    3 Start2 end3

    4 start3 bout4

    5 debut4 end5

    Debut5 6 end6

  • Creation of XML to relational Tables Using java code

    I would like to create an XML document querying relational tables in java

    try {}

    connection = getConnection().

    final String qryStr = "sΘlectionner the XMLElement (foo, 'bar') from dual;

    final OracleXMLQuery qry = new OracleXMLQuery (connection, qryStr);

    final String xmlString = qry.getXMLString ();

    } ....

    I expect this to give the result depending on whether I get the statement being executed in SQL Developer

    Select XMLElement (foo, 'bar') of double

    < FOO > bar < / FOO >

    Instead, I get

    <? XML version = "1.0"? >
    oracle.xml.sql.OracleXMLSQLException < ERROR >: character ')' is not allowed in an XML tag name. < / ERROR >

    What is the right way to go about this?

    What is the right way to go about this?

    Not really.

    OracleXMLQuery class is the implementation of Java-side API DBMS_XMLQUERY.

    It is mainly designed to generate a canonical XML document of a SQL query.

    Assuming a query "SELECT col1, col2 FROM my_table", the resulting XML document should appear as follows:

    123

    ABC

    456

    XYZ

    ...

    So in your test, since the resulting column is not an alias (XMLElement), you actually try to build something like this:

    bar

    which of course is not valid, so the error message.

    If you want to generate only the bar output, just use a regular PreparedStatement with your query and access the document in the result set with the appropriate getter.

  • How do the archiving of content through java code

    I need consignment content through java code.

    Summary of the problem: If someone send an email to a specific account this attachment automatically checkin to content server and the required metadata is read from the subject and message body.

    Now I have the problem that I'm not able to record of attachment to the content server. I have all the required metadata and the attachment that is extracted from an e-mail.

    Please someone help me, how I'm going to call the consignment through java code.

    Hello Deepak,

    Try the code below and let me know how it goes, I wrote all code example for you

    Note: When you find '<>> ', you need to write real values.

    import java.io.BufferedReader;

    import java.io.DataInputStream;

    Import oracle.stellent.ridc.IdcClientManager;

    import java.io.File;

    import java.io.FileInputStream;

    to import java.io.FileNotFoundException;

    to import java.io.FileOutputStream;

    import java.io.IOException;

    import java.io.InputStream;

    import java.io.InputStreamReader;

    Import oracle.stellent.ridc.IdcClient;

    Import oracle.stellent.ridc.IdcClientException;

    Import oracle.stellent.ridc.IdcClientManager;

    Import oracle.stellent.ridc.IdcContext;

    Import oracle.stellent.ridc.model.DataBinder;

    Import oracle.stellent.ridc.model.DataObject;

    Import oracle.stellent.ridc.model.DataResultSet;

    Import oracle.stellent.ridc.model.TransferFile;

    Import oracle.stellent.ridc.model.impl.DataObjectEncodingUtils;

    Import oracle.stellent.ridc.protocol.ServiceResponse;

    public class servicesTest {}

    The University Complutense of MADRID soldev3 connection string

    Private final public static String idcConnectionURL = "idc://UCM path";

    private public final static String username = "weblogic";

    public IdcClient getUCMConnection()

    throws IdcClientException, IOException {}

    ClientManager IdcClientManager = new IdcClientManager ();

    Customer IdcClient = clientManager.createClient (idcConnectionURL);

    UserContext IdcContext = new IdcContext ("username");

    customer feedback;

    }

    ' public void checkinFile (String Filename, String Filepath) survey IdcClientException, IOException {}

    System.out.println ("in the createUser method..");

    IdcClient client = getUCMConnection();

    DataBinder binding = client.createBinder ();

    System.out.println ("in the checkinFile method...");

    binder.putLocal ("IdcService", "CHECKIN_UNIVERSAL");

    binder.putLocal ("dDocTitle", ""> "");

    binder.putLocal ("dDocName", ""> "");

    binder.putLocal ("dDocType", ""> "");

    binder.putLocal ('dDocAuthor', 'sysadmin');

    binder.putLocal ('dSecurityGroup', 'Public');

    binder.putLocal ('xlanguage', ""> "");

    binder.putLocal ("dOriginalName", Filename);

    binder.addFile ("primaryFile", new TransferFile (new File (Filepath + Filename)));

    UserContext IdcContext = new IdcContext ("username");

    client.sendRequest (binder, userContext);

    System.out.println ("After checkinFile method...");

    }

    Public Shared Sub main (String [] args) throws IdcClientException,

    FileNotFoundException,

    IOException, Exception {}

    MAK servicesTest = new servicesTest();

    mak.checkinFile (">",">" ");

    }

    }

    Thank you

    MAK

  • Automatically insert the current date at the opening

    How can I have a text field automatically up to date with the current date of the system at the beginning of the document clock?

    I have a read-only text field called "Today's Date" and I can get this works using the following script:

    this.getField("Current_Date").value = util.printd ("mmmm dd, yyyy", new Date());

    Unfortunately, this doesn't seem to be very consistent.  How can I get it to run and check again the clock system to the current date, each time the document is opened?

    Thank you in advance for your help!

    You must place it in the form of script at the level of the doc, so that it runs every time

    the file is opened. Look under Tools - JavaScripts - Document JavaScripts.

Maybe you are looking for