Sorry to bother everybody again, But this Thread somehow got deviated from main subject. The problem I have posted in this email is encountered in Most of the CRUD Forms in Ofbiz. Please share if somebody can think of Ideas on workaround this problem.
Regards Anil Patel On 12/18/06, Anil Patel <[EMAIL PROTECTED]> wrote:
Hi, We have forms that handle create/update entity data. One of the common problems user run into is, In the Create New Form (e.g New FixedAsset) user enters value in Id field. There is possibility that the value entered may already exist in database. In such situations, Form returns with error message, But also Opens existing entity in Edit/Update mode in the form. This confuses user. Most of these create/update form directly post to CRUD services. Is it OK if I added a Simple Method event handler that took the request call and forwarded to CRUD service and then on return of service check if there is error, In case of error set the value of primary key field to nothing so the create/update form will not be able to read existing entity to open it in Edit mode. If this is Ok to do, Should I add Event handler simple methods in existing services xml files (e.g FixedAssetServices.xml) Or should I create a new file that will have such event handler simple methods. If I can get Feedback on this email it will be easy to prepare a patch to fix http://issues.apache.org/jira/browse/OFBIZ-547. Regards Anil Patel
