Using different datasources and different view objects.. (ADF 11g)

In our application we have the need for using two different datasource (an old version and a new verision) - but not at the same time.
Isn't it possible to base a viewobject on top of two sub viewobjects and run time decide which sub viewobject to use?
If possible - could someone please show some code examples?
Thanks...

Hi,
no, not exactly. You can have polymorphic views, but the use case is a different. The transaction is maintained by the AM, so if you want to connect to different data sources then you have to connect to them when starting the application, For this you can configure it for dynamic JDBC connect
Frank

Similar Messages

  • Can a web service be used as the datasource for a View Object?

    Has anyone used a web service as the datasource for a View Object?
    I am trying to do the same thing as "Publishing BC4J Components as a Web Service" example, except I want to recreate the View Objects on the client so that I can iterate through them and display them on a web page.
    I probably have two choices:
    1. Use the web service as the datasource.
    2. Use a file as the datasource with no data and then populate the View Objects from the XML from the Web Service.
    Please advise.
    Thank you.
    Richard Catlin
    SAIC

    You can adapt the examples provided in the BC4J Toy Store demo for how to build a programmatically-populated view object to create a view object that fetches its data from a web service.
    The methods that you need to override are the same for any kind of programmatically-populated view object.

  • I cannot import my AVCHD files by using log and transfer. I can see all the files, but when I add the file to import que it doesnt work, the status is a red (!) and says that its no data. I have tried with different cards and different cardreaders, but it

    I cannot import my AVCHD files by using log and transfer. I can see all the files, but when I add the file to import que it doesnt work, the status is a red and says that its no data. I have tried with different cards and different cardreaders, but it is still the same. Why?!

    Please give us more specific information -
    What make/model camcorder are you using?
    Are you absolutely certain this is AVCHD video?  Tell us more about the video settings you used in the camcorder (eg, frame size, frame rate, quality level)
    Why are you attempting Log & Transfer from a card reader instead of from your camcorder?  Have you tried doing Log & Transfer from your camcorder?
    Are the SD cards straight from the camcorder, unaltered, or are you just using the cards as storage?
    Are you using FCE 4.0 or FCE 4.0.1?

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • I have an iPhone 5, yesterday it wasn't receiving any signal. I reset it and when it cam back on it said plug into iTunes, i did that but now it comes up with error 9006 and 39. What do i do, i have tried different wires, and different plug

    I have an iPhone 5, yesterday it wasn't receiving any signal. I reset it and when it cam back on it said plug into iTunes, i did that but now it comes up with error 9006 and 39. What do i do, i have tried different wires, and different plug in holes, I've left it for the night and tired again this morning.

    Error code 9006 is related to the computer's security software settings, 39 is not listed inResolve iOS update and restore errors try turning the security/anti-virus software off if you are using something like that.  Then you may need to restore via the recovery mode since that is what the graphic of a USB wire connecting to iTunes means, it has already entered recovery mode...see http://support.apple.com/kb/HT1808 for instructions on recovery mode restoring.

  • HT1476 My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones. I'm stumped :/

    My iPhone 4S will charge on a laptop but not from a wall plug. I have tried different boxes and different USB cords from the wall but none work. These boxes and USB cords work for other family members with iPhones and a USB cord that works from the laptop won't work from 3 or 4 different wall boxes that work for others. I'm stumped :/

    Update: It seems as though the phone will charge if I plug it in and then turn it off.  It will not charge while the phone is on.  Also iTunes will not recognize it, so I can't sync or anything.  I read somewhere that it could be a fuse somewhere?? Or maybe the dock connector. Where is the best place to get this repaired?

  • I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?

    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?  Next in Elements 11, how do I load and print different pictures and different sizes options on the same page?
    Thanks,
    Shir

    sbmgrams wrote:
    I have many photos with file extension of .PDD and that Photo Deluxe 4 no longer will operate in Win 7. How can I open?
    See here:
    Reading PhotoDeluxe PDD Files

  • HT4528 Can I put the same information on two different i-phones with different numbers and different ID's?

    Can I put the same information on two different i-phones with different numbers and different ID's?

    Yes and no it really depends on what information you are putting on the devices.

  • TS2771 My ipod touch will not hare no matter what and I've tried many different cables and different ways to charge it. What should I do? If I complain to the Apple store co. will they replace my ipod for free?

    My ipod touch will not hare no matter what and I've tried many different cables and different ways to charge it. What should I do? If I complain to the Apple store co. will they replace my ipod for free?

    - See:
    iPod touch: Hardware troubleshooting
    - Try another cable
    - Try another charging source
    - Look at the dock connector on the iPod. Look for abnormalities like bent or corroded contacts, cracked or broken plastic.
    - Make an appointment at the Genus Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • My problem in using weblogic Datasource and proxy user

    Hello
    I create a DataSource in Weblogic that connect to the database by a proxy user and I have a client application that use this DataSource and create a proxy session , I've written my client application (it's a stand alone client application) code below :
    public static void main(String [] args) {
    OracleConnection conn=null;
    javax.sql.DataSource ds=null;
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
    try{
    Context context=new InitialContext( env );
    ds=(javax.sql.DataSource) context.lookup ("OracleConnection2");
    conn=(OracleConnection) ds.getConnection();
    java.util.Properties prop = new java.util.Properties();
    prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");
    prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1");
    conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop);
    if (conn.isClosed()){
    System.out.println("Connection closed");
    return;
    testJDBC(conn,true);
    for(int k=0;k<10;k++){
    testJDBC(conn,false);
    conn.close(OracleConnection.PROXY_SESSION);
    conn.close();
    }catch(Exception ex){
    ex.printStackTrace();
    It works but my problem is that in line "prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1")" or line "prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");"
    Let me to mention a scenario :
    *1- I type a wrong username or password in my client application and I run the client application it shows me this error : invalid username/password*
    *this error is acceptable*
    *2- then I correct the wrong username or password immediately and run the application again , it shows me this error (at line conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop)) :*
    java.sql.SQLException: Closed Connection
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *3- I run the application again (by correct username and password) but this time it shows me this error :*
    java.sql.SQLException: Unsupported feature
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *4 - if I repeat running the application for multi times every time it shows me the previous error*
    *5- I wait about one minute the problem solved and my application can create proxy session *
    the result is that if I wanna create proxy session by wrong username or password and I get "Invalid username/password" error message , then after correcting username or password I have to wait about one minute and then run the application again_
    Do you know how I can overcome this problem ?
    Thank you

    Hi Jamshid,
    There is same problem observed few days back with us, and we have used the below code, and it got solved. Actually there is a problem observed while using proxy connections on weblogic.
    if(conn instanceof weblogic.jdbc.extensions.WLConnection){
         weblogic.jdbc.extensions.WLConnection cn=(weblogic.jdbc.extensions.WLConnection)conn;
         cn.clearStatementCache();
    http://rocksolutions.wordpress.com/2010/06/04/connection-pool-issue-on-weblogic/
    Hope this helps.
    Thanks

  • Different Datasources and QoQ

    I have to read tables from two different datasources, so I us QoQ
    My first query :
    <cfquery name="qry1" datasource="db1">
    select table1.name,
    table1.phone,
    table1.empID
    from table1
    </cfquery>
    My second query :
    <cfquery name="qry2" datasource="db2">
    select table2.empID,
    table2.address,
    table2.city
    from table2
    </cfquery>
    Then I combine the two using QoQ:
    <cfquery name="qry" dbtype="query">
    select table1.name,
    table1.phone,
    tabel1.empId,
    table2.address,
    tablbe2.city
    from table1, table2
    where table1.empID = table2.empID
    </cfquery>
    This works and gives me what I want. Now the requirement is  to find all info from table1 even if there are no mathches, so I have to use left join but QoQ seems very limited and will not allow left joins.
    How do I read tables from two different datasoruces and then get all info from one table regardless if it is not in the other table, if my above method is incorrect ? (I just typed this so there could be typos)
    Thanks

    If I just want to combine all the data from both tables, would I just have :
    <cfquery name="qry" dbtype="query">
    select table1.name,
    table1.phone,
    tabel1.empId,
    table2.address,
    tablbe2.city
    from table1, table2
    </cfquery>
    It seems like if I take out the WHERE clause, it does not like it.

  • I use 2 iphones with different numbers and different contacts.

    These iphones (a 4 and a 4S) are used as local phones for 2 different countries. As a result I end up adding contacts into the iphone that I am using at any given time. However, the contacts are common and may be required from the other iphone as well. THe iphones have different names and are backed up separately. How can I ensure that if a contact is added to one is also automatically updated to the other? If not automatic, how do I sync them to a common contact list which keeps accreting contacts from both?

    syncing contacts, with either iCloud or iTunes, mean all contacts or nothing. You can set up iCloud, that means adding a contact to one iPhone it will automatically appear on the other one, but all the other contacts will be on both phones, including the ones you might not want there, if you insist on keeping part of your contacts seperate.
    If you don't mind having all contacts on both phones, do the following on both devices:
    Go to Settings - iCloud - login with your Apple ID - turn on Contacts.
    Hope this helps
    Stijn

  • Iterating through master view objects and child view objects in same page

    I am working on a project using ADF UIX and Business Components.
    I have an application module with two view objects one the master view object and the second the detail object. They are related via a view link.
    I would like to iterate through the master view objects displaying a customer name as bold text and then below each customer name I'd like to display the detail records in a table via the detail view object i.e. a seprate table for each customer.
    Is this possible - I haven't had much luck!?
    Thanks in advance.

    That's because
    $(".ms-vb2 a").
    is bringing back all the pieces that have that class with an anchor on the whole page, not just the ones in the .ms-wpContentDivSpace
    I don't know the exact syntax, but I think you need to iterate through all the '.ms_vb2 a' items as well - there are multiple ones, and do something like this inside your other grouping
    $(".ms-vb2 a").each(function(index) {
        var val=$(this).html();
       var val2=val.replace(/_/g," ")
       $(this).html(val2);
    That's not quite right but maybe that will help.
    Robin

  • How to use the Calculated attibute in view object

    Hi,
    I have a view object query with the calculated attribute name as 'TRANCODE' in the below sql.This query works for the initial page loading.
    After the page gets loaded, there is a search section in the same page at the top.
    Here i will have to build the whereclause to the same query and retrieve the values.
    i am using jDeveloper 10.1.3.1, with adf and jHeadstart.
    Can some one tell as how to use the calculated attribute TRANCODE in whereclause?
    SELECT /*+ first_rows(10) */
    BatchCntl.FILE_CNTL_ID,
    CASE WHEN chk_bit(Entry.ENTRY_FLAGS, 2)='Y' OR Entry.ENTRY_SUBSTATUS = 'D' OR Entry.ENTRY_SUBSTATUS = 'J'
    THEN
    CASE eeh.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE eeh.TRAN_CODE
    END
    ELSE
    CASE Entry.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE Entry.TRAN_CODE
    END
    END AS TRANCODE,
    FROM Batch_Cntl BatchCntl, Entry, ENTRY_EDIT_HIST eeh
    WHERE (BatchCntl.BATCH_TYPE = 'E')
    AND (BatchCntl.BATCH_STATUS in ('A','D','R','P'))
    AND entry.in_batch_cntl_id = BatchCntl.BATCH_CNTL_ID
    and Entry.fi_rt = eeh.fi_rt (+)
    and Entry.entry_id = eeh.entry_id (+)
    AND (Entry.ENTRY_STATUS in ('A','D','R','P'))
    ORDER BY BatchCntl.BATCH_CNTL_ID, Entry.entry_id
    regards
    Raj.

    Let's say your application module is com.yourcompany.someapp.services.MyService, and let's say you authored a method like the following in the MyServiceImpl.java file:
      public void doSomething(int i, String s) {
      }and you exposed this AM custom method using the AM editor.
    BC4J design time will automatically create you the com.yourcompany.someapp.services.common.MyService interface that will look like this if you go look at the source code:
    package com.yourcompany.someapp.services.common;
    import oracle.jbo.ApplicationModule;
    public interface MyService extends ApplicationModule {
      public void doSomething(int i, String s);
    }To use your custom method from a client, just cast your ApplicationModule to your custom interface like this:
    import com.yourcompany.someapp.services.common.MyService;
      MyService mySvc = (MyService)yourAM;
      mySvc.doSomething(1,"foo");

  • Dynamic view names in view objects (adf faces bc 10g)...

    I have written an application in adf faces and business components, but would like to be able to add sections to it by simply creating a database view, say with standard names and a suffix, and probably static number of columns (just a read only view). i can handle the front end and logic, but can't see a way to parametise the view names & columns in business component's view objects. I can do things like create a load of dummy views with 10 cols in say selecting 0 from dual then chuck them in the model, which is messy, but would work... Just wondering if there is a cleaner way i can achieve this through the model or any other method, so any ideas that could point me in the right direction would be useful.
    Thanks in advance...
    Tim.

    Hi,
    you may want to investigate into dynamic ViewObjects or dynamicaly adding attributes like example 9 and 29 of http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    See also
    http://www.bloggingaboutjava.org/2006/04/binding-dynamic-view-object/
    Frank

Maybe you are looking for

  • Website login fails on iPad 2 Safari after iOS6 Update

    Upgraded to iOS6 9/19/2012. I just spent half an hour troubleshooting why a site I developed for a client fails its login. Passwords are salted and hashed in Javascript, POSTed to an AJAX PHP page to compare password against stored salted password in

  • What is the documetary interview workflow for Story/Premiere CS5.5?

    I've looked in vain for the answer to this question, which I'm sure is thoroughly documented SOMEWHERE - I just can't find it.  The few things I HAVE found online including at Lynda.com or other paid services involve CS5, which has a different workfl

  • Gallery blur missing after installing 2014

    missing gallery blur after installing 2014 ps.

  • How Do I format my Mac Pro Late 2013

    the mac pro late 2013 is well known the be equipped with a PCIe SSD .... Will the Erase function in disk utility with one time pass Zeros work or will it damage the drive? Thanks

  • All CX* Tables in Local Database are empty

    Hello! We have a one mobile client and at this time i see a problem that all custom tables in local database empty In client folder outbox only one file "Marker". All server component work fine. SRF one for server and client. I don't know for what re