0

i am using the primefaces keyboard to search for some articles in the application. My problem is that i have a commandButton that goes to a method in the managed bean which does the search. When arriving in the managed bean the string assigned to the keyboard component is empty.

Here is the part with the component in jsf file

<h:panelGroup id="ric_tastiera" layout="block"
        style="display:none; overflow:hidden; height:180px;">
            <p:keyboard id="qwerty" value="#{dpDisponibilita2.pressed_letter}" layout="qwertyBasic" />
            <p:commandButton action="#{dpDisponibilita2.caricaArticoliDaLettera}" value="Search" ajax="true" />
</h:panelGroup>

What i am missing or doing wrong ?

Thanks in advance

Viocartman
  • 153
  • 3
  • 14

1 Answers1

1

Each action should enclosed by a <h:form> to fire the action. Actions will not fire if there is no enclosing h:form.

It is better to use h:form tag to cover the whole page. You should be avoid using nested forms.

See also

commandLink/commandButton/ajax backing bean action/listener method not invoked

Community
  • 1
  • 1
erencan
  • 3,725
  • 5
  • 32
  • 50