This content has been marked as final. Show 7 replies
For table, did you set the row selection other than 'none'?1 person found this helpful
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.
Hi,1 person found this helpful
For ur point 1, In Entity level DeparmentID is markrd as mandatory?? if so you need to include that attribute in your creatWithParam action.
+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?