I have the below button:
<h:commandButton value="Download" action="#{listFiles.downloadFile}" />
And the below action method:
public void downloadFile()
{
// Some code.
}
But when I press the button nothing happens. The action method is not invoked.
In the server log I see:
The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within
<h:form>
this work for me
My file in folder path
cod in
xhtml
filebeans