java - How to refresh all fields in a form? -


i trying refresh fields in form click checkbox:

            <h:selectbooleancheckbox id="#{id}"                  styleclass="checkbox"                 value="#{value}"                 required="#{required}"                  disabled="#{not empty readonly , readonly ? true : disabled}"                                 onclick="showloading();" >                 <a4j:support event="onchange" rerender="pessoadocumentoidentificacaoform" oncomplete="hideloading();" />             </h:selectbooleancheckbox> 

the problem pessoadocumentoidentificacaoform, it's jboss seam. fields in form refreshed, except these stated @ tipodocumento value...

<components xmlns="http://jboss.com/products/seam/components" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd         http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd         http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">  <component name="pessoadocumentoform" class="br.com.itx.component.form">             <property name="formid">pessoadocumentoidentificacao</property>             <property name="fields">             <value>nome:{required:true,type: inputtextdocumentoidentificacao, properties : {rendered: #{not justicatrabalho},label: 'nome registrado neste documento'}}</value>                 <value>tipodocumento:{type: combopessoatipodocumento, required: true,                         properties:{items: #{precadastropessoabean.ispermiteedicaodocumentosprincipais() ? 'tipodocumentoidentificacaoitems' : 'tipodocumentoidentificacaosemdocumentosprincipaisitems'}}}</value>                           <value>usadofalsamente: {required: false, type: sim_nao, properties: {rendered: #{not justicatrabalho}}}</value>                         <value>documentoprincipal: {type: checkboxdocumentoprincipal, properties: {rendered: #{not justicatrabalho}}}</value>                 <value>ativo: {required: true, type: radiosituacao}</value>                  </property>             <property name="buttons">gravardocumentopessoa</property>          </component>     </components> 

...the true conditional of decision (ispermiteedicao) redirects these fields a4j cannot refresh:

<component name="tipodocumentoidentificacaoitems" class="br.com.itx.component.selectitemsquery">     <property name="ejbql">select o tipodocumentoidentificacao o</property>      <property name="restrictions">         <value>o.tipopessoa = #{pessoadocumentoidentificacaohome.instance.pessoa.intipopessoa}</value>         <value>o.tipopessoa = #{pessoahome.instance.intipopessoa}</value>     </property>     <property name="order">tipodocumento</property> 

here below can see results: i posted here images clarify results.

gotcha!

following this issue, added ajaxsingle="true"to method, shown below:

<a:support event="onchange" rerender="pessoadocumentoidentificacaoform" oncomplete="hideloading();" ajaxsingle="true" /> 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -