You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the fileUpload component with bootsfaces commandButton and inputText, everything works fine until the update after the validations. When i submit the form and some validation error occurs (i.e. requited field not entered), everything runs smoothly (field with error are highlighted, msgs are displayed, etc) except that looks like the form crashes, I'm not able to submit again, and nothing is updated on UI. I've tried to change from boots:commandButton to prime:commandButton and then it works fine. <h:form enctype="multipart/form-data"> <b:row> <b:column span="3"> </b:column> <b:column span="6"> <b:panel title="Cadastro de #{msg.produtos}" collapsible="false"> <b:row> <b:column span="6"> <b:panelGrid id="inputGrid" colSpans="12"> <b:selectOneMenu label="#{msg.categoria}" value="#{menuMBean.categoria}" required="true"> <f:facet name="prepend"> <b:iconAwesome name="bars" addon="true" /> </f:facet> <f:selectItem itemValue="" itemLabel="Selecionar" /> <f:selectItems value="#{appMBean.categoria}" /> </b:selectOneMenu> <b:inputText label="Nome" renderLabel="true" id="nome" value="#{menuMBean.model.nome}" placeholder="ex.: Da Casa" required="true" requiredMessage="#{msg.mandatory_field}" /> <b:inputText label="#{msg.preco}" renderLabel="true" id="preco" value="#{menuMBean.model.preco}" tooltip-position="bottom" required="true" requiredMessage="#{msg.mandatory_field}"> <f:facet name="prepend"> <h:outputText value="R$" /> </f:facet> </b:inputText> <b:inputTextarea label="#{msg.descricao}" renderLabel="true" id="desc" value="#{menuMBean.model.descricao}" placeholder="ex: Feito com XXg de carne de ..." /> </b:panelGrid> </b:column> <b:column span="6"> <b:well style="height:auto"> <p:graphicImage value="/img/burgue1.jpeg" width="310" height="auto" rendered="true" /> <b:iconAwesome name="question-circle" size="5x" styleClass="center" disabled="true" rendered="false" /> </b:well> </b:column> </b:row> <b:well> <p:fileUpload sizeLimit="#{msg.file_size_limit}" id="upload" value="#{menuMBean.foto}" label="Foto" update="msgs" mode="simple" fileUploadListener="#{menuMBean.enviaFoto}" skinSimple="true" /> </b:well> <b:row> <b:column span="2"> </b:column> <b:column span="4"> <ui:remove> <p:commandButton value="#{msg.enviar}" update="@form @form:upload" styleClass="wide-bt" action="#{menuMBean.cadastra()}"></p:commandButton> </ui:remove> <b:commandButton value="#{msg.enviar}" look="success" onclick="ajax:menuMBean.cadastra()" iconAwesome="save" size="lg" update="@form @form:upload" styleClass="wide-bt" /> </b:column> <b:column span="4"> <b:commandButton value="Limpar" type="reset" look="danger" size="lg" iconAwesome="eraser" styleClass="wide-bt" /> </b:column> <b:column span="2"> </b:column> </b:row> </b:panel> </b:column> <b:column span="3"> </b:column> </b:row>
The text was updated successfully, but these errors were encountered:
rapzodo
changed the title
Doesn't works well with <prime:fileUpload> component
<boots:commandButton> Doesn't works well with <prime:fileUpload> component
Apr 24, 2016
I'm using the fileUpload component with bootsfaces commandButton and inputText, everything works fine until the update after the validations. When i submit the form and some validation error occurs (i.e. requited field not entered), everything runs smoothly (field with error are highlighted, msgs are displayed, etc) except that looks like the form crashes, I'm not able to submit again, and nothing is updated on UI. I've tried to change from boots:commandButton to prime:commandButton and then it works fine.
<h:form enctype="multipart/form-data"> <b:row> <b:column span="3"> </b:column> <b:column span="6"> <b:panel title="Cadastro de #{msg.produtos}" collapsible="false"> <b:row> <b:column span="6"> <b:panelGrid id="inputGrid" colSpans="12"> <b:selectOneMenu label="#{msg.categoria}" value="#{menuMBean.categoria}" required="true"> <f:facet name="prepend"> <b:iconAwesome name="bars" addon="true" /> </f:facet> <f:selectItem itemValue="" itemLabel="Selecionar" /> <f:selectItems value="#{appMBean.categoria}" /> </b:selectOneMenu> <b:inputText label="Nome" renderLabel="true" id="nome" value="#{menuMBean.model.nome}" placeholder="ex.: Da Casa" required="true" requiredMessage="#{msg.mandatory_field}" /> <b:inputText label="#{msg.preco}" renderLabel="true" id="preco" value="#{menuMBean.model.preco}" tooltip-position="bottom" required="true" requiredMessage="#{msg.mandatory_field}"> <f:facet name="prepend"> <h:outputText value="R$" /> </f:facet> </b:inputText> <b:inputTextarea label="#{msg.descricao}" renderLabel="true" id="desc" value="#{menuMBean.model.descricao}" placeholder="ex: Feito com XXg de carne de ..." /> </b:panelGrid> </b:column> <b:column span="6"> <b:well style="height:auto"> <p:graphicImage value="/img/burgue1.jpeg" width="310" height="auto" rendered="true" /> <b:iconAwesome name="question-circle" size="5x" styleClass="center" disabled="true" rendered="false" /> </b:well> </b:column> </b:row> <b:well> <p:fileUpload sizeLimit="#{msg.file_size_limit}" id="upload" value="#{menuMBean.foto}" label="Foto" update="msgs" mode="simple" fileUploadListener="#{menuMBean.enviaFoto}" skinSimple="true" /> </b:well> <b:row> <b:column span="2"> </b:column> <b:column span="4"> <ui:remove> <p:commandButton value="#{msg.enviar}" update="@form @form:upload" styleClass="wide-bt" action="#{menuMBean.cadastra()}"></p:commandButton> </ui:remove> <b:commandButton value="#{msg.enviar}" look="success" onclick="ajax:menuMBean.cadastra()" iconAwesome="save" size="lg" update="@form @form:upload" styleClass="wide-bt" /> </b:column> <b:column span="4"> <b:commandButton value="Limpar" type="reset" look="danger" size="lg" iconAwesome="eraser" styleClass="wide-bt" /> </b:column> <b:column span="2"> </b:column> </b:row> </b:panel> </b:column> <b:column span="3"> </b:column> </b:row>
The text was updated successfully, but these errors were encountered: