View Accessors

Hi
I have a task flow that have a method call ExecuteWithParam. In the View Object has an attribute that has a LOV. In this LOV query have a Bind Variable.
In ViewAccessors, the value of Bind Variable I spend so:
adf.context.sessionScope.client
This attribute is a combo in the interface.
In the first passage through the Task Flow behind him the right values, but when I get out of this Task Flow and must get in again, this combo does not have any value. And at the end of the task-flow, I remove the session after commit.
What can it be?
In View Accessors I can pass the value of Bind Variable without using sessionScope?
Thank you
Marcos Vizine

Hi,
when you drag and drop execute with params as a method binding in a bounded task flow, you can use EL to reference a memory scope that belongs to the task flow (e.g. pageFlowScope.client}. Yo then create an input parameter for the task flow which value you set to pageFlowScope.client. This way, each time you start a task flow you can pass in the client value and it will be found when executing the query
Frank

Similar Messages

  • Af:iterator and view accessors with bind variables

    I have a page with an af:iterator where I list up each row in a form layout. On each row there are 2 SelectOneChoice items where the current value is provided by the row. The 2 LOVs are Master-Detail-LOVs. The value of the first one restricts the values of the second one.
    Each LOV is represented by a LOV view object in a shared application module. The view object for the second LOV contains a view criteria with a selection on the column where the value is provided by the first LOV. The value for the restriction is passed via Bind Variable.
    <af:iterator id="i_images" value="#{bindings.Image.collectionModel}" var="row" rows="0" varStatus="vs">
    <af:selectOneChoice value="#{row.bindings.Master.inputValue}" label="#{bindings.Master.label}" id="soc_master" autoSubmit="true">
    <f:selectItems value="#{row.bindings.Master.items}"
    id="si3"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{row.bindings.Detail.inputValue}" label="#{bindings.Detail.label}" id="soc2" partialTriggers="soc_master">
    <f:selectItems value="#{row.bindings.Detail.items}"
    id="si2"/>
    </af:selectOneChoice>
    The view accessor for both LOVs have the settings:
    Row Level Bind Values = true
    SharedInstance = false
    BTW: If I modify one the two view accessor the value for Row Level Bind Values disappear.
    The value for the bind variable on the view accessor is "Master" like the name of the column.
    On loading the page for the first time the LOVs and the values are properly resolved. The master LOV provides the list with all values and the Detail LOV is restricted corresponding the value of the Master LOV. Upon changing the value of the Master LOV the Detail LOV is reloaded, because of the partial trigger, but now the Detail LOV contains all the values as if now View Criteria has been provided.
    We implemented this scenario in an af:query and it worked fine. Are there any restrictions for View Accessors when using an af:iterator??
    Any help is appreciated.
    Thanks,
    Thomas
    P.S.: We're using JDeveloper 11.1.1.4.0
    Edited by: thomas.matzke on Apr 20, 2011 10:07 PM

    Hi Thomas,
    You may be hitting an error that is discussed in the following blog: http://andrejusb.blogspot.com/2011/03/adf-bc-dependent-lov-11g-ps2ps3-bug-and.html
    Hope this helps!
    Russell

  • Which is better creating view accessor based on view object or view instanc

    When creating view accessors whether in the entity object or in the view object, we have two options:
    1- create the view accessor based on a view object.
    2- create the view accessor based on a view instance.
    what are the differences between these two options?
    what are the cases where I should only use option 1 or option 2?
    which one is better?

    Hello Timo,
    I will try to explain my question better.
    when we create view accessor, after click on create new view accessor icon, the create view accessor window is opened, at the header of this window there is a statement says:
    Select a view object or shared view instance and shuttle it to the selected list to create a view accessor.
    and here is my concern, which one to use
    1- select a view object from one of the available view object and shuttle it to the selected list.
    2- select a view instance from the application module and shuttle it to selected area.
    If you have FOD sample (and I am sure you have it :) ), I see that oracle team has used both of them in different places, for examples
    1- in oracle.fodemo.storefront.entities.PersonEO all view accessors are created from view instance in SharedLookupService application module.
    <ViewAccessor
        Name="PersonTypesVA"
        ViewObjectName="oracle.fodemo.storefront.lookups.LookupsBaseVO"
        AMUsageName="SharedLookupService"
        ViewInstanceName="PersonTypes"/>is it because they are used to create LOV?
    2- in oracle.fodemo.storefront.entities.OrderEO the view accessor is created from a view object, not from instance inside application module.
        <ViewAccessor
        Name="OrdersVO"
        ViewObjectName="oracle.fodemo.storefront.store.queries.OrdersVO"/>I couldn't find the usage of this accessor?
    Hope it is clear now.

  • Code of Coders - View Accessors

    Hi.
    My goal is to show some data from static list which is like Code of Coders in another view object.
    I'm using Code of Coders. This is just one database table for all my coders that exists in my application. This is like in [FOD/Store Front Demo|http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html] LookupBaseVO.
    My table structure is CODE_ID (sequence), CODE (String), TYPE (String) and NAME (String).
    Now I have special application module (like in FOD/SFD) which has special configuration just for these static lists which actually live in database.
    I have one ViewObject which has X different View Criterias, where X is number of different TYPEs in Coders table.
    Each of these VC has own instance of VO in that special AM.
    I have created view object myVo which have attribute Status. Now I want to show name for that status from that special instance of VO. For that purpose I have tried to use View Accessors on myVO. Before that I have create View Criteria which has bind variable P_CODE = CODE. When I have defined View Accessor I choose this VC whit bind variable. On Bind Parameter Values property I set Value of that code.
    Then I created new transient attribute called StatusName and I have also created Java class MyVORowImpl with accessors included. And source of getStatusName() looks like this
        public String getStatusName() {
            RowSet status = getAppModule_Status1(); //This is ViewAccessor's name
            status.executeQuery(); //Execute query with already defined P_CODE where param
            Row row = status.first();
            return (String) row.getAttribute("Name");
        }Now when I run main AM there is an error
    (java.sql.SQLException) Attempt to set a parameter name that does not occur in the SQL: P_CODEI can't figure it out what is wrong. Actually I'm wondering how to show data from static list in another VO?
    Thx,
    Regards
    Boris

    Yes, you can use DBMS_METADATA package.
    This link will provide a very good idea about what you are trying to do:
    http://www.dbasupport.com/oracle/ora9i/DDLgen.shtml

  • Auto-Refresh and Order By for view accessors

    Hi,
    We have set auto-refresh to true on a VO(LovVO) in shared AM and used the same to create an lov in another VO. Now if we have Order By in LovVO then we get the exception:
    ORA-29983: Unsupported query for Continuous Query Notification
    This is because of the Order By clause. When i remove the order by then there is no error. But we need the data to be ordered. So I have added the below code LovVOImpl.java executeQueryForCollection method:
    if(this.getSortBy() == null){
    this.setSortBy("Name");
    super.executeQueryForCollection(object, object2, i);
    and this is working fine. Is there any other declarative solution for this scenario?
    I tried setting the order by in the view accessor but that also appends to the sql query and throws the above error.
    Thanks
    Thiru

    Please see http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_cqn.htm#CHDGEBFH. Look like OREDER By is supported only in Best-Effort mode.
    When you call .setSortBy("Name"), it happens in memory not part of SQL, apparently that works

  • Access programmatically view accessor

    hello,haw can i access programmatically view accessor of LOV in backing bean.

    Which jdev version do you use?
    What is your use case?
    What kind of LOV are you talking about?
    Timo

  • Multiple view accessor in entity displaying wrong

    In an entity.xml file I need to define several view accessors to use for List Validation.
    However, when I add more than one view access to the entity and go to define the List Validator for the attribute (this dialog box is called "Add Validation Rule for: Attribute"), the display is all screwed up; the view accessor names are overlapped or some are missing.
    Does anyone know how to fix this or can recommend a resonable work-around.
    Thank you.

    Hi,
    Detail Rule, copy attribute value form master.
    In DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    super.create(attributeList);
    Master rule, set flag to 0 if no details else set to 1.
    In the MasterEOImpl added method to check if detail row exists based on Row Iterator => no db retrieval?
    This method also sets the flag accordingly:
    protected void checkHasOtherDetails()
    oracle.jbo.RowIterator ri = this.getRetrieveFromdetail();
    ri.last();
    // last() must be called else hasNext() returns true even on last delete ???
    Number hasDetails = Constants.NUMBER_NO; // = 1
    if (ri.hasNext() || ri.hasPrevious())
    hasDetails = Constants.NUMBER_YES; // = 0
    if (!getHasDetailsFlag().equals(hasDetails)) {
    this.setHasDetailsFlag(hasDetails);
    I call this method in the remove method of the detailEOImpl:
    public void remove()
    this.getRetrieeFromMaster().checkHasOtherDetails();
    super.remove();
    To set the flag I added follwoing code in the create method of the DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    **** ADDED ***
    Number masterHasDetailsFlag = getRetrieveFromMaster().getHasDetailsFlag();
    if (!masterHasDetailsFlag.equals(Constants.NUMBER_YES)) {
    getRetrieveFromMaster().setHasDetailsFlag(Constants.NUMBER_YES));
    super.create(attributeList);
    One more question:
    Is there a danger of calling last() on row iterators in create/update/remove methods of *Impl files?
    => current row changed => any effect on display in JPanel
    Thanks
    Frederic
    PS All variable/method/class names have been manually renamed in this code so some small syntax problems may exist.

  • ADF View Accessor Validation with Bind Variable

    Hi
    I need to solve the following requirement using a view accessors and bind variables;
    1. User can select a value for a attribute from LOV which is unfiltered.
    2. User can manually edit code into the same attribute as in 1 above, which needs to be validated.
    As the data set for the attribute is large, I need to be able to validate 2 using a query with a where clause.
    My approach has been;
    1. I have a view object for the source lookup table, ProductVO.
    2. I have created a view criteria on ProductVO that accepts a bind variable, pProductCode.
    3. On my OrderEO I have a attribute, productCode.
    4. I create a new view accesor on the OrderEO using the view criteria created in point 2.
    5. I have lft the bind variable parameter blank, as I need to be able to dynamically pass a product code at run time.
    6. On my OrderVO for the productCode attribute, I have create a LOV, based on the ProductVO. This will ensure that the user can view and search all products if needed.
    What I am not getting working;
    1. How can I pass the attribute value to the view accessor at runtime when the value is manually captured.
    2. Ensure that if a value is selected from the LOV, that the view accessor validation does not get invoked.
    What I have tried to solve point 1;
    1. I created a validator on the productCode attribute on the OrderEO as a list validator using the view accessor as my list. I am not sure how to get the bind variable populated. Leaving out the bind variable, I assume, would cause the value to be validated against all my products.
    2. I then tried using a method validator and passing in the productCode value and querying the view accessor.
    3. I have not yet tried using Key Exists, is this maybe the missing link/trick?
    All help will be considered a early christmas gift!!

    Hi
    I have found that when using validation type Key Exists and the VO is in the local application, then the bind variable is available in the Create Validation wizard. When I try and create a validator on a VO that is core to all my applications, then I put that VO into an ADF library, the bind variable parameter is not available for mapping to my entity object attribute, even though I can select the VO to create a view accessor from the ADF library.
    Possible bug?

  • View Accessors: Why are they important?

    Hi,
    I have a couple of questions below. please help me in getting them.
    1. What View accessors are actually meant for? From the documentation at http://docs.oracle.com/cd/E17904_01/web.1111/b31974/bclookups.htm#CIHCHGIA, although its clear that it accesses all the rows from the other View objects, so are View accessors meant only for accessing such data, from different view object.
    2. Are view accessors also meant to access rows from two or more view objects?
    Thanks,
    Edited by: pandurang_sp on Jun 10, 2012 10:39 PM

    - View Accessors by definition are ADF Business Components object that points from an entity object attribute (or view object) to a destination view object or shared view instance in the same application workspace. The view accessor returns a row set that by default contains all the rows from the destination view object.
    - The source and destination view objects are generally associated in some way so you can retrieve the row set from destination based on source row selection.
    - And yes the accessors can access rows from multiple view objects.
    - E.g. consider an Dept/Emp case where EmpVO is set as accessor for DeptVO where DeptID=EmpVO.DeptID. For a given dept you can quickly access all employees using this accessor.

  • How to access View Accessor in VOImpl

    Hi
    In our application we have two View Objects say VO1 and VO2
    Now VO1 has a view accessor as VO2.
    VO1 is a View object with programmatically populated rows that i want to populate by executing VO2 in VOimpl of VO1.
    How can i access VO2 in VO1.impl file.
    Thanks
    AJ

    Hi,
    have you provided view link for both vo..?
    if yes then there is no need to manually add child vo as accessor, because in that case in accessor the vl doesnot gets applied..
    remove it from accessor list
    open vl, goto relation ship, edit accessors, make sure in destination accessor 'In view object' is checked, note the name of accessor for example take it as 'childvo' keeping it default is better.
    so in row of parent viewobject you can access the child view rows as following
    1-* relationship
    Row row = getCurrentRow();
    ViewRowSetImpl vrs = (ViewRowSetImpl) row.getAttribute("childvo");1-1 relationship
    Row row = getCurrentRow();
    ViewRow vrs = (ViewRow) row.getAttribute("childvo");Regards,
    Edited by: Santosh Vaza on Jun 4, 2012 4:49 PM

  • View accessor VO executing time

    Hi,
    I use one VO B as view accessory for one columne of another VO A. When the VO A is execute, is the ADF BC implementation going to do two separate parallel DB queries(each VO has its own query) or the two queries of the VOs are join together for one query initially and the queyr for VO B is executed if needed? In either case, I think the query for VO B is not executed for each row of the VO A.
    I am wondering whether there is big performance difference between the case when VO A has VO B as view accessor or VO A is created by join the sql queries without view accessor.
    Thx.
    Hui

    user491132 wrote:
    I use one VO B as view accessory for one columne of another VO A. When the VO A is execute, is the ADF BC implementation going to do two separate parallel DB queries(each VO has its own query) or the two queries of the VOs are join together for one query initially and the queyr for VO B is executed if needed? In either case, I think the query for VO B is not executed for each row of the VO A.
    I am wondering whether there is big performance difference between the case when VO A has VO B as view accessor or ...The VO B (the accessor) won't be executed automatically each time VO A is queried. You will have to explicitly call executeQuery() on it to execute it. The same is true if you setup VO A as an accessor in VO B, i.e. the accessor VO A won't be executed each time the VO B is queried.
    ... or VO A is created by join the sql queries without view accessor.If you join the VOs using a ViewLink or construct a single VO that joins both tables then both queries will be executed.

  • View accessors and entity accessor

    Hi,
    I have recently started learning ADF.
    There are two terms which I found very confusing, View accessors and entity accessors.
    Can anybody explain me what exactly these are?
    Thanks
    Vipul Verma
    Edited by: 1008597 on May 29, 2013 4:51 AM

    Entity associations allow entity objects (EOs) to know about each other - so this might be useful in some validation rule where e.g. an emp must have a department.
    View links allow view objects (VO)s to "restrict" one VO based on the value in another. E.g. Dept ->VL-> Emp - so if you select a department you only see employees in that department.
    View accessors let view objects "hook into" entity objects....so if you want to ensure that an EMP salary is within the limits in the SAL VO then the view accessor gives you a "hook" from the EO to VO?
    make sense?

  • View Accessor Bind Variables not implemented yet

    When i try to use a view aceesor that has bind variables, and try to configure the value of the bind variable the message is that it is not implemented yet...
    Will this be in the next release?
    Is there a workaround?
    I am trying to use this for list of values fields, can i pass the variable in any other way?

    Well, probably this is one more issue fixed after TP2 release...
    I just have an entity based view and a query bessed view with a bind variable.
    I add the query based view in the accessors of Entity Based view in order to create a LOV item.
    I select edit to edit the accessor.
    I see my bind variable in the bind parameter values region.
    i click on the value field to set the value.
    A button (edit) apears to the left ot the field.
    I click that button and a popup message a message apears: Business Components E_NOTIMP Not Implemented, yet.
    Does that work for you?
    I just want to set the value equal to an Attribute of my entity based view, should i just type the attribute name?

  • Bind variable for view accessor

    I am using a Gantt chart where I need to pass in a date field for the schedule as a bind variable.
    Since this is a Gantt chart, there is no iterator binding for the child VO (the tasks) in my page definition.
        <gantt IterBinding="ParentVO1Iterator" id="ParentsVO1" xmlns="http://xmlns.oracle.com/adfm/dvt">
          <ganttDataMap>
            <nodeDefinition DefName="com.pat.model.view.ParentsVO" type="Resources">
              <AttrNames>
                <Item Value="ParentId" type="resourceId"/>
              </AttrNames>
              <Accessors>
                <Item Value="MainGantt" type="tasks"/>
              </Accessors>
            </nodeDefinition>
            <nodeDefinition type="Tasks" DefName="com.pat.model.view.MainGantt">
              <AttrNames>
                <Item Value="PatId" type="taskId"/>
                <Item Value="StartTimeDate" type="startTime"/>
                <Item Value="EndTimeDate" type="endTime"/>
                <Item Value="Patname" type="label"/>
              </AttrNames>
            </nodeDefinition>
    I have tried retrieving the accessor through the parent VO, and setting the bind variable.
    But I get an error if I fire executeQuery() on the child VO that says that the bind variable for the view link is missing.
            DCIteratorBinding iter = dcBindings.findIteratorBinding("ParentVO1Iterator"); // get parent iterator binding
            ViewObject vo = iter.getViewObject();
            MainGanttImpl childVO = (MainGanttImpl)vo.findAttributeDef("MainGantt").getAccessorVO(vo); //get the child VO through the accessor link
            childVO.setpViewDate(new Timestamp(((Date)getGanttDate().getValue()).getTime())); // get the date entered by the user and set to the child VO
            childVO.executeQuery(); //execute the child VO
    Exposing the child VO impl through the Application module and setting the bind variable to that instance alone has no impact on the Gantt data returned.

    We researched a bit more and hit upon the solution here.
    Decompiling ADF Binaries: Search by child attributes on a tree table
    I added the same bind variable to my parent VO (and added some SQL 'and : pViewDate = : pViewDate' to the query to just get it to work )
    In the parent VO Impl class, I overrode the createViewLinkAccessorRS method:
       protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl assocDef,
                                                          ViewObjectImpl accessorVO,
                                                          Row masterRow,
                                                          Object[] values) {
                ViewRowSetImpl v =
                super.createViewLinkAccessorRS(assocDef, accessorVO, masterRow,
                                               values);
          //  Timestamp viewDate = (Timestamp )accessorVO.getNamedWhereClauseParam("pViewDate");
            v.setNamedWhereClauseParam("pViewDate", getpViewDate());
            return v;                                                    
      public Timestamp getpViewDate() {
            return (Timestamp) getNamedWhereClauseParam("pViewDate");
    This sets the child VO with the value of the bind variable that I have set to my parent VO. This got the Gantt working!

  • How to use two view Accessor's in a List of Values

    Hi
    I have one Transient VO , dragged on to .jsff page. One of the attribute of the transient VO has list of values.
    I have two View Accesors, First View Accesor consists of only ID's and Second View Accesor consists of Description value associated to each ID in the first View Accesor, Now I have to use these both View Accesor in such a way , Values are from First View Accesor and Description is from the second View Accesor as a drop down on my jsff page.
    The source for these both View Accesors are different. There is no relation ship between the two View Accesors. Is it possible to have these two View Accesors to a single drop down list ?

    Hi..
    yes ..on the same line i was getting ERROR.I got it resolved by rebinding it to the perticular column again.below is my code..
    <af:inputListOfValues id="valueId"
    popupTitle="Search and Select: #{bindings.Value.hints.label}"
    value="#{bindings.Value.inputValue}"
    model="#{bindings.Value.listOfValuesModel}"
    required="#{bindings.Value.hints.mandatory}"
    columns="#{bindings.Value.hints.displayWidth}"
    shortDesc="#{bindings.Value.hints.tooltip}"
    label="#{bindings.Value.hints.label}"
    inlineStyle="size:small;">
    <f:validator binding="#{bindings.Value.validator}"/>
    But i had to edit the value and validator parameter to make it row binding as shown below.I dont understand even after i bind the perticular datacontrol to the ADF table..it was still showing as
    value="#{bindings.Value.inputValue} not as value="#{row.bindings.Value.inputValue},because of this it was not able to function properly..
    <af:inputListOfValues id="valueId"
    popupTitle="Search and Select: #{bindings.Value.hints.label}"
    value="#{row.bindings.Value.inputValue}" model="#{bindings.Value.listOfValuesModel}"
    required="#{bindings.Value.hints.mandatory}"
    columns="#{bindings.Value.hints.displayWidth}"
    shortDesc="#{bindings.Value.hints.tooltip}"
    label="#{bindings.Value.hints.label}"
    inlineStyle="size:small;">
    <f:validator binding="#{row.bindings.Value.validator}"/>
    ~Harish
    Edited by: 886523 on Sep 28, 2011 2:52 AM

Maybe you are looking for

  • Is there a way to create your own contact group

    Is there a way to create your own group contact list

  • J2se sdk 1.4.2_04  fail to install on Linux...

    Hi. 1. ./j2sdk-1_4_2_04-linux-i586.bin 2. Saying yes to EULA But then : Do you agree to the above license terms? [yes or no] yes tail: `-1' option is obsolete; use `-n 1' since this will be removed in the future Unpacking... tail: cannot open `+466'

  • Can't go online

    Hello, I finally have the new iPod touch, and it's fabulous. I tried several times to connect to internet via Wi-Fi, but it just doesn't work... Why? What is the problem? I tried to go on internet with the wi-fi with my laptop, and it's ok, but I can

  • SAP XI in SOA

    HI, We have SAP R/3 4.7, SAP SRM4.0, SAP CRM4.0 and SAP BW-SEM4.0 in system landscape. The implementation is following SOA (Service Oriented Architecture). 1. There is CRM middleware is available to integrate CRM with SAP R/3. 2. SAP BW connector to

  • Satndard AVL function code in interactive reports

    hai can any one give some frequently used alv function codes for interctie display thanking u regards murali