Research on the transient view object attributes

Hi all

I have a view X object that has a one-to-many relationship with another object view Y. In there, I have a State attribute that maps to a column of table and X, I have a transitional status attribute that is not mapped to any column in the table. Implementation of line class I derive the status of the status of all the is because the logic of the State is too complicated for a SQL of x. I also search page and brought to provide the ability to search on x status but because the attribute is transient is not considered during the search. What options I have to allow the user to perform a search on an attribute that must be derived? Any suggestions are welcome.

I use JDeveloper 11.1.1.7.

Thank you

Bill

Option 1:

If the calculation of x attribute status is too complicated for the implementation as a SQL in queries or SQL expression, you can implement the calculation in function stored in DB (for example as a PL/SQL function) and map the VO attribute to this request of the VO function. In this way, you will make the x status attribute derived from SQL instead of a transient and then you will be able to do filtering against it in the SQL query.

Option 2:

If the calculation is a sort of grouping or ranking/grouping and your Oracle DB, you can try to implement the calculation using some of the built-in analytical functions of Oracle, who are very powerful and useful for tasks.

Option 3:

If none of above works for you, you can opt for filtering in memory instead of filtering at the level of SQL in DB. You can do this by setting the mode of the corresponding ViewCriteria (i.e. your search pane is based) to 'In memory' instead of 'Database' or 'Both '. This way your VO will retrieve every x lines in memory and the ViewCriteria will filter them in memory after that. This approach is not good, however, if X contains a very large number of lines, because all these lines must be read into memory before filtering.

Dimitar

Tags: Java

Similar Questions

  • LOV depending on the separate View object with ViewCriteria

    Hello

    I use JDev 12.1.3. My use case is the following - I've simplified as much as I can. I insert and update the SFGroupUser table, but I want the LOV to the UserID field be limited to only the users that are connected to today's society through the SFCompanyUser table. Here is the structure of the table:CompanyGroupUserTables.png

    The key point is that when you assign users (SFUser) (SFGroup) groups in the SFGroupUser table, not all users may be assigned to a group because the groups are part of the business and the users are associated with one or more companies. Could not assign a user to a group that belongs to a company that the user is not assigned to. If GroupID 1 belongs to CompanyID 1 and 1 UserID is also assigned to number 1 in the SFCompanyUser table, then Pseudo1 can be assigned to GroupID 1.

    In my ADF application, I created the entity objects and visualization of objects for all tables and all associations and links. I configured the perspective in the AppModule have a master relationship / detail like this:

    CompanyGroupUserAM.png

    In the SFGroupUserView I put in place a LOV to the UserID field. Is this LOV I want to limit just users who are assigned to the current society (the master of the relationship master / detail). It is possible to limit the LOV uses a separate view object, in this case a SFCompanyUser based, where society is today's society?

    I worked with a view read-only as the LOV object. This VO joins SFCompanyUser and SFUser and has a view with a parameter of binding criteria for the CompanyID information. It seems that it is the way to go, but I do not see how to assign the current CompanyID to the variable binding.

    Another point. I read different things, including corner Code article http://www.oracle.com/technetwork/developer-tools/adf/learnmore/44-restrict-lov-169186.pdf of Frank Nimphius. In this article, it updates a variable binding in a listener of the popup. I would like to have all the logic to stay in business if possible components. The idea is that the JSF page displays data controls in the form of a table of editable with a menu item drop-down selectOneChoice.

    Kind regards

    Steve

    I solved my problem. The precious documentation carried out since the development of the Fusion of Web Applications with document Oracle Application Development Framework in section 5.12, in particular section 5.12.2 - How to define cascading lists LOV-Enabled view object attributes: https://docs.oracle.com/middleware/1213/adf/develop/adf-bc-vo-queries.htm#ADFFD349.

    Using a view criteria named in the view LOV object was correct. When the attribute of username in the SfgroupuserView view object has been configured to use the LOV, a view accessor was created for the SfgroupuserView. The accessor view points to the LOV view object. Edition of the accessor of view I said to use the criteria of view named object View LOV. The problem was that the ID of the company in the main table (sfgroup) was not an attribute of the SfgroupuserView view object, so I was not able to assign a value to the variable binding. So, I added the entity sfgroup as one of the entities that the SfgroupuserView was based on and then added the companyID attribute. I then used the new attribute companyID as the value to be assigned to the variable binding, the criteria of display for the view LOV object in view accessor.

    Now, everything works well in the AppModule. When you insert a new record in SfgroupuserView1 the user's selection is a drop-down list that displays only users assigned to today's society.

  • Iterators on the same view object

    different iterators on the same view object have the same current selected row?

    for example: if I have a page of two tables in each tab a tabel based on the same view object but each of them have there own iterator, if I change the selection of tables a the current table line change?

    You can try with 2 instances of VO with iterator separate for each, which is supposed to work in all cases

  • Table of the ADF and shape ADF on the same view object

    Hello

    According to ADF demonstrations available on the website of the ADF, I created a jsf with 2 panels page. A Panel is an ADF table based on a display object. The other Panel is and ADF form based on the same view object. My requirement is that I scroll the records in the table of the ADF, the shape of the ADF should dynamically display the details of the record in the table of the ADF. My understanding is that this should be automatic. However, its does not work as expected. What did I miss?

    Hello

    Ask PPR form that shows the details.

    As:

    ...



    ..

  • Panel of the ADF does not variable defined in the ADF view object.

    I created a group of ADF, which allows the user to run some simple queries against a database of Oracle is using the view objects ADF and ADF view links and ADF application module.
    One of them asks detailed information of research on a database object (Table, view, or other) to dba_objects. SQL uses a parameter (: P_OBJ_NAME) which has a default value of "departments". If I run the ADF application by herself outside the ADF panel module, everything works fine, he invites me to provide a value for the parameter: P_OBJ_NAME.
    As I said the Panel contains various links to view ADF which one who must prompt the user to provide a value for: P_OBJ_NAME. When I run the Panel he does not invite me to: P_OBJ_NAME, it only uses the defined default value "departments".
    I hope that I have described my problem for everyone to understand. Of course, the question is how to make the Group ADF to prompt the user to provide a value for the parameter: P_OBJ_NAME, my waiting has been the sql of the view object and request module, both are designed to enter a value for this parameter, then the Panel should do just that, but it's not.

    Expert you would be most appreciated.
    Thank you.
    Bobby has.

    Published by: Babak Akbari, August 13, 2009 08:34

    Published by: Babak Akbari, August 13, 2009 11:12

    The instigation of a parameter is a feature that we have built in the ADF Tester - is not a default behavior that you get in your application when you have just placed a VO on your page.
    To get something like that spend the operations under the VO node in the data control palette and drag the operation "Run with parameters" to your page to drop it as a form of parameter.
    This will give your user name a place to complete the setting, then press a button to run the query.

  • Fill the programmatic view object during execution

    Hi all

    I have a requirement to switch between the three different data source during execution in a single page. The user interface and the field names are the same for these three cases, but data from various sources (queries).

    So, imagine that we have 3 objects in view which has implemented read-only (object request depending on the view) and we want to fill a display object at the main performance as a data source for my page.

    My idea is to use "Prgorammatic view object" for this data source and then fill dynamically the contents of one of the three objects view read-only based on a setting in the user's selection.

    First of all, I want to know if it is thin approach and if yes, then get some points on the implementation or any other sample.

    I found this example:

    http://techiecook.WordPress.com/2011/05/17/programmatically-populate-view-objects-in-Oracle-ADF/

    Thanks in advance,

    Nasser

    Hello

    It is more a case of use for Adaptive connections. See:https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf

    You can use EL to change the name of the ViewObject that an iterator in ADF queries its data. If the switch is on the link layer and there is no need for programmatic view objects. Unlike in the article of the blog above, VO 3 exist in your case then you don't need to create on the fly. Just change the name of VO in the managed bean referenced

    Frank

  • indication of UI view object attribute Date AM PM

    I have a transient VO that has an attribute of type of date that has populated the value programmatically.
    I need to display the time in the format dd-MMM-yyyy hh: mm AM / PM.
    Using VO attribute UI Hinst, type of Format = Simple Date and Format: dd-MMM-yyyy hh: mm, I could achieve this in part.
    but I need display AM / PM as well.
    How can I get that in 11 1 1 5 jdev?

    Hello

    Have you tried this [DD-MMM-yyyy hh: mm a] format?

    Thank you
    Prateek

  • Create a view object with only transient attributes in its entity

    Hello

    With the help of ADF 11 g (11.1.2.3) with JHeadstart (11.1.2.1.28).

    I'm looking to create a new line for a view object that is supported by an entity that is not related to an existing database object:

    http://i.imgur.com/ex1Eqwq.PNG

    The view object has two lists of radio and a check box:

    http://i.imgur.com/sFWl5qF.PNG

    Normally, I'd create a page like the following fragment:


    1. drag the corresponding data control (for example, MyMedicationListView) on the JSFF.
    2. drag the create operation to the MyMedicationListView on the same page fragment.
    3. change the definition of page for the page fragment.
    4. Add an invokeAction for call to action of creation with a refreshCondition of #{adfFacesContext.postback == false}.
    5. remove the button create the page fragment.

    When users browse to the report page, the form elements to provide parameters for the report because there is an instance of line.

    I put:

    * Insert authorized einreihig? is checked.
    * New display at the entrance line? is set to true.

    Here you can see the other parameters:

    http://i.imgur.com/3DZBD7T.PNG

    Section 8.1.3 of the JHS Guide development (v11.1.2) pointed out that the executeQueryForCollection method can be overridden, but should match the settings that are currently enabled.

    When I build the application and go to the page of the report, no radio buttons are displayed. I expected to see the two sets of radio buttons. When I look in the generated page definition file, I see the following executables:
      <executables>
        <invokeAction id="clearDeepLinkViewCriteriaInvoke" Binds="clearDeepLinkViewCriteria" Refresh="renderModel"
                      RefreshCondition="#{'true' != pageFlowScope.jhsQueryByKeyValue}"/>
        <iterator id="MyMedicationListIterator" Binds="MyMedicationListView" DataControl="ReportingServiceDataControl"
                  RangeSize="10"/>
        <invokeAction id="ExecuteQueryMyMedicationListInvoke" Binds="ExecuteQueryMyMedicationList" Refresh="renderModel"
                      RefreshCondition="#{jhsPageChanged}"/>
        <iterator Binds="ReportingServiceDataControl" RangeSize="25" DataControl="ReportingServiceDataControl"
                  id="ReportingServiceDataControlIterator"/>
        <variableIterator id="variables">
          <variable Name="MyMedicationListRowKeyVar" Type="java.lang.String"
                    DefaultValue="#{bindings.MyMedicationListIterator.currentRowKeyString}"/>
        </variableIterator>
      </executables>
    There is no invokeAction for:
        <action IterBinding="MyMedicationListIterator" id="CreateMyMedicationList" RequiresUpdateModel="true"
                Action="createInsertRow"/>
    The result is essentially a form "in white": http://i.imgur.com/0cIeoeG.png

    When I look at the newspaper, I see:
    MyMedicationListViewImpl::buildQuery SELECT  FROM MYMEDICATIONLIST MyMedicationList
    This generates a resumption of flight of exceptions (the request is absurd: there should be no application because all fields are transient). I've tweaked the ViewImpl as follows:
      public String buildQuery(int noUserParams, boolean forRowCount)  {
        String query = super.buildQuery( noUserParams, forRowCount );
        System.err.printf("MyMedicationListViewImpl::buildQuery %s\n", query);
        
        return "SELECT 1 FROM DUAL";
      }
    The executeQueryForCollection did not work (because the getEstimatedRowCount triggers the incorrect SQL statement), so I have injected a custom rowcount:

    http://pastebin.com/UKPiEs03

    How to create an instance of line valid using JHeadstart?

    Thank you!

    Dynamic areas are not configured correctly.

    By connecting the dynamic field to the corresponding view object (that is, the areas >... > query parameters > data collection), option buttons appeared.

  • Hide the line of adf table based on the transient attribute does not

    I have a JSF page where the user can insert new line in View object . this View object contains a transitional attribute which indicates whether or not the record is newly created.

    On the same page, I have a table adf which is bounded on the city view object . This table should show only newly created records. my approach is to use expression language of in the renditions property to hide all the other lines that are not newly created. I changed the render property for the columns of the table as: rendered="#{row.bindings.RowStatus.inputValue eq'new'}" , but the table does not show anything.

    Then, I tried to change the made not for the column property, but to the outputText inside the same way. It worked, but the problem is that the blank line is always on display.

    So, basically because I do not hide the entire line, instead I'm hiding the text in the lines and lines with spaces empty is still on display in the page aside.

    The Table of JSF page where the made property is applied on outputText inside the column:

    <af:table value="#{bindings.UplodedFilesView1.collectionModel}" var="row"
      rows
    ="#{bindings.UplodedFilesView1.rangeSize}"
      binding
    ="#{CreatSR_UserBean.fileTable}">

      
    <af:column sortProperty="#{bindings.UplodedFilesView1.hints.FileName.name}"
      headerText
    ="File Name" id="c1">

      
    <af:outputText value="#{row.bindings.FileName.inputValue}" id="it1"
      rendered
    ="#{row.bindings.RowStatus.inputValue eq'new'}"/>

      
    </af:column>

      
    </af:table>

    I use Jdeveloper with ADF technology 11.1.2.3

    Thanks Timo,

    You are right. Its to late to hide lines after stamping in the row set. I solve the problem by filtering the view object, based on the transitional attribute in the section of liaison page. The steps as follows: (assuming that the object from view with the temporary attribute has been created, and the transient attribute contains the filtered values)

    1. Drag the view object on the page and also make the Table (in my case it might otherwise listen)
    2. On the page, go to the connection tab.
    3. Double-click the object desired in the links column.
    4. New window will appear titled with (change the binding tree)
    5. Check the option (enable filtering)
    6. Select the (filter attribute) and (filter value) for the selected filter attribute.
    7. Select (Display attribute) you want to appear in the page.
    8. Press OK
  • How to query the object attribute changed his mind in another display object

    JDeveloper 10.1.3.4

    My requirement is I want to be able to query an object (entity based) view on a nonkey attribute where the value I'm looking on can either be in the database on an existing record or only been experienced by updating a different point of view object based on the same entity (and still commit).

    When you query the second display of a value object just updated via a different point of view object, the second view object always returns no rows. I thought that the process is:

    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA

    ViewObjectA - line query with the key = 123. update the attribute Y with value 456 (attribute Y in the null database). Feature for EntityA cache, touch 123, attribute is updated with the value 456
    ViewObjectB - line application with attribute = y. wait record in EntityA just updated cache to be returned. Instead, nothing is returned

    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are the same view the entity RandSchedule object-based objects)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];    
        rsEditRow.setAttribute("SId", new Number(7827));
        
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        
        Configuration.releaseRootApplicationModule(am, true);
      }
    Why not rsSearch finds the S_ID = 7827 record? It seems to only be interviewing new records in the database and ignoring the record updated in cache just updated?

    Any help much appreciated.

    See you soon,.
    Brent

    rsSearch.setNamedWhereClauseParam ("SId", new Number (7827));

    This might help:
    rsSearch.setQueryMode (ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);

    rsSearch.executeQuery ();

  • How to access the child of the view object that is defined via the display link?

    JDeveloper 11.1.1.2 using:

    I defined the purpose of view 2 (ParentVO and ChildVO) and 1 notice link to specify the relationship between them.
    In the definition of link to view, I exposed the view of child object in the parent object from view with the name of the accessor "childlist is."

    In my module of the application, the data model contains the instances of the objects two view. The child view object instance has been added to the parent object instance see through display link

    I install the ParentVO to create both ViewImpl and ViewRowImpl classes and expose all accessor methods.
    But I can't find a get of the ViewRowImpl class method to access the ChildVO of the ParentVO.

    What is the right way to access the instance of ChildVO of ParentVO line line instance IE. ParentVORowImpl class?

    You should have a getEmployeesView method in the departmentsViewRowImpl class.

    You can try it with the HR schema and dept/emp tables to see if it works for you?

  • General approach to the addition of new attributes

    Hi all

    I'm after that insight that the approach that I plan to add new attributes to posted tables UI is healthy.



    Basically, I need to add attributes to the tables view reporting within projects. These attributes already exist on the tables of the ebs. The approach that I considered includes using JDeveloper to add a few columns to the extended view objects, make a BC4J substitution and then customize the UI to include the new column.



    I know that this approach should work for flex-fields. I was just wondering if this is the best way to make such an extension? Is this what I need to consider?



    Thank you

    Kris


    Kris,

    If the attributes are available in the t, then simply create columns in the table through customization and refer to the instance of the view and correctly display the attribute names.
    If the attributes are not available in the original Version, you may need to modify the query and substitute the original standard Version with a custom one. Then the same process of adding columns through customization and evoking the display attributes.

    Hope that helps.

    Concerning
    Sumit

  • How to create LOV not based on an attribute of the View object?

    Hello

    I have created a form of research made hands, and I want to create an af:inputListOfValues.

    I have:
    -a read-only-view-object to get the values of BD LOV.
    -tag af:inputListOfValues (droped component Palette).

    How can I create the listOfValuesModel in the layer of links? (the inputListOfValues is not based on an attribute of the View object).

    Possible solutions.

    1. Add a dummy VO in the layer of model with a single attribute. Create LOV to the attribute and use this attribute in your view.
    2. OR visit http://andrejusb.blogspot.in/2008/02/list-of-values-component-in-search-and.html

  • The attributes defined for SelectCheckbox in the view object Failed

    Hello

    I expanded the view object of the table to filter the records and the table contains the selection box (no change has for this box). When I choose one of the records to help select the check box and go to an action, the error is coming as "Attribute defined for SelectCheckbox in the view object TeamTableVO failed" ... Is the error due to VO scope or any other reason...

    Help, please...

    Kind regards

    Praveen

    Hello..

    Check the following

    1. check if the value of any attribute is set, if yes remove

    2. check the attribute map

    3. set your columns can Yes

    4. check if its VO selected to interview

  • Change the Type of the attribute at the request of the View object

    Hi all

    I use JDeveloper 11.1.1.6. I am trying to achieve the following problem.

    My Table has a column of type VARCHAR2, but this field is to store, say, displayed in canonical format "YYYY/MM/DD hh '. I want to show the date in a nice format, as October 30, 12 ' and be able to use the datePicker adf (date. MinValue) on the attribute.

    So I created an entity object, and I changed the type of the attribute of Date String.

    I also created a ViewObject and the test on request module retrieves a date but seems to not understand the canonical format and date it recovers is wrong (something like 5049-02-20 12:45:30.45).

    Since then, I work on EBS I oracle API access and so on, so I changed my query View object;

    SELECT St St myEO.ExpiryDate-> FND_DATE.canonical_to_date (myEO.ExpiryDate) SELECT as displayed in St St. (FND_DATE.canonical_to_date would be the same thing as to_date (date, format))

    When I run AppModule, NICE! It works, it retrieves the date without time and if simple format to give the attribute I can even get the format I wanted.

    The problem is that when I try to update and validate changes to DB, (I replace the doDML so I can analyze my Date to a string with the format YYYY/MM/DD hh: mm: as is supposed to be) I can't even the part update. Complains in the framework;

    Invalid state, another user has changed the line and blah blah blah and the problem is here:

    (oracle.jbo.RowInconsistentException) Houston-25014: another user has modified the line containing oracle.jbo.Key [592674 primary key].


    [178] compare entity did not attribute display
    [179] original value: 2013-06-28 (that I ran with my FND_DATE.) Procedure CANONICAL_TO_DATE)
    [180] target value: 5048-02-21 22:47:53.0 (I guess that the automatic distribution or conversion of the original string)
    OracleSQLBuilder [181]: ROLLBACK WORK point registration "BO_SP".
    [182] DCBindingContainer.reportException: oracle.jbo.RowInconsistentException

    Any suggestion? I'd really appreciate it.

    Edited by: Alejandro T. Lanz on 1st November 2012 06:34

    Well, in short :):
    When you try to update the line, frame checks the data in db and cached (from the entity object) value is different from the db value (because you Date and String objects), so that it will throw oracle.jbo.RowInconsistentException exception.

    Dario

Maybe you are looking for