Aquí tengo un código jsf para archivos de entrada que tienen un validador de formularios.
<h:form id="myForm"> <script> function resetform() { document.getElementById("anomalies-list-form").reset(); } </script> <h:panelGrid> <h:outputText value="Source IP"/> <h:panelGroup> <h:inputText id="SourceIP" size="13" value="#{dataListBean.sourceIp}" title="Enter first few letters for searching similar records" > <f:validator validatorId="SQLInjectionValidator"/> </h:inputText> <h:message style="color:red" for="SourceIP"/> </h:panelGroup> <h:outputText value="IP"/> <h:panelGroup> <h:inputText id="IP" size="13" value="#{dataListBean.destIp}"> <f:validator validatorId="SQLInjectionValidator"/> </h:inputText> <h:message style="color:red" for="IP"/> </h:panelGroup> <h:outputText value=""/> <h:panelGroup> <h:commandButton id="show" value="Show" action="#{dataListBean.showSelectedType}"/> <h:commandButton id="clear" value="Clear" onclick="resetform()"> </h:commandButton> </h:panelGroup> </h:panelGrid> </h:form>si obtengo una validación en cualquier archivo, quiero borrar todos los archivos con el botón Borrar, pero no funciona.