Problem when receiving value in a select with richfaces

Asked

Viewed 29 times

0

Good morning guys, I need help in the example below:

 <rich:select value="#{bdaBean.argosDocum.localizacaoObra}"  disabled="#{not(bdaBean.usuarioPodeAtualizarBDA)}" height="20px" style="padding-right:10px; margin-botton:30px;" enableManualInput="true" itemValue="bdaBean.listaCodob">
      <f:selectItems value="#{bdaBean.listaCodob}" />
 </rich:select>
      <h:inputText  value="#{bdaBean.argosDocum.localizacaoObra.item}" disabled="#{not(bdaBean.usuarioPodeAtualizarBDA)}" style="padding-bottom: -; border-bottom-width: 1px; margin-top: 8px; height:15px;" />
 </h:panelGrid>

In bdaBean.argosDocum.locationObra comes an initial default value from this list, I would like to change this value after selecting some element from this list to change the item in input text automatically.

How should I do?

1 answer

1

The best way for you to do this is by using ajax, for JSF there is a component for you to work with ajax using richfaces is a4j. In their showcase you can see this example. Remembering that the richfaces was discontinued in 2016 then for new projects using JSF it would be good if you seek other alternatives.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.