You need to sign in to do that
Don't have an account?
Soumya sri yarava
Runtime Errror while using APEX:INPUTFILE, How can i handle this??
hi guys i got below Error:
apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.
Visual Froce page:
thanks
soumya.
apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.
public class InputfileExample { public blob uploadedfile{get;set;} public string filename{get;set;} public string name{get;set;} public string branch{get;set;} public void submit(){ system.debug(name); system.debug(branch); system.debug(uploadedfile); system.debug(filename); } }
Visual Froce page:
<apex:page controller="InputfileExample"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <apex:form id="one" > Entername:<apex:inputText value="{!name}" id="name"/> <br/><br/> EnterBranch:<apex:inputText value="{!branch}" id="branch"/><br/><br/> ChooseFile: <apex:inputFile id="fileUplaod" value="{!uploadedfile}" filename="{!filename}" accept=".jpeg,.png,.jpg"> </apex:inputFile><br/><br/> <script> function callme(){ var addname =$('[id$=name]').val(); var branch =$('[id$=branch]').val(); if(addname ==''){ alert('name is required'); }else if(branch ==''){ alert('branch is required'); }else{ submitcall(); } } </script> <apex:actionFunction name="submitcall" action="{!submit}" reRender="one"/> <apex:commandButton value="Submit" onclick="callme();" RERender="T" /> </apex:form> </apex:page>Please provide a solution for this ,
thanks
soumya.
Change line 22 and 23 to:
<apex:actionFunction name="submitcall" action="{!submit}"/>
<apex:commandButton value="Submit" onclick="callme();" />
<apex:actionFunction name="submitcall" action="{!submit}"/>
<apex:commandButton value="Submit" onclick="callme();return false;" />
thanks
soumya...!
After clicking on the submit button:
the image file selected is getting clear from the scren ,as the screen load, can u pleae suggest some tipes
thank you
soumya sree
thanks