Created
August 18, 2016 07:51
-
-
Save lezi/19d1dbef2ddc641b54da199da3e26cfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EditableValueHolder evh = (EditableValueHolder) this.uiInput; | |
evh.resetValue(); | |
FacesContext ctx = FacesContext.getCurrentInstance(); | |
List<String> clientIds = Lists.newArrayList("form:input1", "form:input2"); | |
UIViewRoot view = ctx.getViewRoot(); | |
view.resetValues(ctx, clientIds); // reseta os componentes da lista |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h:commandLink value="Salvar" action="#{bean.salvar}"> | |
<f:ajax render="@form" resetValues="true"/> | |
</h:commandLink> | |
<h:commandButton value="Limpar" action="#{bean.reset}" immediate="true"> | |
<f:resetValues render="form:input1 form:input2"/> | |
</h:commandButton> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment