User, again, please provide your jdev version with your question!
1) A VO which is not based on a EO can't be changed and you will not get an input form for a row for it.
2) once the data is removed and committed it's gone. You would need to store each change to the data of a row in a new row distinguished by a date from each other. Then you can go back to every state in time.
Hi Timo and thanks alot .
my JDEV version is 184.108.40.206 .
Dear Timo, i cant speak english very well so maybe i cant say my purpose as well as you .
now i write what user expects
once the data is removed and committed it's gone. its OK . but ...
client wants i add a popup to all field and when he select undo from filed`s popup ,
value of field resets to original value. for example at first time that page loaded
amount = 100 then user changed it to 150
NOW he want right click on field and select undo change , and he expects at this time amount
resets to 100 same as first time .
Assuming your VO is based on an EO you can implement a service method in the VO which gets the last committed value of an attribute back. This method you call if the user wants to undo a not committed change.
The method of VO accepts the name of attribute (or the index) and return the last postet attribute. The way to get in the EntityImpl as
protected java.lang.Object getPostedAttribute(int index)
Gets the value originally read for this attribute from the database.
thanks Timo for your help & attention
"Assuming your VO is based on an EO" ....
my manager dosn`t permit to create VO based on an EO ...
At last i think about this soloution :
- create a ReadOnly VO and in its Query for "amount" i select twice amount with separate name(amount and amountOriginal).benefit of this act is keep
original data always separate in another field that dosnt change any time so i have original value.
- set updateable attribute for amount to Always .(however VO is read only but on page can change fields)
- on page whenever user needs to reset value of amount , i copy value of amountOriginal to amount .
- finally simulate commit button . when user press a button for save his changes i iterate VO and decide about which function in database must call .
NOW my ask is :
is my solution implementable ? is it good or bad solution ?
You can try to implement this. Not sure which problems you are running into as you are fighting the framework and have to cope with the framework fighting back.
How are you supposed to write the changed data back to the db and when?
Whatever you do, if you are using adf business components using an VO based on an EO is the best solution.