This content has been marked as final. Show 9 replies
hi 'BAO.SZ'1 person found this helpful
Using JDeveloper 18.104.22.168.0 I have tried to implement what is being described in the ADF Insider Essentials recording on "Implementing a total"
in the example application
For a new row, I seem to be able to reproduce the behaviour you describe,
see the screencast at http://screencast.com/t/Uw13l1jif
As DeDe Morton is the name mentioned at the beginning of the ADF Insider Essentials recording maybe someone can contact her and point her to your question in this forum thread.
Are you able to see the updated Salary for newly inserted record after committing the new record into database ?
Hi,Jan and appsjit
In my example, after I create a new row for detail VO2, the calculated sum field in VO1 didnot change, and when i go to anther row to edit the "old row" value and leave that field, then the calculated sum will be changed include take account the newly added row's value. (as showed in Jan's video)
and I commit data which is success, and the rows' values showed OK.
Then I edit the value VO2.Amount of the newly added row, the calculated sum didnot change yet. (*Can Jan make a test in your example for this point?*)
and I commit again, an error message was popup, saying:
+"Cannot find row in VO2 with keywords oracle.jbo.Key[null AAAFh7AAEAAACZaAAC ]"+
where AAAFh7AAEAAACZaAAC is the rowid of the newly added row which has commited to database.
(Besides VO2.rowid, there is another Primary key field in VO2.id which is populated by a database trigger from sequence).
and I rollback data, the page showed all rows include the newly added row before the latest edition.
I think maybe an possible cause for the above issue is:
Because there is another primary key VO2.id which is populated by a database trigger from sequence, when I commit data, the value of VO2.id has created but not showed in page. Then when I begin to edit this newly added row, jdev cannot find VO2.id-- then cannot calculated sum and cannot commit again?
The key issue is when rows are newly added or deleted, the calculated sum cannot change accordingly.
I donot know how to fix it and donot know if my thinking is right? Can Jan make further try on your example?
or someone else can give any help?
Edited by: BAO.SZ on 2013-5-12 下午8:16
BAO.SZ wrote:Currently not.
... Can Jan make further try on your example? ...
Maybe someone can point DeDe Morton to this forum thread, so maybe she can give some suggestions.
Hi,1 person found this helpful
have you tried a PartialTrigger property reference between the total salary field and the table Id? Note that when you create a new row, the row is added (submitted) when you change the row currency and not when the autosubmit of the Salary field is called. Autosubmit follows a partial event root, which means that the autosubmit of the Salary field does not submit the new row (though it triggers the dependent total salary field in the departments, which however sums salary for the existing rows)
This actually worked for me using JDeveloper 22.214.171.124
After tried your guidance as (in jdev 11.2.3):
--set autosubmit property to true for VO2.amount.
--set PartialTrigger property of VO1.CalAmount to VO2.tableid.
but the results is strange:
sometime, it works;
sometime, it didnot work:
--when i add more than one rows, from the second on, the sum field didnot change;
--sum field didnot change when delete rows.
--popup an error msg:"Cannot find row in VO2 with keywords oracle.jbo.Key[null AAAFh7AAEAAACZaAAC ]"
For the issue of "sum field in master VO didnot change when a new row added in detail VO", now i have found some clues:
There is a primary key for (in my example) this VO, which will be populated with value from a sequence by a database trigger, but will not show on the page until commit the data.
So, when i press the button to create new row, the PK field is still blank, and cannot trigger the calculating sum process.(?)
After i use another way to create the PK (not by database trigger, but by a groovy expression, see: How to show the primary key created by sequence before commit? ),
now for every press of createwithparas button in detail table, the calculated sum field in master table will be changed.
But i'm not sure if it's the real cause of the issue, and if it works for your example (in your sample's demo video, i see you have enter the value for the emp-id column of the detail table, is that a PK column?)
The reason for "sum field didnot change when delete rows." is that:
The delete button should be in the list of the detailed adf table's PartialProperty.
BAO.SZ wrote:Trying to use Entity Object attribute type DBSequence I ran into some strange behaviour, see also JIRA issue ADFEMG-132 , "difference when configuring type DBSequence during wizard or afterwards",
... the PK field is still blank, and cannot trigger the calculating sum process.(?) ...
... (in your sample's demo video, i see you have enter the value for the emp-id column of the detail table, is that a PK column?) ...You can check in the source code of the application I used, which I referred to before