function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
como_estascomo_estas 

Field Set Validation & Close Window

Hi There -

 

I am trying to figure something out involving field sets and this potentially unique situation I have.  Here's the scenario:

 

I have a standalone VF page (no header / sidebar) which is a form for editing a custom object.  This page is displayed inside an iframed window.

 

I have the save button set up like so:

<apex:commandButton action="{!save}" value="Save" onclick="setDates()" oncomplete="closeWindow(true)" rendered="{!OrgEvent__c.Event_Series_ID__c == null}" reRender="editEventForm"/>

So when the save action completes, it closes the window.  Here's the problem.  If there are validation issues with fields in the fieldset, oncomplete still gets fired and the window closes, when in fact, I only want the form, with errors, to rerender.

 

I can't see any way to determine if the operation completed with validation errors, or if it actually saved.  Does anybody know where to look?  Debug statements in my save method in the controller are not happening, so I don't think the save method even gets called when there are validation errors.

 

Thanks

Morgan