HOWTO: Implementing a ViewObject with Multiple Updateable Dependent Entity

Hi All,
I have implemented this concept in one of my project for (1-1 entity relationship). It worked very well. But I want try with parent child tables like (1 to many). I tried with the code given by "Adrian Nica " in previous thread. But my problem is When I make Parent table as updateable and reference I am not able to create a row for that VO at all.
Steve, I read your reply in previous thread. But that is not helpful when you want create a new row as parent record as reference.
Please help me to solve this....
--Thanks
Rama

Hi,
Thank you for your reply. I tried set all the attributes for parent EO to "Discriminator" which is added as "updateable and reference" in multiple updateable VO. But I am still getting " oracle.jbo.RowCreateException: JBO-25017:" and " Null Pointer Exception".
Do I need to set the child VO also as "discriminator" attributes for that EO.
--Thanks
Rama

Similar Messages

  • Implementing a view Object with Multiple Updateable Dependent Entity Objects

    Hello,
         I want to implement view object with multiple updateable entity object,
         i have refered this link its good https://forums.oracle.com/thread/63721
         here they have explained with 2 table,
         but when we have more then 5 tables and each table have Primary keys , Foreign key , Sequence and  trigger created on it. Then whats steps should i want to fallow.
         if possible some please provide the link or some one help me out how to do this .
         thanks in advance
         cheers

    Has the Advanced View Object Techniques been referred?

  • Problem: View Object with Multiple Updateable Dependent Entity Objects

    I try to implement a ViewObject with 2 updateable entities based on the document:
    http://www.oracle.com/technology/products/jdev/howtos/bc4j/multientityvo.html
    But I get an early NullPointerException:
    As written in the document I overriden the create method in the ViewObjectRowImpl class:
    protected void create(AttributeList attributeList) {
    // The BC4J framework will already have created "blank" entity instances
    System.out.println(getClass().getName()+"create BEGIN");
    LabEventTypeItemImpl newLabEventTypeItem = this.getLabEventTypeItem();
    System.out.println(getClass().getName()+"create 1");
    TariffItemImpl newTariffItem = this.getTariffItem();
    System.out.println(getClass().getName()+"create 2");
    try {
    // Let department "blank" entity instance to do programmatic defaulting
    newLabEventTypeItem.create(attributeList);
    System.out.println(getClass().getName()+"create 3");
    // Let employee "blank" entity instance to do programmatic defaulting
    // passing in new DepartmentImpl instance so its attributes are
    if (newTariffItem == null) // added trace
    System.out.println(getClass().getName()+"create newTariffItem IS NULLLLL");
    // available to the EmployeeImpl's create method.
    newTariffItem.create(newLabEventTypeItem);
    System.out.println(getClass().getName()+"create 4");
    catch (JboException ex) {
    if (newLabEventTypeItem != null)
    newLabEventTypeItem.revert();
    if (newTariffItem != null)
    newTariffItem.revert();
    throw ex;
    catch (Exception otherEx) {
    if (newLabEventTypeItem != null)
    newLabEventTypeItem.revert();
    if (newTariffItem != null)
    newTariffItem.revert();
    throw new RowCreateException(true /* EO Row? */,
    "LabEventTypeItem" /* EO Name */,
    otherEx /* Details */);
    System.out.println(getClass().getName()+"create END");
    The code:
    TariffItemImpl newTariffItem = this.getTariffItem();
    is equivalent in the example to:
    EmployeeImpl newEmployee = getEmployee();
    In my case this.getTariffItem() <=> getEmployee() returns null?
    I get an Exception when I call:
    newTariffItem.create(newLabEventTypeItem);
    Equivalent to:
    newEmployee.create(newDepartment);
    ViewObject partial XML:
    ======================
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="10.1.2.17.96" />
    <Attr Name="_codeGenFlag2" Value="Access|Coll|Msg" />
    <Attr Name="_isExpertMode" Value="false" />
    </DesignTime>
    <EntityUsage
    Name="LabEventTypeItem"
    Entity="com.photoswing.model.lab.LabEventTypeItem" >
    <DesignTime>
    <Attr Name="_EntireObjectTable" Value="false" />
    <Attr Name="_queryClause" Value="true" />
    <Attr Name="_queryWhere" Value="(((LabEventTypeItem.LAB_EVENT_TYPE_ITEM_ID = TariffItem.LAB_EVENT_TYPE_ITEM_ID)AND (LabEventTypeItem.ITEM_ID = Item.ITEM_ID))AND (LabEventTypeItem.PRINT_SIZE_DPI_ID = PrintSizeDpi.PRINT_SIZE_DPI_ID(+)))AND (LabEventTypeItem.FILM_PRINT_SIZE_DPI_ID = FilmPrintSizeDpi.FILM_PRINT_SIZE_DPI_ID(+))" />
    <Attr Name="_queryOrderBy" Value="Item.ITEM_TYPE_ID,PrintSizeDpi.REQ_MEGA_PIXELS,Item.ITEM_ID" />
    </DesignTime>
    </EntityUsage>
    <EntityUsage
    Name="TariffItem"
    Entity="com.photoswing.model.lab.TariffItem"
    Association="com.photoswing.model.lab.TariffItemLabEventTypeItemFkAssoc"
    AssociationEnd="com.photoswing.model.lab.TariffItemLabEventTypeItemFkAssoc.TariffItemLabEventTypeItem"
    SourceUsage="com.photoswing.model.lab.LabEventTypeItemAndTariffItemVO.LabEventTypeItem"
    Reference="true" >
    <DesignTime>
    <Attr Name="_EntireObjectTable" Value="false" />
    <Attr Name="_queryClause" Value="false" />
    <AttrArray Name="_srcAttributes">
    <Item Value="com.photoswing.model.lab.LabEventTypeItem.LabEventTypeItemId" />
    </AttrArray>
    <AttrArray Name="_dstAttributes">
    <Item Value="com.photoswing.model.lab.TariffItem.LabEventTypeItemId" />
    </AttrArray>
    </DesignTime>
    </EntityUsage>
    Stack trace:
    ===========
    oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for LabEventTypeItem.
         at com.photoswing.model.lab.LabEventTypeItemAndTariffItemVORowImpl.create(LabEventTypeItemAndTariffItemVORowImpl.java:1370)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:353)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2599)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1048)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1725)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1769)
         at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1749)
         at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6230)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:891)
         at oracle.jbo.uicli.jui.JUActionBinding.doIt(JUActionBinding.java:203)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:478)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:306)
         at com.photoswing.component.JUNavBar.doAction(JUNavBar.java:1114)
         at oracle.jbo.uicli.controls.JUNavigationBar.actionPerformed(JUNavigationBar.java:259)
         at com.photoswing.component.JUNavBar.actionPerformed(JUNavBar.java:419)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:458)
         at com.photoswing.view.start.WaitCursorEventQueue.dispatchEvent(PhotoWebshopDesktop.java:3077)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ## Detail 0 ##
    java.lang.NullPointerException
         at com.photoswing.model.lab.LabEventTypeItemAndTariffItemVORowImpl.create(LabEventTypeItemAndTariffItemVORowImpl.java:1355)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:353)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2599)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1048)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1725)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1769)
         at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1749)
         at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6230)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:891)
         at oracle.jbo.uicli.jui.JUActionBinding.doIt(JUActionBinding.java:203)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:478)
         at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:306)
         at com.photoswing.component.JUNavBar.doAction(JUNavBar.java:1114)
         at oracle.jbo.uicli.controls.JUNavigationBar.actionPerformed(JUNavigationBar.java:259)
         at com.photoswing.component.JUNavBar.actionPerformed(JUNavBar.java:419)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5100)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:458)
         at com.photoswing.view.start.WaitCursorEventQueue.dispatchEvent(PhotoWebshopDesktop.java:3077)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Thanks
    Frederic

    I get the same error on the scott schema:
    protected void create(AttributeList attributeList) {
    // The BC4J framework will already have created "blank" entity instances
    DeptImpl newDept = getDept();
    EmpImpl newEmp = getEmp();
    try {
    // Let dept "blank" entity instance to do programmatic defaulting
    newDept.create(attributeList);
    // Let emp "blank" entity instance to do programmatic defaulting
    // passing in new DeptImpl instance so its attributes are
    // available to the EmpImpl's create method.
    if (newEmp == null)
    System.out.println(getClass().getName()+".create newEmp IS NULL");
    newEmp.create(newDept);
    catch (JboException ex) {
    newDept.revert();
    newEmp.revert();
    throw ex;
    catch (Exception otherEx) {
    newDept.revert();
    newEmp.revert();
    throw new RowCreateException(true /* EO Row? */,
    "Dept" /* EO Name */,
    otherEx /* Details */);
    The trace shows:
    model.CreateDepartmentAndFirstEmployeeRowImpl.create newEmp IS NULL
    Another problem:
    Refreshing Foreign Key Values in New Employees Once Final Department Id is Assigned:
    Number newDeptno = getDeptno().getSequenceNumber();
    doesn't compile getSequenceNumber() unknown.
    I send you a usecase as a zip file.
    The code for Refreshing Foreign Key in is comment at the end of the DeptImpl file.
    Regards
    Frederic
    I send you the

  • VO with "Conditionnaly" Multiple Updateable Dependent EO

    Hi,
    I have a special case of:
    View Object with Multiple Updateable Dependent Entity Objects.
    One of the Updateable Entities must not be created in some cases => outer join in query condition
    I implemented succesfully the techical doc:
    http://www.oracle.com/technology/products/jdev/howtos/bc4j/multientityvo.html
    but I can't figure out how to avoid the creation of that Entity row.
    I remove the row in the create method but the default values are still displayed.
    Is there a better way to achieve this?
    How can I clear the default values to avoid the dead entity exception when those fields are accessed?
    Thanks
    Fred

    I wanted to implement gapless sequence number. But, when i try to to implement it then (DBSequence)attributeList.getAttribute("Id");
    returns null.
    and then jbo.null object reference exception is trhown.
    Do you know how I can implement gapless sequence number using this approach.

  • Need to implement auto suggest with multiple select in a input text field

    Hi,
    Jdev Ver: 11.1.1.4
    My requirement is to create an input field where i can provide auto suggest and user can enter multiple email ids. It is similar to current "To" field while composing a mail in Gmail.
    Problem:
    I have implemented input box with auto suggest. For the first entry it works fine. when i enter 2nd value(i have used ',' (comma) as separator and handled it in 'suggestItems' bean method to take sub-string after comma for providing the suggestion) , after selection.... the first value get lost. So at a time only one value is selected in the input text.
    Input text:
    <af:inputText label="Names" id="it21" rows="2"
    columns="50" simple="true"
    valueChangeListener="#{VisitBackingBean.visitMembersInputBoxCL}"
    binding="#{VisitBackingBean.visitMembersInputBox}">
    <af:autoSuggestBehavior suggestItems="#{VisitBackingBean.onSuggest}"/>
    </af:inputText>
    Bean Method:
    public List onSuggest(FacesContext facesContext,
    AutoSuggestUIHints autoSuggestUIHints) {
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    String inputNamevalue = autoSuggestUIHints.getSubmittedValue().trim();
    if(inputNamevalue.contains(",")) {
    inputNamevalue = inputNamevalue.substring(inputNamevalue.lastIndexOf(",")+1).trim();
    //create suggestion list
    List<SelectItem> items = new ArrayList<SelectItem>();
    // if (autoSuggestUIHints.getSubmittedValue().length() > 3) {
    OperationBinding setVariable =
    (OperationBinding)bindings.get("setnameSearch");
    setVariable.getParamsMap().put("value",
    inputNamevalue);
    setVariable.execute();
    //the data in the suggest list is queried by a tree binding.
    JUCtrlHierBinding hierBinding =
    (JUCtrlHierBinding)bindings.get("AutoSuggestName_TUserROView1");
    //re-query the list based on the new bind variable values
    hierBinding.executeQuery();
    //The rangeSet, the list of queries entries, is of type //JUCtrlValueBndingRef.
    List<JUCtrlValueBindingRef> displayDataList =
    hierBinding.getRangeSet();
    for (JUCtrlValueBindingRef displayData : displayDataList) {
    Row rw = displayData.getRow();
    //populate the SelectItem list
    items.add(new SelectItem(rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">",
    rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">"));
    return items;
    Please suggest how can i achieve the mentioned functionality.

    Hi,
    doesn't work this way as the suggest list returns a single value. You can actually use the existing values as a prefix to the new value in which case the suggest list would look a bit odd. Beside of this all you can do is to create a user lookup field with auto suggest and once a name is selected, update another field with the value returned from this action
    Frank

  • One ViewObject with multiple Entities -- killing me

    Guys.....
    Any thought why postChanges is not being called on a View object with Multiple Entities........
    When i click on createinsert button and then save......(without making any changes to VO fields)...... no records are being saved and thus postChanges is not being called.....
    anything I can do to fix it.....
    -R

    Timo and Biag
    Thank you for your response....
    You have a good point but still i would love need to implement a validation that if all columns are empty; prompt an error message.... kind of a thing.....
    Entity.setNewRowState(Row.new) doesn't mark this row as new row...... what is the best way to force the new record event from VO?
    may be will implement something before Commiting on that page.....

  • I need a JFrame with multiple updateable JLabels

    Hi. I have tried implementing a JPanel with several labels attached to it:
    JPanel labelPanel = new JPanel();
    And I added several JLabels to it:
    JPanel.add(label1);
    JPanel.add(label2);
    JPanel.add(label3);
    This works, I am able to set the text of these labels and they display properly, however for some strange reason, I cannot use the actionListener method to update these label values.
    Note: Adding a label as a single element, it can be updated using a button
    and actionListener, which verifies that I did the actionListener correctly.
    I just need a JFrame that can use around 15 lines that can be dynamically updated on actions.
    Thanks for the help.

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class myFrame2 extends JFrame implements ActionListener {
         JLabel label1 = new JLabel(), label2 = new JLabel(), label3 = new JLabel(),
                   label4 = new JLabel(), label5 = new JLabel(),
                   label6 = new JLabel(), label7 = new JLabel(),
                   label8 = new JLabel(), label9 = new JLabel();
         JButton myButton = new JButton();
         public static void main(String s[]) {
              myFrame2 frame = new myFrame2();
         myFrame2() {
              JFrame frame = new JFrame("FrameDemo");
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              JLabel label1 = new JLabel(), label2 = new JLabel(), label3 = new JLabel(), label4 = new JLabel(), label5 = new JLabel(), label6 = new JLabel(), label7 = new JLabel(), label8 = new JLabel(), label9 = new JLabel();
              myButton.addActionListener(this);
              JTextArea t;
              JTextField tbox = new JTextField();
              tbox.setText("Test");
              // emptyLabel.setFont(Font Arial);
              // emptyLabel.setPreferredSize(new Dimension(175, 100));
              JPanel panel = new JPanel();
              JPanel textPanel = new JPanel();
              label1.setText("This should change on button press.");
              panel.add(label1);
              panel.add(label2);
              panel.add(label3);
              panel.add(label4);
              panel.add(label5);
              panel.add(label6);
              panel.add(label7);
              panel.add(label8);
              panel.add(label9);
              textPanel.add(myButton);
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              frame.getContentPane().add(textPanel, BorderLayout.SOUTH);
              frame.pack();
              frame.setVisible(true);
              frame.setSize(450, 600);
              frame.setTitle("Network Dice");
         public void actionPerformed(ActionEvent e) {
              // TODO Auto-generated method stub
              label1.setText("But it does not.");
              // This does NOT work.
    }Here's a sample of the code I have.

  • Delete view object with multiple updateable entities

    I've created a VO which updates 3 entities, taking care of the posting order by overriding the postChanges(TransactionEvent e) and the create() methods of the entities, and of the VOs RowImpl.
    The problem is, the DELETE is not working, I'm getting a database constraint violation (raised like you should delete the row in the EMP table first, and then its parent row in the DEP table).
    I've inserted the following in the e.g. EmployeeImpl.java
    if (getPostState() == STATUS_DELETED) {
    DepImpl parentDep = getDepartments();
    if (parentDep != null ) {
    parentDep.postChanges(e);
    and it's not enough, I'm missing smth obviously.
    Can someone help?
    Thanks and regards
    gabriela

    Shailesh,
    thank you for your reply.
    I'm back from the holidays and trying to keep up :-)
    Guess I had gotten it wrong in the beginning. This is how it looks like now:
    * Remove the instance present on associations which are 1:1 relationships,
    * (on delete cascade behaviour).
    * The default implementation of remove() only removes this instance.
    public void remove() {
    //Get the Person Id and delete the associated Parties instance first
    Number perId = getId().getSequenceNumber();
    if (perId != null)
    DBTransaction trans = getDBTransaction();
    trans.executeCommand("delete from parties where per_id = " + perId);
    //delete this instance
    super.remove();
    best regards
    gabriela

  • Single "child" ViewObject with multiple ViewLink "parents"

    Hello,
    The subject says it all. Is it possible to create View Objects and View Links appropriately such that
    ChildVO = View Object child
    ParentVO1 = View Object parent of ChildVO
    ParentVO2 = View Object parent of ChildVO
    both ParentVO1 and ParentVO2 can drive the specific rows detailed in ChildVO?
    This occurs when we have a ChildVO used to navigate/browse search results and are providing different search mechanisms via ParentVO1 and ParentVO2 to limits ChildVO's rows.
    Any suggestions? Apologies if this is a trivial/oft-posted question,
    Joe

    We have a similar scenario here - if I understand you correctly.
    We have a worklist controlling an elaborated ViewLink cascade during normal operation.
    The user can also switch to a demo mode where a different VO takes control over the whole detail shebang.
    We do this by removing/creating the ViewLinks at runtime. We have designed the ViewLinks, so that their xml files are created, but we instantiate only one of them in the AM.
    In the AM impl when switching to demo mode we do:
    ViewLinkImpl link = getWorklistViewLink1(  );
    if( link != null ) {
      link.remove(  );
    ViewLink newLink = createViewLink( "demoViewLink",
                                             "demopackage.PacsDemoLink",
                                             demoMaster, proxy );
    proxy.executeQuery(  );Switching back:
    ViewLinkImpl link = (ViewLinkImpl)findViewLink( "demoViewLink" );
    if( link != null ) {
      link.remove(  );
    ViewLink newLink = createViewLink( "WorklistViewLink1",
                                             "demopackage.WorklistViewLink",
                                             reportMaster, proxy );
    proxy.executeQuery(  );In order to make this as easy as possible, we introduced a proxy VO that has no real functionality but that ensures that only one ViewLink has to be "switched".
    worklist ---- proxy ----- detail1 ---
                       |-------- detail2 ---
                       --------- detail3 ---In demo mode:
    demoMaster -- proxy ----- detail1 ---
                            |-------- detail2 ---
                            --------- detail3 ---Works for us like a charm. Don't know if there is a more elegant solution.

  • Multiple updateable adf entity objects

    I've got a situation that is real similar to something that's covered in the developer's guide, yet it's just different enough that I need to get someone's help. I have a view object that is based on two entity objects. These 2 entity objects have a one to one association with each other. They both share the same primary key (hris_id). There is no foreign key relationship between them. This hris_id column for one of the entity objects has been set as a DBSequence type so that it's value can be set by a sequence. When i want to create a new row via this view object, I need to know where/when I can get this sequence generated value from the first entity object so that when the second entity row gets created, i can use this value (hris_id) from the first entity object to populate the hris_id column in the table for the "second" entity, since both tables will need to share the same value for hris_id column. Just not sure about where in the code this needs to happen. Any ideas? Thanks.

    Hi,
    I think your situation is similar as described in the guide.
    Override create in your view object row class, create first and second entity and probably you need to copy key value from first to second entity.
    Try this:
        @Override
        protected void create(AttributeList attributeList) {
            Entity1Impl newEntity1 = getEntity1();
            Entity2Impl newEntity2 = getEntity2();
            try {
                newEntity1.create(attributeList);
                oracle.jbo.domain.Number hrisId = newEntity1.getHrisId().getSequenceNumber();
                newEntity2.create(attributeList);
                newEntity2.setHrisId(hridId);
                .Rado

  • Implement a View Object with multiple entity objects

    Hi
    In 'How to' section on the 'otn.oracle.com' (Jdeveloper) web site is tutorial how to implement a View Object with multiple updateable dependent entity objects.
    It allows user to insert an employee and a department at the same time.
    But I would like to change this example to insert a new department only if it does not already exist. How to change this sample?
    Is there any other way to this?
    Thanks
    Regards
    Gorazd

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • List with multiple selection

    Hello;
    I seek a code to implement a list with multiple selection for a browser Web (HTML is imited).
    I have a list containing of the years, the user can select one or several years and I created dynamically a array : for each year a column.
    Thank you;

    Look at JList.
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JList.html
    � {�                                                                                                                                                                           

  • Has anyone successfully implemented a drop shipping eCommerce solution with MULTIPLE suppliers?

    Hi there
    I have read a few BC forum articles on this subject, but none seem to have clarified whether a drop shipping eCommerce solution with MULTIPLE suppliers can truly be implemented successfully in BC.
    In particluar, my concern is with splitting up ONE online order with products from MULTIPLE suppliers ... and split up the order into its individual supplier components and thereby calculate freight costs for each of the suppliers i.e. the freight cost should really be calculated for each of the suppliers SEPERATELY and not for the order as a whole.
    Forum post http://forums.adobe.com/message/4881302#4881302 addresses this issue and Liam Dilley [as always] kindly responded. But his response indicates this is not possible with BC.
    If this is the case, drop shipping in BC is quite useless unless:
    1. you had only one supplier
    2. or, you somehow restricted each order placed to products from only one supplier - which I am unsure is even possible even with JQuery
    Any feedback from the community would be most appreciated.
    Regards
    Gavin

    You have two requirements:
    1. Once ordered, split the order into suppliers, contact the supplier of the product, give the information of the order to the customer. Supplier ships it. This could be done manually but a pain in the ***. I would assume you want it automated.
    2. When ordering, multiple products require mutliple shipping rates. As the shipping from location could be different for each product you can't just use the ship from one location option.
    Solutions:
    1. This is the easier one, you record the supplier in the product via a form or in the product item itself. If you wanted to automate here you could via API, if you wanted to do it manually you also could.
    2. Shipping calulator, to make things easier you would have to do everything by weight. Use Javascript to remove the default shipping option on the checkout page, pass all the items in the shopping cart. Use a lookup table function in Javascript "item name to weight" then have another function item to (from) shipping location. Work out the shipping and display it and force change with Javascript BC's shipping price (so the customer pays the correct amount).
    Like Liam says, it's not something BC does too well at the moment and the above solution is more of a workaround but does work.

  • Is it possibe to define a badi with multiple filters for single implementation ?

    is it possible to have a badi with multiple filters in one implmentation?

    Hello Siva,
             There is no hierarchical concept in filter values. You can have multiple filter values and at any time you can pass only one filter value while invoking Badi.
    The concept of hierarchy can be implemented by combination of filter and methods.
    1. You can have filter as the first level and have multiple filters.
    2. Then you can define methods in Badi and this now  becomes 2 level.
    Thanks and Regards,
    Veera

  • Implement Comparable with multiple arguments

    Is there a way of implementing Comparable<> with multiple different arguments to the Comparable generics?
    For example:
    public class Foo<K, V> implements Comparable<K>,
              Comparable<V>
    }The compiler complains with the error: "The interface Comparable cannot be implemented more than once with different arguments: Comparable<K> and Comparable<V>"
    Clearly, this cannot be done exactly like this, so I'm wondering if there is a different way of accomplishing the same functionality.
    Edited by: mgolowka on Apr 24, 2008 12:22 PM

    I'm working on creating a generic binary search tree. Currently I have this:
    public class BinarySearchTree<T extends Comparable<T>> implements Collection<T>
    }With the add() function, I can simply do add(T) that will use T's compareTo(T) method to find its place in the tree, however with the remove() and get() functions that I want to have would require an input of T, which isn't what I'm entirely looking for. I could change this to have a key/value pair so it's functionality is like a set, but I'm not sure if that's the best course of action. I could make it implement Map<K, V> to get that functionality...
    There is no time limit on this project as it is a part of a personal project.

Maybe you are looking for