autocomplete - how to call action always

UI Components for JSF
Post Reply
edudebom
Posts: 70
Joined: 14 Jan 2011, 18:01
Location: Brazil

15 Feb 2011, 18:27

I would like to call an action on an autocomplete even that the value isn´t in the database (arraylist). Do this component do it ?
only works if I select an element. If is different of the arraylist don´t work the action.

Code: Select all

<p:autoComplete value="#{cadastroPessoasMB.selectedTag}"
                                                        completeMethod="#{cadastroPessoasMB.loadTags}"
                                                        var="tag"
                                                        required="true"
                                                        itemLabel="#{tag.nome}"
                                                        itemValue="#{tag}"
                                                        converter="converteTag"
                                                        forceSelection="false"
                                                        maxResults="10"/>
                                    </p:column>

                                    <p:column style="width: 170px">
                                    <p:commandButton
                                        value="New"
                                        action="#{cadastroPessoasMB.gravaPalavra}"
                                        />
                                    </p:column>
Mojarra 2.1.6; GlassFish 3.1.2.2; PrimeFaces 4.0-SNAPSHOT
Brasil

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests