I am using Jdeveloper 11g (184.108.40.206.0). My requirement is duplicate few column values from the above row.
I created ADF Table and used the Operation CreateWithParams. It is working; But the issue is, Always it is copying the values from first row in the table and It is inserting the new record at beginning of the ADF Table.
I want to duplicate the value from the current record position and insert the record just below that.
I referred *[ADF Code Corner 013. How-to declaratively create new table rows based on existing row content|http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf]* steps. Any suggestions.
Srinivas, Row selection is single.
I observed one more point. Even-thou it is creating the new row at the beginning of the Table, First it is copying the values from the selected row; And immediately these values are over written by the first row values.
Edited by: Surendranath Kumar on May 9, 2012 9:40 PM
1. Can you post page code for table and button along with page definition code for CcreateWithParams?
2. If you have other things coming into play in this use case, can you try creating a isolated case completely based on the tutorial, for a trial?
I followed the steps given in the tutorial. It is working fine. But I have these concerns.
1. As soon as the new record is created, validation is getting fired. It is throwing error message, saying DeparmentID value is required. How to stop this.
2. The new row is getting created ABOVE the current selected row. How can I create the row BELOW the current selected row.
+1. As soon as the new record is created, validation is getting fired. It is throwing error message, saying DeparmentID value is required. How to stop this.+
If the attribute is mandatory then it has to be provided. You cannot create a record without providing the mandatory attributes. This would fail at least when persisting the change in the database
+2. The new row is getting created ABOVE the current selected row. How can I create the row BELOW the current selected row.+
To insert the row at a specific position have a look here, which adds the row at the end
In your use case - as you use CreateWithParams, you would need to get the current row, then create your new row, remove the row again (as it is inserted in the wrong spot) and then add it back one row after the current. This indeed is easier to achieve if you manually created the row. However, its possible
I have a similar problem. The field is manditory, but I don't want to provide the value at creation time. I don't have a reasonable default value and I want to make sure the user enters a value. If I relax the Manditory requriement, then how do I find all the dirty entity objects and apply the manditory validation?