Problem in using View Object for validation

Hi,
I have defined a simple swing form to practice. It has one Entity Object and two View objects. One of these view objects is an updatable VO based on the EO and the other one has a simple "select count(*)" from a table. I defined a method validation on one of the EO attributes to see how can i use the VO for validation. On the other hand i defined the Application Module to use both of my views. As far as i undrestood, when i define a VO for AM, the AM will instantiate it the first time it starts running. Here is the code inside the method validation for FirstName attribute:
/**Validation method for FirstName
public boolean validateFirstName(String data) {
ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("CountEmployeeInstance");
if (vo == null) {
System.out.println("vo is null");
else {
vo.executeQuery();
if (vo.hasNext()){
System.out.println("count = " + ((CountEmployeeRowImpl) vo.next()).getCount());
else {
System.out.println("vo has no next");
return true;
The problem is that vo.executeQuery() does not return any record. In fact the vo.hasNext() returns false and i get the message "vo has no next" on the console. Please pay attention that the VO's sql statement is SELECT COUNT(*) and it always returns a record. I found that if i use vo.closeRowSet() before vo.executeQuery() everything works fine.
Please tell me that what is my problem and why is it working like this?
Best Regards,
Alireza Vali

Chris,
1- Every thing is fine with the ADF model layer in this practice. I have tested it by using Test option on AM and it works. It works exactly the same as how it works throug swing UI that i use for it.
2- The VO is beeing found and as you see in the code, i have tested it by "if (vo == null)" just after the statement which finds it and vo is not null which means it has been instantiated by AM as it was supposed to.
3- The VO's SQL statement is "SELECT COUNT(*) FROM EMPLOYEE" with no where clause. I have 14 records in this table.
Every thing is OK with swing form. It runs and shows the records and all the binded operations like "next record", "previous record" and so on work perfectly on the records.
4- The code i used is a combination of two examples. Example 9-7 and 9-8 in pages 9-12 and 9-13 of mentioned document.
Now my findings:
I changed the code to the following:
    /**Validation method for FirstName
    public boolean validateFirstName(String  data) {
        ViewObject vo = getDBTransaction().getRootApplicationModule().findViewObject("MaxEmployeeIdInstance");
        if (vo == null) {
            System.out.println("vo is null");
        else {
            //vo.closeRowSet();
            vo.executeQuery();
            System.out.println("Row Count = " + vo.getRowCount());
            System.out.println("Default Slot = " + vo.getCurrentRowSlot());
            vo.next();
            System.out.println("Slot after next() = " + vo.getCurrentRowSlot());
            vo.reset();
            System.out.println("Slot after reset() = " + vo.getCurrentRowSlot());
            vo.first();
            System.out.println("Slot after first() = " + vo.getCurrentRowSlot());
            vo.last();
            System.out.println("Slot after last() = " + vo.getCurrentRowSlot());
            System.out.println("----------------------");
            vo.executeQuery();
            System.out.println("Deafault index = " + vo.getCurrentRowIndex());
            vo.next();
            System.out.println("Index after next() = " + vo.getCurrentRowIndex());
            vo.reset();
            System.out.println("Index after reset() = " + vo.getCurrentRowIndex());
            vo.first();
            System.out.println("Index after first() = " + vo.getCurrentRowIndex());
            vo.last();
            System.out.println("Index after last() = " + vo.getCurrentRowIndex());
            System.out.println("Slot Before First = " + vo.SLOT_BEFORE_FIRST);
            System.out.println("Slot Beyound Last = " + vo.SLOT_BEYOND_LAST);
        return true;
    }Here are the results :
Row Count = 1
Default Slot = 0
Slot after next() = 3
Slot after reset() = 0
Slot after first() = 0
Slot after last() = 0
Deafault index = 0
Index after next() = -1
Index after reset() = 0
Index after first() = 0
Index after last() = 0
Slot Before First = 2
Slot Beyound Last = 3
As you see, after the execution of the statement "vo.executeQuery()" the The RowIterrator pointer is not pointing to the slot before the first record but it is pointing to the first record itself. And that is why the statement "if (vo.hasNext()" returns false because we just have one record and RowIterrator Index is standing on that record and there is no next record present. The very important thing is that even reset() method does not set the index to the slot before the first record and it sends it to the first record.
After that, i took the statemet "vo.closeRowSet()" out of the comment and here are the results:
Row Count = 1
Default Slot = 2
Slot after next() = 0
Slot after reset() = 2
Slot after first() = 0
Slot after last() = 0
Deafault index = -1
Index after next() = 0
Index after reset() = -1
Index after first() = 0
Index after last() = 0
Slot Before First = 2
Slot Beyond Last = 3
These are the exact things that we expected from the first. After query execution, the pointer is set to the slot before first record and the reset() method does its defined job which is sending the pointer to the slot before the the first record.
My Assumptions:
The Rowset which is created by AM is somehow different from the RowSet which you create in your program. I am absolutely sure that this functionality is not a bug but a design decission. I look at my simple program and see that when it runs, the data is queried and shown on the screen which is all done by AM by instantiating my VO and executing the query on it. AM reasonably must put the RowSet pointer on the first record and not the slot before first record. And i am sure that if i use reset() method on the shown RowSet, the pointer goes to the first record and the data on the screen does not get cleared. Whe we use vo.closeRowSet() and execute the query again, the AM made RowSet is closed and a new one is created and the new RowSet is your's not AM's so it functions as you expect.
Best Regards,
Alireza Vali

Similar Messages

  • Problem with view object for global variables

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    We are using view object with transient attributes for global variables.
    we defined the view as explained here:
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    also we defined one of the attributes as primary key.
    When we start to test our application with disable connection pooling we got some problems.
    sometimes the row in the global view object is deleted.
    (for example after using executeEmptyRowSet on other view object).
    it looks strange, we couldn't fוnd why does it happen.
    Any idea?

    As Timo said, it is very hard to help without source.
    Are you sure that you do the next step:
    After the call to super.prepareSession(), add code to create a new row in the transient view object and insert it into the view object.

  • Getting error while importing metadata using View Objects

    Hi All,
    I am trying to create a repository using View Object in OBIEE 11.1.5.1 but getting error while viewing the data, after importing the metadata in the repository "[nQSError: 77031] Error occurs while calling remote service ADFService11G. Details: Runtime error for service -- ADFService11G - oracle/apps/fnd/applcore/common/ApplSession".
    I am also getting error "žADFException-2015: The BI Server is incompatible with the BI-ADF Broker Servlet: BI Server protocol version = null, BI-ADF Broker Servlet protocol version = 1" during testing my sample which is deployed to Admin server. I followed BI Adminstrator help file guide in order to create the sample for creating repository using view object.
    Admin server log says
    [2011-09-27T02:59:03.646-05:00] [AdminServer] [NOTIFICATION] [] [oracle.bi.integration.adf] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b260b57746aa92d3:-1f9ca26:1328fcfd3e6:-8000-0000000000006744,0] [APP: BIEEOrders] [[
    QUERY:
    <?xml version="1.0" encoding="UTF-8" ?><ADFQuery><Parameters></Parameters><Projection><Attribute><Name><![CDATA[Deptno]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute><Attribute><Name><![CDATA[Dname]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute><Attribute><Name><![CDATA[Loc]]></Name><ViewObject><![CDATA[AppModule.DeptViewObj1]]></ViewObject></Attribute></Projection><JoinSpec><ViewObject><Name><![CDATA[AppModule.DeptViewObj1]]></Name></ViewObject></JoinSpec></ADFQuery>
    [2011-09-27T02:59:04.199-05:00] [AdminServer] [ERROR] [] [oracle.bi.integration.adf.v11g.obieebroker] [tid: [ACTIVE].ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: b260b57746aa92d3:-1f9ca26:1328fcfd3e6:-8000-0000000000006744,0] [APP: BIEEOrders] java.lang.NoClassDefFoundError: oracle/apps/fnd/applcore/common/ApplSession[[
         at oracle.bi.integration.adf.ADFDataQuery.makeQueryBuilder(ADFDataQuery.java:81)
         at oracle.bi.integration.adf.ADFDataQuery.<init>(ADFDataQuery.java:70)
         at oracle.bi.integration.adf.ADFReadQuery.<init>(ADFReadQuery.java:15)
         at oracle.bi.integration.adf.ADFService.makeADFQuery(ADFService.java:227)
         at oracle.bi.integration.adf.ADFService.execute(ADFService.java:136)
         at oracle.bi.integration.adf.v11g.obieebroker.ADFServiceExecutor.execute(ADFServiceExecutor.java:185)
         at oracle.bi.integration.adf.v11g.obieebroker.OBIEEBroker.doGet(OBIEEBroker.java:89)
         at oracle.bi.integration.adf.v11g.obieebroker.OBIEEBroker.doPost(OBIEEBroker.java:106)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.applcore.common.ApplSession
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
         ... 38 more
    Please suggest how to make it work.

    Hi,
    Thanks for providing the online help URL, i have already completed the steps mentioned in URL
    I am able to import metadata using view object but getting above error("[nQSError: 77031] Error occurs while calling remote service ADFService11G. Details: Runtime error for service -- ADFService11G - oracle/apps/fnd/applcore/common/ApplSession".") while validating the data.
    It fails at step 5 of "To import metadata from an ADF Business Component data source:" section of above URL.

  • Problems creating extension (View Object) in JDeveloper 9.0.3.5

    Note: I originally posted this on the JDeveloper forum - but I was told to post it in this forum.
    This is on Windows XP Pro SP2 with JDeveloper 9.0.3.5 - patch 6469392 (appropriate for 11.5.10.6).
    I'm trying to create an extension for a view object for the Oracle Applications Framework. I've exported the appropriate MDS repo contents to my system using export. One of the first issues I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
    Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
    I've encountered these strange "readonly" errors all along the way. When I try to create the VO itself, I notice the wizard is in readonly mode, preventing me from associating query columns with view attributes (I cannot change a view attribute for a query column for many of the query columns). Why are things in readonly mode?

    I've seen is the step where I import the the business components XML file (server.xml) and I get the following warning:
    Warning: This Business Components Package was built with an earlier version of Oracle Business Components for Java. Unable to upgrade since it is readonly. oracle.apps.pos.isp.server
    Ans : VO , EM and AM related xml files not need to import to MDS, only PG and Region related xml file need to import to MDS.

  • Use view object as table in attribute expression of view object

    Hi. I have a view object for which I need to add some transient attributes associated to a SQL expression which works good. But when I need to define an attribute expression associated to a view object expression, not table, the framework doesn't recognize it. It is, when I want to use an expression like this:
    select attribute from MyViewObject where id=EntityObject.id
    I know I can call EntityObject.id but not use the view object MyViewObject as a table. Is it possible? Is there a way to do something like this? Greetings.

    Hi Timo. The use case consist of having a VO with static values and there is another VO that references as foregin key the previous VO, something like:
    VO1: Statuses of Vendor
    VO2: Vendor detail with attributes including the status
    In af:table component I want to show vendor info showing the status name and not the id of the status. I thought there was something like hibernate in which I could query the VO as a table. Greetings.

  • May I use Exception Handling for validation ?

    Hello All,
    Can any one know about that may i use exception handling for validation in my report program.
    Please if its possible then give me some Example...
    Thanks.

    Hi Niraj,
    Exception is not at all raised or handled in the given example.
    There are so many document available in the SCN regarding OO ABAP you can read that.
    As far as validation of a field ( Selection screen ) of course we can do that but I don't see any advantage more over it will make your code unnecessarily complex.
    Regards
    Bikas

  • Using regular expressions for validation in i18n

    Can we use regular expressions for validation of inputs in a java application taking care of i18N aspects too. Zip code for different locales are different. Can we use regular expressions to validate zipcode inputs from different locales

    hi,
    For that shall i have to create individual patterns for matching the inputs from different locales or a single pattern will do in the case of validating phone nos. around the world, zip codes etc. In case different patterns are required, programmer should have a konwledge of difference in patters for different locales.
    regards
    sdas

  • Problem on using HD media for SD broadcasting in premiere CC

    Hi
    I've got a problem in using HD media for SD broadcasting. I use to get HD media from all sort & with differnt size. But we are broadcasting in SD, but I don't know how to keep a maximum quality. I've got a blackmagic card. We are brodcasting on SD 720-576 (Widescreen 16-9)
    Could you please tell me on what sort of sequence should I work & what should I do when exporting my files to keep the maximum quality possible?
    Is that better to work on an HD sequence & then to export in SD or is that preferable to make your own sequence (with the broadcast settings) and then resize the clips &...
    Jim

    Perhaps too much Christmas Cheer?
    Not enough more like it.   Making up for it now.
    PAR  = pixwel spect ratio
    - seemed ok to me when I typed it. I knew what I meant despite what I typed.
    An SD Sequence from HD footage for Broadcast  ( such as a TVC) would be difficult in how one would work graphics (design placement and aspect) and also be very dissapointing for the client thru preview and approval process.
    I have just been working on 9 TVCs for a Pacific Island country  who only broadcast widescreen from SD media.
    I can assure you that out puting sd for this purpose is heartbreaking.

  • Problem using View Object in Java

    I am creating a simple Java class to use a view object (companiesView)that I created and tested in JSP with the following code:
    String where="EID = " + eid;
    companyAppModuleImpl cam=new companyAppModuleImpl();
    CompaniesViewImpl cv=cam.getCompaniesView1();
    cv.setWhereClause(where);
    cv.executeQuery();
    RowSet rs= cv.getRowSet();
    return rs.first().getAttribute("Name").toString();
    I got
    java.lang.NullPointerException
    at setWhereClause
    What step(s) did I miss?
    If you know where I can find such samples, please let me know.
    Thank you.

    Hi,
    You cannot instantiate an application module using the new operator. You have to use the Configuration class. I quote this from the JDeveloper help.
    <quote>
    Use the method oracle.jbo.client.Configuration.createRootApplicationModule().
    Pass this method the package-qualified name of your application module and the name of the configuration you want to use. For example, to instantiate OnlineOrders.OnlineOrdersModule in local mode, you would use: ApplicationModule myAM = Configuration.createRootApplicationModule("OnlineOrders.OnlineOrdersModule", "OnlineOrdersModuleLocal");
    </quote>
    Hope that helps.

  • Problem using view objects

    i am new on jdeveloper. i can define objects in model. i can define objects in view controller. but i can't use model-objects from the view controller. what is the right way to do it?

    Have you already been through all of our examples, tutorials, and documentation available at:
    http://otn.oracle.com/products/jdev
    ??

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • How to use view objects in entity impls?

    Hi!
    I would like to access a view object to implement business logic
    in an entity impl class method. How can this be done? More
    precisely I would of course like to do this in the context of
    the "current" Application Module the Entity "lives" in. I think
    this has to be possible because you can use a list validator for
    an entity objects attribute, which gets it's data out of a view
    object.
    Any help would be very welcome!
    Regards
    Stefan

    Stephan,
    Just to make things clear, View Objects access Entity Objects
    and you should implement your busines logic in the entity
    objects. This is the way BC4J was designed. It allows for
    reuse of your components and build different views (View
    Objects) ontop of Entity Objects.
    View objects do query the database and populate the entity
    objects. However, it is from the cached data in the entity
    objects where DML occurs (insert, update, delete). You want to
    put your validation at this level because you do not want to
    make a trip to the database if it does not validate.
    I recommend reading a whitepaper on J2EE development and
    BC4J. The URL
    http://otn.oracle.com/products/jdev/htdocs/j2ee_with_bc4j/j2ee_wi
    th_bc4j.html.
    Happy Reading!
    Hi!
    I would like to access a view object to implement business logic
    in an entity impl class method. How can this be done? More
    precisely I would of course like to do this in the context of
    the "current" Application Module the Entity "lives" in. I think
    this has to be possible because you can use a list validator for
    an entity objects attribute, which gets it's data out of a view
    object.
    Any help would be very welcome!
    Regards
    Stefan

  • Error using View Object in a optionList ?

    Hello,
    I'm use JDeveloper 9.0.3, BC4J+UIXml, and I have a Create form with a optionList tag, populating with a Object View.
    I create a Object View called TipoLocalView.
    My code:
    <bc4j:messageChoice name="Tipo" attrName="SeqTipoLocalCampus"
    prompt="Tipo Local:">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="TipoLocalView"/>
    </contents>
    </bc4j:messageChoice>
    The error message:
    java.lang.NullPointerException
    at oracle.cabo.data.jbo.ui.data.ViewObjectDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.TableDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.CachingDataProvider.init(Unknown Source)
    at oracle.cabo.ui.data.provider.DataProviderStack.addDataProvider(Unknown Source)
    at oracle.cabo.ui.LogicalNodeRenderingContext.addDataProvider(Unknown Source)
    at oracle.cabo.ui.composite.CompositeRenderingContext.addDataProvider(Unknown Source)
    at oracle.cabo.ui.laf.base.DataScopeRenderer.prerender(Unknown Source)
    at oracle.cabo.ui.BaseRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.renderWithNode(Unknown Source)
    at oracle.cabo.ui.composite.UINodeRenderer.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.BaseUINode.render(Unknown Source)
    at oracle.cabo.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(Unknown Source)
    My questions:
    1. The v0Name used in a optionList must be the same of the tag bc4j:viewObjectDef...> on top of page ?
    2. What I need make for dynamic optionList operate with Object View ? I need create just Entity Object+View Object ? Or, I need create Entity Object+View Object+Application Module ? What I do for solving this problem ?
    thanks,
    Danilo

    "1. The v0Name used in a optionList must be the same of the tag bc4j:viewObjectDef...> on top of page ?"
    yes. but don't forget: you need a particular viewobject for your optionlist. so if you want to manipulate data in in one viewobject using an optionlist, you must have 2 viewobjects.
    "2. What I need make for dynamic optionList operate with Object View ? I need create just Entity Object+View Object ? Or, I need create Entity Object+View Object+Application Module ? What I do for solving this problem ?"
    depending on your business model you don't necessarly need an entity object, but if you are working with database tables, you usually do. to populate your viewobject, you need an application module.
    see the following thread for information sources about bc4j: BC4J must-read ?
    trevi

  • Use View Object with Alternative Data Sources in View Link

    In my case, I created a view object based on alternative data source (not with SQL query). I have setQuery(null) in the override create() function for this View Object. When I use this View Object at the destination end of the View Link, the setQuery(null) will raise Jbo-26016 exception (You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.) which does not allow me to do that. I looked Avrom's Framework for Database API-Based ADF BC, in which he override the DBTransaction and CallableStatement in order to intercept the default query clause set by the View Link. I'd like to see if there is any alternative ways to achieve my objective?

    Just following up what I found so far. I'm trying to use customized View Object based on alternative data source at the destination end of View Link with ADF 10.1.3.
    1. For the View Object at the destination end of View Link, I can not call setQuery() which will raise Jbo-26016 exception.
    2. I can omit the setQuery(null) call in my customized ViewObjectImpl, and as long as there is no SQL statement in the View Definition XML, it won't cause problem when calling the executeQueryForCollection() of the super class.
    3. The override executeQueryForCollection() must call the super.executeQueryForCollection() in order to get appropriate result (I tried to skip the call and it does not give back any results)
    4. The funny thing is, when I make getQuery() call in my customized ViewObjectImpl (I'm just trying to double check if the Query object is clean or not), the query object is set to "SELECT FROM" following the getQuery() call, and which causes the exceptions when I call super.exeuteQueryForCollection(). I found out later from the Javadoc API which is implemented in that way.
    So I guess my case is resolved by not making specific call to setQuery(null).

  • Is it mandatory to use Business object for data transfer and work flow?

    <font size="3">
    <pre>
    In our enterprise projects we deal with some screens where we add or update some data and again
    we retrieve that data and display to user in various ways like displaying on screen as
    a report or viewing in excel etc.. Most of the times, though we identify the business objects
    based on the nouns in requirements document, really while implementing there will not be any
    business logic in the objects. Almost all the objects which we identfy as business objects
    may have methods like add, delete, update and retrieve methods. Still in these cases, is it required to
    have business objects or can we use transfer object to send the data for saving and retriving or any other
    pattern/guideline is there for dealing such cases?
    I really appreciate your comments on this topic.
    Also I apologize ahead of time if my explanation is not clear to you.
    </pre>
    </font>
    <p>
    Thanks in advance.
    <p>
    Regards,
    <p>
    Rizwan.

    In my opinion, DAO pattern would be suitable for you. Generally the DAO (Data Access Object) will have the CRUD (create, read, update, delete) methods to retrieve data from data-source (e.g. database). Based on the data it will create the DTOs (Data Transfer Objects) and pass them to the caller. It will also receive the DTOs from the caller and save it the data-source. Thus in your case you can
    - remove the CRUD methods from the Business Objects (BO) and make them pure DTOs and use them with DAOs (If you are using JDBC codes inside your application and you don't have much of validation or processing logic in your BOs).
    http://www.corej2eepatterns.com/Patterns2ndEd/DataAccessObject.htm
    OR
    - use BOs in combination in DAOs (if using the database connection from a pool and BOs are having complicated processing logic).
    http://www.corej2eepatterns.com/Patterns2ndEd/BusinessObject.htm

Maybe you are looking for

  • IPod no longer mounting on Desktop or appearing in iTunes sidebar

    After upgrading to iTunes 7 (7.0.2 installed), my iPod with Video will no longer mount on the desktop and does not appear in the iTunes sidebar. When I am recharging/updating the content of my iPod, I am unsure when to disconnect, as I am getting 'Do

  • .dng files not showing as thumbnails in Mac Finder

    Hi. I'm in the process of converting to Lightroom for my photos on my Mac, and when I've downloaded the sample .dng files for the tutorials I notice that they do not appear in my Mac Finder folders as thumbnails. Clearly this is a bit of a disadvanta

  • Can't see my ipad apps in itunes

    I've got my iPad connected to ITunes (new version 11.3.0.54) and I can't see any of the apps that are on my iPad listed.  It states at the top of the page that there are 117 apps and show's my iPad screen pages on the right hand side of the page but

  • Automator for Web feed- eReaders

    There is one function I have yet to see a piece of software address. That is automating the process of grabing web text and sending to an eReader. Mine happens to be a Sony PRS-500, so I end up having to use Calibre to port content from my Mac (thank

  • Firefox will not launch, including in Safe Mode or the Profile Manager

    Firefox on my other machine will not visibly launch. There is occasionally a message stating "you already have a Firefox session running, please close it before opening a new one" when I make a second attempt. I have tried to follow all the direction