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
Ritika JRitika J 

apex:inputFile can not be used in conjunction with an action component, apex:commandButton

Hi ,

 

I have addded <apex:inputfile > to my page , which is also using rerendering attribute.I am getting this error. Can anybody help me with this.

apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.

 

 

Regards,

Ritika

Mohith Kumar ShrivastavaMohith Kumar Shrivastava

The exception that comes explain your problem.You have rerender attribute and hence you cannot rerender command button.The only way to solve this issue is use multiple forms as in winter 13 and separate input file.But even after this i see issues coming in getter setters and Object getter setters .

 

 

 

vishal@forcevishal@force

it may not be ideal, but what we did was we removed the "rerender" attribute and if there was any exception, we reloaded the page again with a parameter that identifies it is a reload.

 

Another approach we used once was to keep the inputFile on a separate page because trying a lot of things, we still couldn't use it with a rerender.