I have a form with one field from a view object based on entity object. The rest of the fields on the table have default values. I give the default values on the EOImpl.create method. When the page loads the view object is executed with parameters, and if there is a result it's in edit mode, and if there is no result I call createInsertRow.
<invokeAction id="executeWithParams" Binds="ExecuteWithParams"
RefreshCondition="#{bindings.MyVO1Iterator.estimatedRowCount != 0}"
Refresh="default"/>
<invokeAction id="createInsert" Binds="CreateInsert"
RefreshCondition="#{bindings.MyVO1Iterator.estimatedRowCount == 0}"
Refresh="default"/>
<action IterBinding="MyVO1Iterator" id="CreateInsert"
InstanceName="MyAppModuleDataControl.MyVO1"
DataControl="MyAppModuleDataControl"
RequiresUpdateModel="true" Action="ExecuteWithParams"/>
<action IterBinding="MyVO1Iterator" id="CreateInsert"
InstanceName="MyAppModuleDataControl.MyVO1"
DataControl="MyAppModuleDataControl"
RequiresUpdateModel="true" Action="executeWithParams"/>
<NamedData NDName="" NDvalue="" NDType=""/>
I have a problem with the execution order (create insert is run on the second time i enter the page). Another problem I have is that if the user does not enter data in the field I want to rollback the row without any validation errors, but it seems that validation is happening (maybe because I give the default fields?)
I also tried calling the create row from the VOImpl class based on the .first()==null condition. It works correctly for my first error but I still get the validation error when exiting the page.
What am I missing?
Thank you