Sort LOV view with transient attribute

Hello,
I am using JDeveloper 12c.
I have a view object with a list of value. Let's say EmployeeView and EmployeeStatusLovView.
I have a transient attribute on my list of values. Let's say statusDescription.
I want to sort my list of value with the transient attribute. How can I do that ?
I saw that I can easy sort with non transient attribute.
If it wasn't a LOV, I could override the executeQuery and call setSortBy(), but with a LOV it doesn't work as the executeQuery isn't called.
Any ideas?
Thanks,
Cindy

Ok I get it. The problem was that I tried to override the executeQuery() instead of executeQueryForCollection(). With LOV the first one is not used. Calling setSortBy("myTransientAttribute") in executeQueryForCollection() works just fine!

Similar Messages

  • Sorting on table with transient attributes

    Hello all,
    I would like to know if it is possible to enable sorting on a table with only transient attributes? I have an advanced table which is based on a VO that has all transient attributes. In this scenario, is there a way to enable sorting? Is this supported? Please let me know.
    Thanks in advance
    Raja

    Raja,
    Here are my responses:
    I would like to know if it is possible to enable sorting on a table with only transient attributes? >>Yes
    I have an advanced table which is based on a VO that has all transient attributes. In this scenario, is there a way to enable sorting?
    It does not depends whether the attributes are transient or not as sorting in framework will be done on view instance, you can still enable sorting in advanced table.For details refer to dev guide.Is this supported?>>Yes
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Sort view object rows with transient attributes

    Hi ,
    Is it possible to sort the results of a view object based on the populated transient attributes ?
    Best regards
    K

    K,
    Have you had a look at section 27.5 of the ADF Developer's Guide for Forms/4GL Developers ("Performing In-Memory Sorting and Filtering of Row Sets") - I've not tried it with transient attributes, but it does describe how to do in-memory sorting, as opposed to the normal way of sorting which is to send an ORDER BY to the database.
    Hope this helps,
    John

  • Can Shuttles be based non-base  table ViewObjects with transient attributes

    Hello,
    Users have to select records from a data collection and a Shuttle looks most appropriate/nice for this purpose. We can introduce technical intersection tables in order to generate the Shuttles with JHeadstart 10g R3 if necessary, but there is no “functional” need to update any data in the database and therefore it would be practical if the ‘right’ side from a Shuttle can be based non-base table ViewObjects with transient attributes only. So, our interested is to know which records have been selected, i.e. moved to the right side from the Shuttle.
    Hope that my question is clear enough.
    Greetings,
    Michael

    Michael,
    This cannot be generated out-of-the-box.
    It is easiest to add the shuttle post-generation to your page, and then create a custom template to generate your custom shuttle into the page. I suggest you take a look at an example of a generated shuttle in a page, and the JHeadstart IntersectionShuttleBean class. You will see that the value property of <af:selectManyShuttle> points to the selectedKeys method in the JHeadstart Shuttle bean. In your case, you can create your own managed bean and bind the value property to your own method which will provide you access to the selected rows. The value property of the selectItem within the af:selectManyShuttle determines the property that is used to identify the selected row (which is the row key in case of Jhs-generated shuttles).
    Steven Davelaar,
    JHeadstart Team.

  • To Set LOV to a transient Attribute??

    Hi,,
    Is it possible to set LOV To a transient Attribute?
    Also How we handle LOV programmatically???
    By NZL

    Is it possible to set LOV To a transient Attribute? you answer goes here,
    http://andrejusb.blogspot.com/2009/11/defining-lov-on-reference-attribute-in.html
    http://dstas.blogspot.com/2011/12/create-description-attribute-of-lov.html
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcquerying.htm#CHDHJHBI
    http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lov.htm
    for programatic lov
    Create and setup LOV programmatically
    Edited by: ADF 7 on Jan 9, 2012 5:41 AM

  • Make obligatory field on view with an attribute for view field equals to 'S

    I developed a maintenance view with an attribute for view field equals to 'S'.
    I want to make obligatory the field that appears in the window called: Determine work area: entry. 
    Is there some way to do it?
    Regards,

    Hi Kenneth,
    Goto the view definition (SE11), and set the attribute of the required field (column 'P'), and make it as Subset 'S'. This ensures that you cannot goto the display of view data without first entering the value for this field.
    The values displayed are also filtered for the selected value of this subset field.
    Cheers
    Rekha

  • View Object transient attributes with SQL default value

    Dear All
    I am working on JDeveloper 12.1.2
    In my scenario i have application module A in my main application. I created another data model with Application module B. I imported AM B into my main project.
    The problem is that when i have a transient attribute based on SQL statment in AM B, it gives me error in runtime on the interface but when i run the application module it works fine ... i do not know why
    Regards

    Hi,
    what sqlstatement you worte? what error?
    thanks

  • Problem with transient attribute attach to standard vo from the controller

    Hi all,
    I attached two transient attributes to the standard vo through controller.
    Then i passed values to these fields from controller based on another field in the standard vo.
    I created two columns in the table without given the view instance and view attribute.
    But in the controller i'm setting the view instance and view attribute for this two columns.
    After i applied this extended controller it is working fine, but one problem is there.
    Once if i clear the cache and then i enters the page, the extended fields are appearing with null. if i press F5 in the browser then its working fine.
    same problem happens only when the cache cleared or server gets bounced. so i need to go each page and press F5 once then everything is fine.
    Here, I shared my code, please tell me what is the problem and how to solve this.
    Code:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject cvo=(OAViewObject)am.findViewObject("FinalCompListVO");
    if(!cvo.isPreparedForExecution()){
    cvo.executeQuery();
    if(cvo!=null){
    try{
    String temp1=cvo.findAttributeDef("XXCompNameAttr").toString();
    }catch(Exception e){
    cvo.addDynamicAttribute("XXCompNameAttr");
    try{
    String temp1=cvo.findAttributeDef("XXCompTypeAttr").toString();
    }catch(Exception e){
    cvo.addDynamicAttribute("XXCompTypeAttr");
    Row compRow[]=cvo.getAllRowsInRange();
    for(int i=0; i<compRow.length;i++){
    FinalCompListVORowImpl cVORowImpl=(FinalCompListVORowImpl)compRow;
    String name[]=cVORowImpl.getName().split("\\.");
    String compName=name[2];
    cVORowImpl.setAttribute("XXCompNameAttr",compName);
    for(int i=0; i<compRow.length;i++){
    FinalCompListVORowImpl cVORowImpl=(FinalCompListVORowImpl)compRow[i];
    String name[]=cVORowImpl.getName().split("\\.");
    String compName=name[0];
    if(i==0){
    cVORowImpl.setAttribute("XXCompTypeAttr","Behavioral");
    }else if(i!=0&&compName.equals("FUNC")){
    cVORowImpl.setAttribute("XXCompTypeAttr","Functional");
    break;
    OAMessageStyledTextBean mstb=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompTypeCol");
    mstb.setViewUsageName("FinalCompListVO");
    mstb.setViewAttributeName("XXCompTypeAttr");
    OAMessageStyledTextBean mstb1=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompNameCol");
    mstb1.setViewUsageName("FinalCompListVO");
    mstb1.setViewAttributeName("XXCompNameAttr");
    Thanks in advance,
    SAN

    Hi,
    1. ExecuteQuery should already be executed in Base Controller, So please check if you need it. though i don't think that might be causing the issue.
    cvo.executeQuery();
    2. The code where you call findAttributeDef and handle the Exception, Can you debug that portion. As It may not be throwing exception in any case and so the Attributes were never added to VO and Page Displays null..
    I am not sure, but i think the issue seems to be around 2.
    all the best
    -Idris

  • Problem extending a VO with transient attributes

    I am trying to extend a VO that is based on a query with a Binding Style of Oracle Positional.
    The Attributes that are listed for the original VO are the attributes from the Query Statement plus some transient attributes.
    I extended the VO by modifying the query. Added my two columns at the END of the Select statement.
    Successfully substituted the VO but I am getting a runtime error when saving a record.
    Reviewed the extended VO and noticed that the new columns are listed as attributes AFTER the transient attributes.
    This could be the cause of the runtime error since one of the transient attributes listed after the query attributes is RowChanged.
    How can I force my new attributes to be positioned BEFORE the transient attributes?
    Is this the problem or is it something else?
    Thanks for any suggestions.

    Runtime error:
    java.lang.NullPointerException
         at oracle.apps.pos.supplier.server.ByrSuppAMImpl.validateDffVo(ByrSuppAMImpl.java:3575)
    Yes, I have checked the attributes (Updateable Always, etc.) and the attribute mappings and they all seem fine.
    My two new attributes are at the end of the original attributes. I think my new attributes should NOT be at the end of the original attributes because the original VO.xml has attributes from the query and then transient attributes that are not from the query. My extended VO now has the attributes from the original query, the transient attributes, and then my new attributes from the query.
    The first two transient attributes are RowChanged and RenderFlex and it seems like OAF is confusing it with my new attributes because:
    (1) the runtime error I get when saving (RowChanged attribute)
    (2) the Flex field icon grays out after my VO extension was deployed (RenderFlex attribute)
    To test out my theory, I would like to move my new attributes to be listed BEFORE the transient attributes.
    I tried editing the VO.xml file by moving my new attributes (query-related) to the end of the other query-related attributes and before the transient attributes (that are not query-related). When I try to view my changes inside JDeveloper, the attributes are shown in the new order (on the left) but the query mappings are still listed in the old order.
    Where can I re-order the query mappings? Tried using the up/down arrows on the right but it's grayed out.
    If I re-order the attributes in the VO.xml file and save it, is that all the change I need to do?
    Thanks.

  • View Object Transient attribute, refresh problem.

    I have a VO which contains 3 entities joined. I added it a transient attribute with Groovy expression. My expression is : ReplyView.count("ReplyId"); , it counts two VO relationship. it counts normally but, when i insert a new reply, it doesnt refresh/update/recalculate the value. Whats the problem?

    The dependency values referred to are accessed when you edit the transient attribute in the view object. On the left hand panel select dependencies and shuttle the columns that the transient is dependent on. I don't think this matters for non-entity based views since the SQL is fixed but for entity based views this assures the dependent columns are added to the query even if they are not needed by the page.
    http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcentities.htm#ADFFD20177

  • View Object transient attribute (Calculate sum) using groovy problem

    Hi
    I have a read only view object named "ConnectionVVO". And it has database field name "points"(type is number).
    Now I need to take the sum of points.
    For this I did the following.
    Self view object added to the same view object as a view accessor named "ConnectionVVO1".
    Created a transient attribute named "TotalPoints".
    Added following groovy as the value expression of the above transient attribute.
    adf.object.ConnectionVVO1.getRowSet().sum("points")after that when I run the application module and run the view object it was extremely slow. Actually nothing was appeared. There after I modified the sql statement and added a where clouse to select few rows.
    Then it was appeared without slowness.
    The table has around 11 million records.
    Could you please provide a hint or any alternate way for doing this(getting the sum of points).
    Please help.
    Edited by: deshan on Mar 9, 2011 2:56 PM

    Hi Timo,
    Thank you very much for the explanation and direction. I will do that way. I have found that implementing view object and view row class I could do the similar kind of thing for the transient attribute.
    public Number getTotalPoints() {   
    RowIterator con= getConnectionViewImpl();
       Number sum = new Number(0);
       while (con.hasNext()) {     
          sum = sum.add( (Number)con.next().getAttribute("Points"));
        }    return sum;
      } took form
    http://technology.amis.nl/blog/1295/creating-a-dynamic-ajax-column-footer-summary-in-a-table-component-using-adf-faces
    But it also slow as 1 st method
    I am wonder whether both ways behave as similarly or they are totally different implementation?

  • Treetable with transient attributes

    Hi,
    I use JDeveloper 11.1.1.2.0 to develope an ADF application.
    I need to create and show two level treetable using viewobjects theese have only transient fields.
    I have two viewobjects and a viewlink described below:
    1. VO : AccountsVO
    2. VO : ProductsVO
    Viewlink : ProductsOfAccountVL
    An account can has a lot of products. Both of viewobjects have only transient attributes.
    I have to use transient attributes because of the architecture of the application.
    I create and insert the rows to the viewobjects in managed bean.
    I need to create a treetable like below :
    AccountName1 AccountDesc1
    ---ProductNo1 ProductName1 ProductDesc1
    ---ProductNo2 ProductName2 ProductDesc2
    AccountName2 AccountDesc2
    ---ProductNo3 ProductName3 ProductDesc3
    When I drag and drop the parent VO as an ADF Tree Table then run the application, I could see only first level records.
    I mean only Accounts are shown.
    The viewlink doesn't work. Is this a bug or is it normally work like this.
    Finally I intend to create and add child node programmatically, but I don't know is it possible or not and how could it be done.
    What do you advice or what is the correct way.
    Mehmet
    Thanks.
    Edited by: mdoldur on 03.Haz.2010 12:33

    Hi Frank,
    I don't have any entity object, so I get the informations from a few different modules and
    insert them to the programmatic viewobjects which have transient attributes.
    In fact I could create 2 temporary tables on the database but I am not allowed to change the database schema.
    By the way I have updated my JDeveloper from 11.1.1.2 to 11.1.1.3 I will try the same operation and inform you.
    Thanks.
    Mehmet.

  • Getting error when trying to extend standard VO with transient attributes

    Hello,
    I am trying to extend the standard VO ReqSummaryVO in iprocurement module and getting the error "Each Row in the Query Result Columns must be mapped to a unique Query Attribute in the mapped entity columns" at step 4. This VO has a lot of transient attributes. I have gone through solutions from other threads related to this error but none of them worked for me. Can someone help me on this please?
    Thanks,
    Girish.

    Hello,
    I am trying to extend the standard VO ReqSummaryVO in iprocurement module and getting the error "Each Row in the Query Result Columns must be mapped to a unique Query Attribute in the mapped entity columns" at step 4. This VO has a lot of transient attributes. I have gone through solutions from other threads related to this error but none of them worked for me. Can someone help me on this please?
    Thanks,
    Girish.

  • Fetching vo results with transient attributes

    Hi, I have a filterable table bound to a view object.
    I created a custom multiple select functionality by adding a checkbox to each row. The checkbox correlates to a transient value on the view object. When the checkbox is selected, the transient value is set to true.
    I have a "select all" option at the top of my table, and when that is selected, it goes through all of the rows in the view object and updates the transient value to be true, then all of the rows should be selected in the ui.
    The range I have set on the iterator is 100 fetched rows at a time, but many times the total in the view object is around 1000.
    When the "select all" feature is selected, all 1000 rows are getting their transient value set in my backing bean, but this is not reflected in the UI.
    When I scroll down, 100 rows have the checkbox selected, and past that, new rows are fetched, and they aren't appearing to be selected (even though I specifically setting the value to true in the backing bean).
    Does anyone have an idea on how I can set and see a transient value for rows that have not yet been fetched?
    Thanks,
    Joel

    Hi, I have a filterable table bound to a view object.
    I created a custom multiple select functionality by adding a checkbox to each row. The checkbox correlates to a transient value on the view object. When the checkbox is selected, the transient value is set to true.
    I have a "select all" option at the top of my table, and when that is selected, it goes through all of the rows in the view object and updates the transient value to be true, then all of the rows should be selected in the ui.
    The range I have set on the iterator is 100 fetched rows at a time, but many times the total in the view object is around 1000.
    When the "select all" feature is selected, all 1000 rows are getting their transient value set in my backing bean, but this is not reflected in the UI.
    When I scroll down, 100 rows have the checkbox selected, and past that, new rows are fetched, and they aren't appearing to be selected (even though I specifically setting the value to true in the backing bean).
    Does anyone have an idea on how I can set and see a transient value for rows that have not yet been fetched?
    Thanks,
    Joel

  • Transient attribute of a view object is not reset after saving

    I have a jspx page based on view object with transient attribute(This transient attribute has been created in entity object on which view object is based). User enters data in transient attribute,some calculation is done and then data is updated and page navigates back to menu page.
    Now when I reenter page then old data still apears on the page.I want old data to be refreshed on reentering.Kindy help

    Hi,
    you can try the follwing
    In the bindings of your jspx page you can see iterators defined under "executables". set the "*CacheResults*" property of the specific view object iterator that contains the transient attribute to false.(The default value is true).
    Example:
    <iterator Binds="EditWorkflowNodesView1" RangeSize="25"
    DataControl="AdministratorAppModuleDataControl"
    id="EditWorkflowNodesView1Iterator" CacheResults="false"/>
    Regards,
    Priya.

Maybe you are looking for

  • How can I roll back from 3.0 to 2.21 ???

    Since the update to 3.0, the app NetInfo doesn't work on my Iphone (company mobile) any more. I cannot sync with the Exchange server of my company any more. I wasn't allowed to do any changes or updates. So if I tell the IT-Service I will get into se

  • Help! I installed Maverick on my MAC yesterday and now I can't open safari

    I installed Maverick and now nothing happens when I click on the Safari icon. Can this be fixed?

  • UME Configuration for R/3

    Hi, our requirement is, In User Administration if we create an user the same user needs to be automatically created in R/3 as well and viceversa please let us know the necessary configuration for this. Thanks, vijay.

  • Help! cat verify disk when burning cd with graphics

    I have a big problem. I do graphics, and I got graphics stuck in my comuter and angry impatient customers. I cant get my burner to work. It goes threw the burning process, but when its time to verify disk it spits it out. It gives an error message (e

  • [solved] /proc/acpi/thermal_zone/: No such file or directory

    i want to monitor my laptop temperature with conky but i get  Conky: scandir for /proc/acpi/thermal_zone/: No such file or directory does anyone know what i must install in order for it to work? Last edited by red-guy (2011-03-21 17:05:00)