Create view link programatically

Hi all,
I am working on this weird requirement.
Basically, I have to create a detail table on a search resullt table. The search result is seeded search, for Item Advance search in Oracle PIM module which is not based upon a VO. The search result table is dynamically built at run time in the EgoItemSearchHelper class and that's where they build the search result VO (EgoItemSearchResultsVO).
Now, I need to access this VO in the controller class, and create a view link programatically between details table VO and this VO. The problem is since I do not have Impl class for the EgoItemSearchResultsVO, how do I accees the column that is the key attribute. Second I do not know how to create view link between the two VOs programatically.
Please help it's urgent.
Thanks

Pratap, My problem is the seeded VO is in seeded AM and my details VO will be in my custom AM, I don't know if we can have a view link between View objects that are in different AMs.
To bypass that problem, I tried to create a VO in the seeded AM programatically and then created a view link. Now since the AM is seeded, and I am adding my details VO to this AM programatically, I thought of creating a table also programatically on the detais VO.
In the end it does not work, I end up getting a show button on the main table, but when I click I get an error (Cannot find <null> attribute in the EOGITEMSEARCHRESULTVO) which is the seeded VO class. Unfortunately there is no boolean variable on the dynamic seeded VO, so don't know what to put in oatablebean.setDetailViewAttributeName("") method;
Any clues on this, appreciate all responses from the forum gurus.
ViewObject voEmp = oaapplicationmodule.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
ViewObject voEmp = am.createViewObject("MyEmp", "xxuss.oracle.apps.ego.item.eu.server.DetailsOrderLinesVO");
AttributeDef[] prjLinkAttrs = new AttributeDef[]{oaapplicationmodule.findViewObject("EgoItemSearchResultsVO").findAttributeDef("INVENTORY_ITEM_ID_B")};
System.out.println("definition for attr = "+ prjLinkAttrs[0]);
AttributeDef[] taskLinkAttrs = new AttributeDef[]{voEmp.findAttributeDef("InvId") };
ViewLink vl = am.createViewLinkBetweenViewObjects("MyLink3",
"DetailInv", // accessor name--more on this below
am.findViewObject("EgoItemSearchResultsVO"), // master
prjLinkAttrs, // department attributes
voEmp, // detail
taskLinkAttrs, // employee attributes
null); // assoc clause
System.out.println("view link =" + vl.getName());
OATableBean tb = (OATableBean)createWebBean(oapagecontext,TABLE_BEAN,null,"table");
tb.setViewUsageName("MyEmp");
OAMessageStyledTextBean beans = (OAMessageStyledTextBean)createWebBean(oapagecontext,MESSAGE_STYLED_TEXT_BEAN,OAWebBeanConstants.VARCHAR2_DATATYPE,"number");
beans.setPrompt("column1");
beans.setViewUsageName("MyEmp");
beans.setViewAttributeName("InvId");
tb.addIndexedChild(beans);
oatablebean.setDetail((OAWebBean)tb);
oatablebean.setDetailViewAttributeName("SelectFlag"); // I just tried this, SelectFlag is not a boolean attribute though, is there a way to create a boolean attribute programatically for seeded VO EGOITEMSEARCHRESULTVO and set it here, will it help
oatablebean.setAllDetailsEnabled(true);

Similar Messages

  • Adding view link programatically

    Hi,
    I have created a view link programatically but dont know how to add it to AM.Can anyone tell me how to add this view link to AM Programatically.
    Thanks,
    Anupama

    Hi,
    I have created a view link programatically but dont know how to add it to AM.Can anyone tell me how to add this view link to AM Programatically.
    Thanks,
    Anupama

  • Unable to create view links ....

    Hi,
    when i try to create a view link on my custom VO's ..im getting the following error:Ia m not using any standard VO's but still iam facing this issue
    Error occurred trying to activate the wizard pageView objects.
    Unable to find referenced object.
    Object=oracle.apps.ego.common.server.EgoChangeOrderCreationVO
    Owner=xxcus.apps.xo2c.sample.server.EgoChangeOrderCreationVOEx
    Exception:oracle.jbo.dt.objects.jboReferenceException
    I checked for these files on both the server and my local jdev.
    only the PosShipmentsCustomVO.xml is present both on the server and my local jdev.the .class file is not there on the server.
    Any help is greatly appreciated.
    Thanks

    Hello,
    Check the developer's gude for the following:
    Developing Business components -->Creating and modifying View Objects, view Links, Application Modules -->Ways to create View Link instances in the code.
    Do let us know if you are still stuck some where.
    Pavan K

  • Is it possible to create view link on programatic VOs

    I tried creating a view link between 2 programatic VOs but did not get a clean way to get the where clause.
    It appears that the where clause has to be dependent on the EOs which does not exist in this case.
    On creating the view link,i need the following where clause:
    VO1.col1 = VO2.col1 ( i.e. :Bind_col1 = VO2.col2)
    Is this possible ? The query getting built here is showing up as null bind variable i.e. :Bind_col1 is null
    Please suggest how to get over this issue.

    How/where do you want to accomplish it?
    Within the document? Using Acrobat? Using another application?
    Using Acrobat within the document would be possible using Acrobat JavaScript. You can access the annotation objects of your document, and you then can evaluate the properties of each of these objects. Have a closer look at the Annotation Object section in the Acrobat JavaScript documentation.
    You will look for the contents property, and evaluate its content. When you have found something looking like a URL, you can create a link (using the rect property of the annotation), and you have what you want; you might then think to destroy the annotation, as it may overlay the link.
    Hope this can help.
    Max Wyss.

  • How to pass parameter when create view link

    Hi,
    I used R12 to implement OAF. I create a VO with paramenter such as SELECT item_code,parent_item_code,month_budget_id
    FROM cux_ce_month_budget_lines_t
    where month_budget_id=:1
    But when I create VL for this VO. It seems the parameter :1 can not be passed.
    Could some one to help lookinto this?
    Best Regards,
    Eileen

    You donot need to pass parameter while creating the View Link. Once the view link is created then you assign the bind parameter to the master VO and execute the View link. The Child VO would automatically be executed.

  • How to create view link?

    Hi,
    Would somebody please tell me the brief steps for creating a view link.

    OAF ... Oracle Applications Framework? As in 'a technology or product question'? (See the description of this forum for reference to why I ask.)
    Please note that Oracle has over 100 products and technologies. When asking questions about the product or technology, it is important to either ask in context (the correct forum) or make sure you give lots of detail to alloow the readers to actually be able to identify the product and the platform.

  • Create View Link Definitions - Problem

    Hi,
    I was trying to define a relationship between two view objects using the view link icon, but I always get this error messages:
    BME-99004:A java runtime exception has occurred,
    BME-02038:Exception thrown during validation.
    Can anyone help me? It's very important!!
    Thanks
    null

    Ok, I'm not Lisa but do you still want my help? ;o)
    We need to go back to basics for this and also provide more information.
    I assume you are using ADF Business Compoments,
    What version - I'll assume 10.1.3
    How are you creating the link; what are you actually doing when yuo get this error - are you running.
    Here is what I would do - create two default EOs EMP and DEPT and create two default VOs on them, drag the VOs onto a Business Components diagram and add a link to it - does that work - if so, what is different. If that doesn't work then we have something to go on.
    Regards
    Grant Ronald
    Oracle Product Management

  • Create view link between two view objects (from programmatic data source)

    Hi Experts,
    Can we create a link between two view objects (they are created from programmatic datasource ; not from either entity or sql query). If yes how to create the link; ( i mean the like attributes?)
    I would also like to drag and drop that in my page so that i can see as top master form and the below child table. Assume in my program i will be only have one master object and many child objects.
    Any hits or idea pls.
    -t

    Easiest way to do this is to add additional transient attributes to your master view object, and then include those additional transient attributes in the list of source attributes for your view link. This way, you can get BC4J to automatically refer to their values with no additional code on your part.

  • JDeveloper error creating view link

    I was attempting to create a view link for Chapter 11 of "Oracle JDeveloper 10g Handbook" and received the following error (restarting JDeveloper did not help):
    Message
    BME-99004: A Java runtime exception has occurred.
    Cause
    This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.bm.uml.validation.AssociationValidation.validateAssociationEnds(AssociationValidation.java:315)
         at oracle.bm.uml.validation.AssociationValidation.validate(AssociationValidation.java:108)
         at oracle.jbo.dt.modeler.validation.BC4JAssociationValidation.validate(BC4JAssociationValidation.java:35)
         at oracle.bm.data.validation.ValidationEngine.validate(ValidationEngine.java:201)
         at oracle.bm.data.cacheimpl.TransactionImpl.validate(TransactionImpl.java:1713)
         at oracle.bm.data.cacheimpl.ProjectCacheImpl.closeTransaction(ProjectCacheImpl.java:5055)
         at oracle.bm.common.registry.CRNWayEdge.createEdge(CRNWayEdge.java:208)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.doCreateEdge(CreateRegisteredShapeTracker.java:537)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.mav$doCreateEdge(CreateRegisteredShapeTracker.java:111)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker$6.performAction(CreateRegisteredShapeTracker.java:336)
         at oracle.bm.diagrammer.LockMonitor.performLockedAction(LockMonitor.java:64)
         at oracle.bm.diagrammer.BaseDiagram.performDiagramLockedAction(BaseDiagram.java:2437)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.processEvent(CreateRegisteredShapeTracker.java:279)
         at oracle.bm.diagrammer.track.TrackerStack.processEvent(TrackerStack.java:403)
         at oracle.bm.diagrammer.track.TrackerStack.pop(TrackerStack.java:198)
         at oracle.bm.diagrammer.track.TrackerStack.safePop(TrackerStack.java:320)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.mousePressed(CreateRegisteredShapeTracker.java:1022)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.mousePressed(CreateRegisteredShapeTracker.java:819)
         at oracle.bm.diagrammer.track.ModularTracker.processEvent(ModularTracker.java:191)
         at oracle.bm.diagrammer.track.CreateRegisteredShapeTracker.processEvent(CreateRegisteredShapeTracker.java:230)
         at oracle.bm.diagrammer.track.TrackerStack.processEvent(TrackerStack.java:389)
         at oracle.bm.diagrammer.BaseDiagramView$53.processEvent(BaseDiagramView.java:719)
         at oracle.bm.diagrammer.PageView$PageViewPanel.fireEvent(PageView.java:2904)
         at oracle.bm.diagrammer.PageView$PageViewPanel.processEvent(PageView.java:3090)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Action
    If further errors occur, you should restart the application.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.
    Message
    BME-02038: Exception thrown during validation
    Cause
    Action
    ________________________________________________________________________________

    Here is the view links code ..
    Project to task and task to subtask is fine .......... form subtaskvo i want to perform recursion ...
    thats what iam not getting ...
    public void createViewLink
    (OADBTransaction dbTransaction, OAViewObject obj,OAViewObject obj1
    ,OAViewObject obj2,OAViewObject obj3) {
    AttributeDef[] prjLinkAttrs = new AttributeDef[] { obj.findAttributeDef("ProjectId") };
    AttributeDef[] taskLinkAttrs = new AttributeDef[] { obj1.findAttributeDef("ProjectId") };
    ViewLink vl = createViewLinkBetweenViewObjects("TestPrjToTestTasksVL","TestPrjToTasksAcc",
    obj,prjLinkAttrs,obj1,taskLinkAttrs,null);
    Row firstDept = obj.first();
    RowSetIterator empsInDeptRowSet1 = (RowSetIterator)firstDept.getAttribute("TestPrjToTasksAcc");
    ViewObject viewObjectForAccessorRowSet = empsInDeptRowSet1.getRowSet().getViewObject();
    AttributeDef[] taskAttrs = new AttributeDef[] { obj1.findAttributeDef("TaskId") };
    AttributeDef[] parentTaskAttrs = new AttributeDef[] { obj2.findAttributeDef("ParentTaskId") };
    ViewLink vl1 = createViewLinkBetweenViewObjects("TaskToTestTasksVL","TaskToTasksAcc",
    viewObjectForAccessorRowSet,taskAttrs,obj2,parentTaskAttrs,null);
    //This link is not working
    AttributeDef[] taskAttrs2 = new AttributeDef[] { obj2.findAttributeDef("TaskId") };
    AttributeDef[] parentTaskAttrs2 = new AttributeDef[] { obj3.findAttributeDef("ParentTaskId") };
    ViewLink vl2 = createViewLinkBetweenViewObjects("TaskToTestTasksVL2","TaskToTasksAcc2",
    obj2 ,taskAttrs2,obj3 ,parentTaskAttrs2,null);
    }

  • View links in multi table relations

    Is it advisable (in terms of performance e. g.), to create view links and view objects as local variables in multi table relations?
    examle: the jdev online help says to use
    such multi table relations like this:
    // A (one) -> B (many) -> C (many)
    ViewLink a2b = appMod.findViewLink("AtoB");
    ViewLink b2c = appMod.findViewLink("BtoC");
    ViewObject aV = a2b.getSource();
    ViewObject bV = a2b.getDestination();
    ViewObject cV = b2c.getDestination();
    while(aV.hasNext())
    Row aR = aV.next();
    while(bV.hasNext())
    Row bR = cV.next();
    while(cV.hasNext())
    Row cR = cV.next();
    I would rather keep everything concerning
    a, b, c together, especially when more
    tables (d, e, ...) are added, like this
    ViewLink a2b = appMod.findViewLink("AtoB");
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    ViewLink b2c = appMod.findViewLink("BtoC");
    ViewObject bV = a2b.getDestination();
    while(bV.hasNext())
    Row bR = cV.next();
    ViewObject cV = b2c.getDestination();
    while(cV.hasNext())
    Row cR = cV.next();
    Is there anything to say against this approach (in term of performance for example). I am not sure to remeber,
    if this was the approach used in the HotelResevationSystem example.
    Thanks.
    Rx
    null

    For this to work you have to either build a view based on the entities from which you need attributes (joined by the FK) or build a ViewObject with the sql statement giving you all the attributes you need.
    The first case enables you the edit the attributes, the second gives you read only access to the attributes.
    What you try to do isn't a master-detail connection, you are doing a join of some tables.
    Timo

  • View link between 2 public view object(PVO)

    Hi,
    Can we create a view link between 2 Public View Object(PVOs)? Is as same as creating view link b/w normal VOs.
    Regards,
    Suresh

    Hi,
    whats mean Public View Object? do you use BI?

  • View link creation on two view objects, and both view objects are populated program(not from sql)

    I have master and detail VO , both views data is loaded in program. Now for show/hide feature, I create View Link Object and using one element from both child and master VO , View Link Object created properly.
    But I can not able to add that view link object into AM.
    Now because of that , I cannot say what is a instance name of that view link object.
    Hence getting following error  -- Invalid or missing view link. Please attach view link with the bean.
    Please can you provide some directions.

    I have master and detail VO , both views data is loaded in program. Now for show/hide feature, I create View Link Object and using one element from both child and master VO , View Link Object created properly.
    But I can not able to add that view link object into AM.
    Now because of that , I cannot say what is a instance name of that view link object.
    Hence getting following error  -- Invalid or missing view link. Please attach view link with the bean.
    Please can you provide some directions.

  • View link between VO from two application modules

    Is it possible to create view link between VOs from 2 different Application modules?

    Here is what it says:
    SymptomsYou have an ADF BC (BC4J) project and you are getting the following error:
    oracle.jbo.domain.Number; local class incompatibleA more detailed error looks similar to:
    oracle.jbo.domain.Number; local class incompatible: stream classdesc
    serialVersionUID = -7171468674200794918, local class serialVersionUID =
    -6507359405709672486
    CauseThis problem is caused by either that:
    You have inadvertently mixed two mutually exclusive domain libraries like "BC4J Generic Domains" (bc4jdomgnrc.jar) and "BC4J Oracle Domains" (bc4jdomorcl.jar).
    or
    You have added the "BC4J Datum" library (bc4jdatum.jar) to your middle-tier class path, and are trying to use a JDBC driver different from the one that ships with JDeveloper 10g in the box.
    The BC4J Generic Domains and the BC4J Oracle Domains are never meant to be used in the same application classpath. They contain different implementations of the same set of classes, one destined for use in Oracle JDBC driver environments, and the other for use with other non-Oracle JDBC drivers.
    The BC4J Datum library is designed for use in a thin-client Classpath that is remotely accessing an ADF Business Components middle tier deployed as an EJB Session bean. It contains only the domain classes (typically jar'ed up as part of the whole Oracle JDBC Driver JAR) without having to have the rest of the JDBC Driver JAR on the thin client. SolutionPlease check if any of the above suggested scenarios is applicable to your application.
    If you have the BC4J Generic Domains and the BC4J Oracle Domains in the same project despite that they are never meant to be used in the same application classpath you will get this error. They contain different implementations of the same set of classes, one destined for use in Oracle JDBC driver environments, and the other for use with other non-Oracle JDBC drivers.
    Goto the Project Properties for you project.
    Select Profiles -> <Profile Name> -> Libraries
    Check in the Selected list (to the right) if you have both BC4J Generic Domains and the BC4J Oracle Domains there. If so, remove the one not appropriate for your project.

  • View Link sql window is non editable

    Hi All,
    I am creating view link between two views using wizard, but when I reach view link sql window it is blank and non editable. any ideas on this?
    Thanks in advance.
    Hitesh

    Hitesh,
    This a very generic case and happens when the source VO join attribute and destination VO join attribute are not of same type, i.e. data type and data length. Make sure that is happening in your case, this will solve your problem.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Advance Table in advance table via view link

    Hi All,
    I have implemented advance table in advance table to show details region data by creating View Link between master and child View Object.
    I have followed all the steps mention in following link
    http://oracleanil.blogspot.com/2010/06/advanced-table-in-advanced-table-via.html
    Now when I am using child VO in details table region it is giving me null pointer exception.
    Please Help.
    Regards,SHD

    Any Clue?

Maybe you are looking for

  • Edit .Gif

    Hi, I am developer not photoshop professional. But for some reason our creative person is absent for some days. Now I want to edit .Gif file. please help me. As per forums discussion I am trying to open the .Gif file using photoshop but it showing me

  • External display and sleep

    I currently have the "acrylic" Apple 20" display and a new MacBook. I have the mini DVI to DVI added to the DVI to ADC. All seems to be working nice, but I'd prefer to close the MacBook while using the desktop display. I already moved the menu over t

  • Can I re-adjust the size of the disk for my virtual environment?

    I installed the vmware fusion and run windows xp.. I want to re-adjust my hard disk. So far 320G disk, half for mac and half for windows. can I adjust this size, e.g. expand the size for mac? if yes, how to do that?

  • Which Linux distribution can I use on Satellite A30

    Hi, i would like to run a Linux distribution on my Satellite A30. Which one would be the best? Any recommendations? Thanks!

  • Connect to database over network

    I have a shared drive set up to multiple computers. How do I go about to connect to a database that is on only on of these computers? Can I put something on the shared drive to access? I am just completely lost here. Thanks.