문제

Adding new rows in ADF table

As you can see from the image attached. The user will be able to add new rows to the table (which is based on some (view object). the (Add) button is invoking action method from the Bean class where it create new row and insert the (Forward From) and (Forward Date) in it. The (Request Number) is auto generated value BUT it is not simply sequence number, it is a combination of many component that is generated based on other user input and they are not showing in the image.

Problem is since the (Request number) could be changed based on user input I do not want to store any thing in view object unless the (Request Number) is finalize which is only at (commit) time. So, I do not want to store new rows in the view object and I know already they may change.

So, I am thinking of a way to have the same User Interface i.e Table and the tow text boxes but they are not mapped to a view object. So, what I need is temporary space to store these data and in the commit time I will store them in view object where I am sure that the (Request Number) is finalized.

I am using Jdeveloper 11g with ADF Technology

도움이 되었습니까?

해결책

You can find the answer in this thread:

Storing new rows in view object at the commit time only

The answer is to use the concept of the Transient View object where it will hold data before commit time. At the commit time the data will be stored in the actual view object that is mapped to the Database table.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top