View Link - Adding criteria dynamically in runtime

Hi all,
     I'm working on a development in which Hgrid is used to show results based on the user's search criteria. The query to populate the Hgrid region, as expected, is built from a Master VO linked with a Details VO through a View Link.
As per design model and requirement, I will need to use specific filters on the Details VO besides the already existing link attribute defined to link both Master and Details VO. My question is.. How can I implement this??
I've tried to use setWhereClause(...) and executeQuery() in the Details VO but it seems that no matter what I include in the WhereClause for the Details VO, it just simple ignores.
Scenario Example:
MasterVO attributes (ship_hdr_code, ship_hdr_id)
View Link (Master.ship_hdr_id = Details.ship_hdr_id)
DetailsVO attributes (ship_line_code, ship_hdr_id, ship_line_id, amount, currency)
After querying on MasterVO for ship_hdr_id = 1, View Link will query all lines on DetailsVO in which ship_hdr_id = 1 as well.
In addition to this, users may want to see only records from DetailsVO that the currency is equal to 'INR'.
I'd appreciate any help on this.
Thanks and Regards,
Eduardo

Hi,
I have the same requirement. Have you resolved this?
Thanks,
Yasdnil

Similar Messages

  • Adding tabs dynamically at runtime for a tab navigator control

    Hi,
    Is it possible in flex builder 2 to dynamically add the tabs
    at runtime to the tab navigator control, if we can add plz tell the
    procedure to do that
    thanks in advance

    Given that you had a tab navigator declared in mxml like
    this:
    <mx:TabNavigator id="myTabber" selectedIndex="0">
    </mx:TabNavigator>
    you should just be able to call the addChild method, passing
    the child tab containers. So for example, in some ActionScript
    event handler:
    var newTab:Canvas = new Canvas();
    myTabber.addChild(newTab);
    bear in mind I haven't done this by adding tabs, but have
    done tons with adding controls to an application at runtime using
    this method (DataGrids, Grid, GridItems, etc...)
    Jason

  • Create dynamically View Link

    hi
    please can you explain the first parameter from the method (createviewlink(string,VO,VO)),because i want to build view link between two dynamic VO's
    it better as an example
    thanks in advance
    Message was edited by:
    Abo Alnnor

    If that's DBTransaction.createViewLink() then the first parameter is the full def name of the ViewLink.
    For example "some.rather.long.package.path.Dept2EmpViewLink".
    So you define the ViewLink using the wizard in JDev at design time, but instantiate it according to that definition at runtime.
    Sascha

  • [ADF-11.1.2] Dynamic EO/VO/Association/View Link/pagedef/JSPX XML Def files

    I though I found gold but it has nothing when I clicked on it.
    Steve Muench's "Not Yet Documented Examples" [http://blogs.oracle.com/smuenchadf/resource/examples] > "Using ViewObject writeXML and JSTL XML Tag Library" suppose to provide the example. but I am getting File not found error. Seems the sample application doesn't exists any more.
    Please point me to correct example for my following use case:
    At Run-time:
    1. My Application will ask user for database table name.
    2. for provided database table name, my application should Generate XML Definition file for EO, Associations, VO and View Links inside Model Project (basically all definition file should be created which gets created when developer create these Business Components for database table through JDeveloper Studio).
    3. Once done, application should also generate JSPX file using ADF page template in ViewController Project, with binding definition to it's corresponding newly generated VO Objects from step 2.
    4. The page will be then, visible to user to use it (create/update/delete records)
    First of all, is it possible to achieve above requirement ? Based on description of Steve Muench's "Using ViewObject writeXML and JSTL XML Tag Library", I think it is possible, but I don't have the sample application to refer.
    I could have used dynamic view object concept to display the records with basic page layout. But I want users the ability to modify the create/records/delete the records with following requirements:
    1. If require, Business Logic Developer can use Jdeveloper Studio to access new generated Business Components and modify it (like adding some validation rules)
    2. If require, UI Developer can access newly generated JSPX file and change the layout.
    Please let me know how much and how can I achieve it ?

    Shay,
    Thank you for your reply. I will take a look at your links.
    Use Case:
    Application will have different BC for different IT Assets (like Monitor, Keyboard, Servers etc), which will basically hold records for all available Assets (like Display Resolution, screen size etc for all monitor in Monitor BC).
    I want to give user; the ability to create, for e.g., the sub-class of Monitor to store more specific attribute-values in different table (which will be linked Parent BC). For e.g.: They may want to care about holding CRT and LCD Monitor records in separate new database table -- Application will ask user what all attributes/Columns they want to see for LCD which is specific to this type AND which is not present in already existing out-of-box Monitor BC/Table - e.g. - "Viewing Angle" Attribute).
    With that said, I can write code to create database table on fly (having 1-to-1 foreign key reference to parent table) but writing ADF part seems difficult. I also wanted application to automatically generate new page for newly added VO BC. E.g.: LCD-Monitor.JSPX inheriting all attributes from monitor (parent VO) in the same structure as Monitor.JSPX file is having with extra LCD-specific Attributes in separate panel tab (which again UI developers can customized it).
    Too much to expect huh !
    I am going to start building the application so If not above way, any other suggestion to achieve the requirement ?
    Edited by: Anandsagar Sah on Aug 29, 2011 9:23 PM

  • [SOLVED] Multiple Dynamic View Objects and View Links - ADF Tree Table

    Hi all,
    I've got a method that creates 3 dynamic viewobjects using this:
                ViewDefImpl Level1ViewDef = new ViewDefImpl("Level1View");
                Level1ViewDef.addViewAttribute("LevelDescription","LEVEL1_DESCRIPTION",String.class);
                Level1ViewDef.addViewAttribute("SetOfBooksId","SET_OF_BOOKS_ID",Number.class);
                Level1ViewDef.addViewAttribute("CodeCombinationId","CODE_COMBINATION_ID",Number.class);
                Level1ViewDef.addViewAttribute("Level1","LEVEL1",String.class);
                Level1ViewDef.addViewAttribute("AccountType","ACCOUNT_TYPE",String.class);
                Level1ViewDef.addViewAttribute("PeriodYear","PERIOD_YEAR",Number.class);
                Level1ViewDef.addViewAttribute("PeriodNum","PERIOD_NUM",Number.class);
                Level1ViewDef.addViewAttribute("PeriodName","PERIOD_NAME",String.class);
                Level1ViewDef.addViewAttribute("PtdActual","PTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("YtdActual","YTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("LtdActual","LTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("BudgetName","BUDGET_NAME",String.class);
                Level1ViewDef.addViewAttribute("BudgetVersionId","BUDGET_VERSION_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdBudget","PTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("YtdBudget","YTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("LtdBudget","LTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("EncumbranceType","ENCUMBRANCE_TYPE",String.class);
                Level1ViewDef.addViewAttribute("EncumbranceTypeId","ENCUMBRANCE_TYPE_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdCommitment","PTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("YtdCommitment","YTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("LtdCommitment","LTD_COMMITMENT",Number.class);
                Level1ViewDef.setQuery(sql_level1);
                Level1ViewDef.setFullSql(true);
                Level1ViewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
                Level1ViewDef.resolveDefObject();
                Level1ViewDef.registerDefObject();
                ViewObject vo1 = createViewObject("Level1View",Level1ViewDef);I can create the view objects fine and create a single viewlink between two of them, however i'm getting problems with 2 view links.
    This is how I'm creating a view link:
                ViewLink Level2Level1FKLink = createViewLinkBetweenViewObjects("Level2Level1FKLink1",
                                                        "Level2View",
                                                        vo1,
                                                        new AttributeDef[]{
                                                          vo1.findAttributeDef("Level1")
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level1")
                                                        "LEVEL1 = :Bind_Level1");
                ViewLink Level3Level2FKLink = createViewLinkBetweenViewObjects("Level3Level2FKLink1",
                                                        "Level3View",
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level2")
                                                        vo3,
                                                        new AttributeDef[]{
                                                          vo3.findAttributeDef("Level2")
                                                        "LEVEL2 = :Bind_Level2");I can get the data to display on an adf tree table if i'm only using a single view link, but when i try and implement 2 view link (for 3 levels on the adf tree table) i'm getting problems displaying the data.
    I'm getting the following error:
    Aug 10, 2007 2:44:39 PM oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer encodeAll
    SEVERE: Error during partial-page rendering
    oracle.jbo.NoDefException: JBO-25058: Definition Level3View of type Attribute not found in Level2View_Level2Level1FKLink1_Level2ViewThe thing is, Level3View isn't in the Level2Level1FKLink viewlink.
    I've been reading about something similar here
    BC4J Master-Detail-Detail
    but I am still unsure of what the problem is.
    Thanks in advance.

    I found the answer here:
    http://radio.weblogs.com/0118231/stories/2004/06/10/correctlyImplementingMultilevelDynamicMasterDetail.html

  • Add/remove view links at runtime !?

    Hi,
    how can i add/remove a view link to an already published RowSet and make the RowSet adapt to the new condition ??? (without loosing it's own linked Details)
    The scenario: I have lot's of details which are linked to the same master. I remove the details from the session (sessionInfo.removeRowSet) when I don't need them to keep the active number of views in the session as small as possible ! When removing the Details from the Session I also have to remove their links to the master (to avoid exceptions). Further I want to establish the links again when the detail is added to the session again !?
    I add links before publishing:
    ViewLinkInfo view_12aLink = new ViewLinkInfo(master, "package1.LinkDef");
    view_12a.addMasterLink(view_12aLink);
    I can remove links after publishing with:
    view_12aLink.removeViewLink(sessionInfo1.getApplicationModule());
    but how to establish the link again ?:
    ApplicationModule appMod = ....;
    ViewObject vo = appMod.findViewObject(view_12a.getQueryInfo().getName());
    view_12aLink.createViewLink(appMod,vo);
    doesn't work !
    if (view_12a.isOpen())
    view_12a.close();
    view_12a.addMasterLink(view_12aLink);
    works !, but all the links where view_12a is master are broken !!!!
    So what to Do ????
    Thanks for every answer !
    null

    Your results are as expected per the imlementation. Basically you've established (two) ViewLinks between two sets of two instances of VOs.
    Now you try and get an accessor to return a set of details. You need to establish a link between that detail set and it's details to use the accessor on the second detail to get the desired results. Basically you've to establish the chaining between appropriate instances of VOs and not just the outer VOs or VO members of your AM.

  • Bug in bc4j?, view links at runtime, multi table relationships, accessor name

    The following seems like a bug in the business components framework
    to me:
    To make things simple, I will use view objects aV, bV, cV,
    corresponding rows aR, bR, cR and row iterators aI (not used though),
    bI, cI.
    I create two view links from aV to bV and from bV to cV at runtime,
    with the accessor names "Bs" and "Cs".
    ViewLink a2b = createViewLinkBetweenViewObjects(..., "Bs", ...);
    ViewLink b2c = createViewLinkBetweenViewObjects(..., "Cs", ...);
    First of all this code works perfectly fine:
    ViewObject aV = a2b.getSource();
    ViewObject bV = a2b.getDestination();
    ViewObject cV = b2c.getDestination();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    while(bV.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    while(cV.hasNext())
    Row cR=cI.next();
    System.err.println(" cR");
    Using the accessor name "Bs" at the first level is ok, too:
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    RowIterator bI=(RowIterator)aR.getAttribute("Bs");
    while(bI.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    HOWEVER, USING THE ACCESSOR "Cs" AT THE SECOND LEVEL OF THE MULTITABLE
    RELATIONSHIP IN THE FOLLOWING CODE, GIVES ME AN EXCEPTION
    oracle.jbo.NoDefException: JBO-25002: Definition Cs of type Attribute
    not found. THE SEEMS LEGAL USAGE OF THE ACCESSOR "Cs" TOO ME THOUGH,
    THEREFORE MY SUSPICION OF A BUG.
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    System.err.println("aR");
    RowIterator bI=(RowIterator)aR.getAttribute("Bs");
    while(bI.hasNext())
    Row bR=bI.next();
    System.err.println(" bR");
    RowIterator cI=(RowIterator)bR.getAttribute("Cs");
    while(cI.hasNext())
    Row cR=cI.next();
    System.err.println(" cR");
    (By the way, could make your window for filling in the message a little bit wider,
    making it easier to cope with the line breaks).
    Feedback is appreciated.
    Andreas Reuleaux
    Klopotek & Partner
    [email protected]
    null

    Your results are as expected per the imlementation. Basically you've established (two) ViewLinks between two sets of two instances of VOs.
    Now you try and get an accessor to return a set of details. You need to establish a link between that detail set and it's details to use the accessor on the second detail to get the desired results. Basically you've to establish the chaining between appropriate instances of VOs and not just the outer VOs or VO members of your AM.

  • Create dynamic view link

    my problem is
    I build the first view link by using createViewObjectFromQueryStmt method on my application module instance ,then I build the second view link by using createViewObjectFromQueryStmt method on my application module instance,now when I use myAppModule.createViewLink(),he give me an exception about the definition of the viewLink.
    please can you explain the first parameter of the method createViewLink() and how I can get it.
    thanks in advance

    In that case, the first parameter is the name of the ViewLink which you can freely assign. Later you can retrieve the VL from the AM by calling findViewLink( name ).
    But if you create your VOs dynamically from a statement, then you probably need to use createViewLinkBetweenViewObjects() since you don't have a prepared VL definition. Haven't done it myself yet, but it should work.
    Like explained here:
    BC4J Master-Detail-Detail
    Sascha

  • How to extend VO which is use in VIEW LINK and VL is created dynamically.

    Hi All,
    I wants to extend VO.
    This VO is used in VIEW LINK.
    This VL name set dynamically, conditionally in one of the controller of page.
    i.e if some condition satisfied than xyz VL will use otherwise abc VL will use.
    Now,
    I have extend VO as well as VL and substitute both, but I am getting null value for some of the field and also I am not able to insert/update new value.
    So,
    I have created VORowImpl class file which extend VOROWImpl of seeded file and chage the row class of VO.xml file to new class. i.e. modified seeded .xml code and achieve what I want.
    But Is this correct way ?
    Is there any other way ?
    --Tushar Topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi pratap,
    thanx for your reply.
    intially i've done that also. i.e. extend only VO and substitute it but i'm getting null values in some field as well as nt able to insert/update new value.
    the error is related to VL.
    --tushar topiwala                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Change View Link SQL dynamically

    Hi,
    How i can modify the View Link SQL dynamically?
    I have View Link CategoryVL and it is working fine with master (CategoryVO) & details (CoursesVO) tables and the two VO's are not based on EO. but i want to add more columns to the View Link SQL in PFR.
    Please advicse.
    thanks in advance.
    Regards....Ashraf

    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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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

  • Adding the view Link to Application Module

    Hi Guys ,
    How do we add a view link to a Application Module
    i followed the instructions in dev guide but its aint working for me .
    Thanks
    Tom...

    Tom,
    The procedure you have followed is the correct one. So do you mean that when you do the shuttle, nothing happens in the data model window? Any message or warning?
    --Shiv                                                                                                                                                                                                                                                                                                                                                                       

  • Override existing view Link Bind Condition to search within a Master Detail

    Hi All,
    I have 4 level master detail with View Links setup with all of them
    First Level -> Area
    Second Level -> Row
    Third Level -> Locator
    Fourth Level -> item
    All these are rendered graphically with the help of multiple af:iterators.
    Now my requirement is to search for items inside this. So ideally it should only the items that match the search criteria entered in af:quickQuery
    In the queryListener of the quickQuery i have added a viewCriteria dynamically based on the search result.
    But the problem is it doesnt return any row because the bindVariable automatically created because of viewLink gets added to the VO query and it doesnt return any rows.
    Any pointers to overcome this. Please Advise.
    Thanks,
    Ajith

    Hi,
    overriding executeQueryForCollection allows you to access bind variable values for view accessors.
    Frank

  • View Link is not working???

    Hi Everyone,
    I have created one view link between two VOs (DeptVO and EmpVO).
    View link is based on DeptId attrtibute in both he views.
    Now i dragged DeptVO as Select One Choice in my ADF page by showing only Dept Name in soc1.
    And also dragged EmpVO as Select One Choice in my ADF page by showing only Emp Name in soc2.
    And run the page.
    After i modify any Dept in soc1 is not at all reflecting soc2. Whatever value i select in soc1 but soc2 values are not at all changing.
    What can i do to make it work?
    Any suggesetions will be really useful.
    Thanks.

    Hi Kumar,
    The link which I posted above contains the exact steps you are looking for. View Criteria is nothing to bother about, in simple terms it is just adding a WHERE clause to our SQL query (view object). So we are passing dynamic values to the WHERE clause of SQL query ( passing the user selected value to that WHERE clause i.e. department# selected by user from soc1). Please go through the link carefully and it should address all your questions.
    http://andrejusb.blogspot.com/2008/12/cascading-lovs-in-oracle-adf-11g-update.html
    Regards,
    Ravi Nuka.
    Edited by: Ravi Nuka on Apr 2, 2013 1:23 AM
    Edited by: Ravi Nuka on Apr 2, 2013 1:23 AM
    Edited by: Ravi Nuka on Apr 2, 2013 1:24 AM

  • View objects, view links, does not search properly

    Hi,
    I am using Jdev 11.1.2.0
    I have created a search criteria based on view objects and view links. It has entities and entity associations as base. The structure is as follow:
    vo1 ->vl (1 to 1) - > vo2
    ->vl ( 1 to many) -> vo3
    Any search attribute which is not from vo1 return bad result. It happens in running app module and in the jspx page. In app module, it sometimes complains about populating the wrong attribute for the named criteria.
    The search criteria is using "exists" statement for vo2 and vo3 for adding the conditions. It has many attributes within the exist statement.
    So what is the problem. Why it does not join properly? Why does it return bad result when search attribute is from vo2 and vo3? Please help.
    Any more information requires to solve the problem?
    Thanks,
    Arthur

    Hi,
    Two more information: vo1 is composed of Entity1 (1..M) Entity2 and Entity1 (1..1) Entity 3. vo2 is composed of Entity 2 and vo3 is composed of Entity 4.
    I follow the information from http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcquerying.htm#BCGIFHHF
    to create the search criteria.
    Arthur

Maybe you are looking for

  • Help : how to configure attendance in schema (PE02)

    dear SAP masters, can u help me find what's wrong with my schema? it can't work properly VARSTP2002 : - N - Y :       HRS?4.00 :       - <       - = :             - HRS=1             - ADDZLS2816       - > :             - HRS=1             - ADDZLS28

  • Aperture issues with video playback in slideshow

    I'm trying to add a few videos into a slideshow but seem to be hitting an issue with playback. The mpeg4 files play perfectly fine in my project folder but when I drag it into my slideshow I only hear the audio of the video, no picture. Anyone know w

  • Can't print a book out of aperture

    Hello I'm trying to print a 'book' out of aperture, and it's telling me it won't ship to my default address, yet when i try to enter a new address, it tells me to try again later, anyone else having a similar problem? thanks!

  • IPhone on O2

    This is for UK users, will the iPhone be avaliable on pay as you go?

  • Email messages disappearing from my Blackberry Tour

    I currently have my BlackBerry Tour configured for three seperate email accounts. The first two are working just fine. I just noticed this this morning that for the third, messages that I have read appear to be disappearing from the device. I've chec