Jsf remoteCommand和inputMask don';我们不能一起工作
我试图进行地址验证,当我设置CEP时,系统将转到托管bean,请求Web服务并返回有关街道、城市和州的信息(CEP是一种地址代码)。 但是,当我将remoteCommand与inputMask组件一起使用时,我的托管bean没有收到对象中的信息,cep属性为null 我有一个带有@ViewScoped的托管beanJsf remoteCommand和inputMask don';我们不能一起工作,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我试图进行地址验证,当我设置CEP时,系统将转到托管bean,请求Web服务并返回有关街道、城市和州的信息(CEP是一种地址代码)。 但是,当我将remoteCommand与inputMask组件一起使用时,我的托管bean没有收到对象中的信息,cep属性为null 我有一个带有@ViewScoped的托管bean <p:remoteCommand name="remoteCep" actionListener="#{empresaTerceiroMB.buscarCep}" proces
<p:remoteCommand name="remoteCep" actionListener="#{empresaTerceiroMB.buscarCep}" process="@this" async="true" update="cep, logradouro, bairro, cidade, estado, mensagens" >
<p:inputMask id="cep" mask="99999-999" value="#{empresaTerceiroMB.endereco.cep}" title="#{msgs.msgCepEmpresa}" maxlength="8" onblur="remoteCep()" style="width: 90%" />
</p:remoteCommand>
嗯,我从来没有像您使用远程命令那样使用过它。我甚至不确定它是否应该有一个子组件 最好的方法是:
<p:inputMask id="cep" mask="99999-999" value="#{empresaTerceiroMB.endereco.cep}" title="#{msgs.msgCepEmpresa}" maxlength="8" onblur="remoteCep()" style="width: 90%" />
<p:remoteCommand name="remoteCep" actionListener="#{empresaTerceiroMB.buscarCep}" process="cep" async="true" update="cep, logradouro, bairro, cidade, estado, mensagens" />
您希望
输入掩码
对远程命令
有什么作用?您知道它们甚至不在同一个组件系列中:remoteCommand
是一个命令组件,inputMask
是一个UIInput
。如果有的话,它们应该反向嵌套。无论如何,这都不可能