p:toolbar focus for p:inputtext

UI Components for JSF
Post Reply
tremel
Posts: 8
Joined: 11 May 2011, 14:58
Location: Altdorf, Landshut, Germany
Contact:

11 May 2011, 15:42

I have a problem with a Toolbar containing buttons and inputtext. When I leave the inputtext field in the toolbar, the return key is catched from a button in the toolbar and the wrong action is executed:
Template:

Code: Select all

<p:toolbar>  
                <p:toolbarGroup align="left">  
                    <ui:insert name="page-nav-left"></ui:insert>  
                </p:toolbarGroup>  
                <p:toolbarGroup align="right">  
                    <ui:insert name="page-nav-right"></ui:insert>  
                </p:toolbarGroup>  
            </p:toolbar>

Code: Select all

        <ui:define name="page-nav-left">
            <p:commandButton ajax="false" type="push" action="generate_report" actionListener="#{reportGenerator.generateReport}" value="#{bundle.ListPersonenPDFList}" />
        </ui:define>
        <ui:define name="page-nav-right">
            <h:panelGroup id="searchField" styleClass="searchField" style="vertical-align: middle;">
		    <h:outputLabel for="searchInput" value="#{bundle.ListPersonenLableSearch}"/>
		    <p:focus for="searchInput"/>
		    <p:inputText id="searchInput" value="#{personenController.searchFor}"></p:inputText>
		    <p:commandButton type="push" action="#{personenController.setSearchFor('')}" value="#{bundle.ListPersonenLableStopSearch}" update="personenListTable"/>
            </h:panelGroup>
        </ui:define>
In the example above a pdf is generated by #{reportGenerator.generateReport}, when i leave the searchInput with return key.

What can I do?

Thank You
Dieter Tremel
--
Dieter Tremel
PrimeFaces 3.4, PrimeFaces Extensions 0.5.0, Mojarra (JSF) 2.1.13, Glassfish 3.1.2, Netbeans 7.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 57 guests