You need to sign in to do that
Don't have an account?
Sure@Dream
required="true" for apex:inputFile
Hi All,
I have used required="true" for apex:inputFile.
On click of a custom button, I am trying to upload that file.
But even if its required="true", the controller method is getting called and null pointer exception is being thrown.
We cannot keep rerender in conjuction with rerender attribute. So I am not keeping rerender for this button.
How can check whether a file is selected or not?
I have used required="true" for apex:inputFile.
On click of a custom button, I am trying to upload that file.
But even if its required="true", the controller method is getting called and null pointer exception is being thrown.
We cannot keep rerender in conjuction with rerender attribute. So I am not keeping rerender for this button.
How can check whether a file is selected or not?
I tried setting up a simple doc upload and when the doc was blank, the controller threw an error onto my VF page.
The code I used to try to duplicates your problem (although there is no code to duolicate agains) was as follows;
VF page;
Controller;
This code shows the following errors when you don't specify a file;
With "Required="true" the message in the red rectangle appears. Without the "required" tag just the message below the rectangle is showing.
Can you give some more detail?