4 Replies Latest reply: Dec 6, 2012 4:10 PM by Don Kleppinger RSS

    View Object Transient attribute, refresh problem.

    895797
      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?
        • 1. Re: View Object Transient attribute, refresh problem.
          792033
          You have to call the execute operation of your VO in order to refresh the result set. It depends on how you are using your VO but, one approach is to insert the execute operation on the bindings of your page and then insert an invokeAction on the executables section which references the execute operation or another approach is to bind a button with the execute operation or another approach is to partial trigger the table which is binded to your data control.
          • 2. Re: View Object Transient attribute, refresh problem.
            hofespet
            Hi,

            check whether you have set the dependency of the transient attribute to "ReplyId" in the VO attribute section.

            regards
            Peter
            • 3. Re: View Object Transient attribute, refresh problem.
              895797
              I did your suggests. Then, nothing changed. I cant add to dependencies cause my view object doesnt contain another, their relationship calculated via Link Object. I solved the problem by extending my VO with **ViewObjRowImpl and editing getter method of my ReplyCount transient attribute with native SQL query.
              • 4. Re: View Object Transient attribute, refresh problem.
                Don Kleppinger
                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