You need to sign in to do that
Don't have an account?
balakrishna mandula 19
command button with inputfile
Hi
I have a requirement on VF page which is taking fields from fieldsets. this page contains <inputfile> and commandbutton in the form. whenever Save is clicked, then entire page with the attachment will be saved. but whenever validation is occured both custom or standard validation, attachment is getting cleared.
Attachment should be retained even if page is saving.
please help to resolve this issue
I have a requirement on VF page which is taking fields from fieldsets. this page contains <inputfile> and commandbutton in the form. whenever Save is clicked, then entire page with the attachment will be saved. but whenever validation is occured both custom or standard validation, attachment is getting cleared.
Attachment should be retained even if page is saving.
<apex:pageBlock title="New Change Request" id="pgBlckId"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Submit Change Request" action="{!saveChangeRequestOnCreation}" status="actStatusId" reRender="pgscId"/> <apex:commandButton value="Cancel" action="{!cancelCR}" immediate="true"/> <apex:outputPanel id="opid"> <apex:actionStatus id="actStatusId" > <apex:facet name="start" > <img src="/img/loading.gif" /> </apex:facet> </apex:actionStatus> </apex:outputPanel> </apex:pageBlockButtons> <apex:repeat value="{!crFS}" var="fskey"> <apex:pageBlockSection title="{!crFS[fskey].Fieldset_Label_Name__c}" id="pgscId"> <apex:repeat value="{!$ObjectType.BMCServiceDesk__Change_Request__c.FieldSets[crFS[fskey].Fieldset_Api_Name__c]}" var="f"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!f.label}" rendered="{!IF(f.Label == '<BLANK>', FALSE, TRUE)}"/> <apex:inputField value="{!cr[f.fieldPath]}" required="{!OR(f.DBRequired, f.required)}" rendered="{!IF(f.Label == '<BLANK>', FALSE, TRUE)}"/> </apex:pageBlockSectionItem> </apex:repeat> </apex:pageBlockSection> </apex:repeat> Attach File <apex:inputFile value="{!attachment1_blob}" filename="{!attfileName1}" id="test" /> </apex:pageBlock>
please help to resolve this issue
we can't use reRender in command button and inputfile in same form. please suggest how acheiev this functionality. I even used action region.