p:ajax inside a DataTable

UI Components for JSF
Post Reply
pmartin8
Posts: 39
Joined: 11 Feb 2010, 15:54

25 Feb 2010, 01:44

Hello

Look at this Code

Code: Select all

<p:growl id="growl"  showDetail="true" />
<p:dataTable id="tbl" value="#{carBean.cars}" var="car" selection="#{carBean.myCar}" selectionMode="single" rows="15">
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Kind"/>
                            </f:facet>

                            <p:inplace label="#{car.name}" >
                                <h:selectOneMenu id="type" value="#{car.myCar}" >
                                    <p:ajax  event="blur" actionListener="#{carBean.updateMyCar}" update="growl"/>
                                    <f:selectItems value="#{carBean.allCars}"/>
                                </h:selectOneMenu>
                            </p:inplace>

                        </p:column>
                    </p:dataTable>


When there is a Blur on the first Row, the actionListener is called once...
When there is a Blur on the second row, the actionListerner is called twice...
And guess what... When there is a Blur on the third row, the actionListener is called three times!

Bug?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

25 Feb 2010, 11:51

Hi,

Why do you use "blur" and not "change" event? Did you try with f:ajax (JSF 2 standard)?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

pmartin8
Posts: 39
Joined: 11 Feb 2010, 15:54

25 Feb 2010, 15:33

Well, I alos tried with event=change but its the same behavior.


I don't have the tag "ajax" inside the core JSF jar (http://java.sun.com/jsf/core)... A guess the ajax tag must be in the dynaface bundle... But I would prefer to stay with that Primefaces component! Of course!!

Is there any way to solve this problem?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests