Good morning staff
How can I pass the contents of an inputText to 2 ManagedBeans? Example
<p:inputText id=“usuario” value="#{usuarioBeanCelular.usuarioCelular}" />
<p:inputText id=“usuario” value="#{usuarioBeanTelefone.usuarioTelefone}" />
Good morning staff
How can I pass the contents of an inputText to 2 ManagedBeans? Example
<p:inputText id=“usuario” value="#{usuarioBeanCelular.usuarioCelular}" />
<p:inputText id=“usuario” value="#{usuarioBeanTelefone.usuarioTelefone}" />
There is no such option, the value of inputtext only accepts an object, as it appears in the documentation: link . I think you're making a mistake in modeling your manegedbean, why would you need two MB to input a phone number? Would not it be easier to control this in one MB? If you want to continue with this option, an exit would be to take the instance of the second MB and pass the value entered in the first MB. In the first MB you would have something like this:
Bean bean = (Bean) request.getSession().getAttribute("beanName");
bean.setMeuAtributo(meuAtributo);