<p:ajax event="page" process not working in 3.0 M4

UI Components for JSF
Post Reply
User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

03 Nov 2011, 16:52

I have a selectOneRadio inside a p:dataTable column as given below. If i use <p:ajax event="page" to process any selection of the option in radio button just before a page change, it is not getting reflected when i come back to the page.

That is
Step 1: Assume user is on page 1. He selects the first option in the selectOneRadio.
Step 2: User clicks on page 10 and the page 10 content is shown. (Now I expect due to the process attribute value the previous selection would get updated at server side)
Step 3: Again user clicks on page 1. Now the first option in the radio button IS NOT selected (The first option was selected in step 1)

Is this the desired behavior or I am wrong in my understanding?

Code: Select all

 <p:dataTable  id="qlist_tbl" widgetVar="qlisttbl"  paginator="true" rows="1"  value="#{freeExamDeliveryAction.examToDeliver.questionCollection}" var="q">
     <p:ajax event="page" process="SelAnswerRadio"/> 
   <p:column>
    <h:selectOneRadio styleClass="smallWidth"  id="SelAnswerRadio" value="#{q.radioSelOption}" rendered="#{q.isRadio}" layout="pageDirection">
              <f:selectItems value="#{q.populateSI()}"/>
     </h:selectOneRadio>
   </p:column>
 </p:dataTable>

PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

03 Nov 2011, 17:15

This is the request of the AJAX Request POST content. Here we can see the selected Radiobutton Option value being passed to server. (exam is form id which is like <h:form prependId="false" id="exam">)
exam exam

qlist_tbl:3:SelAnswerRadio 7613

j_idt63

javax.faces.ViewState 4185588415187355485:-5101563349333132406

javax.faces.partial.ajax true

javax.faces.source qlist_tbl

javax.faces.partial.execute qlist_tbl qlist_tbl

javax.faces.partial.render qlist_tbl

javax.faces.behavior.event page

javax.faces.partial.event page

qlist_tbl_paging true

qlist_tbl_first 4

qlist_tbl_rows 1

qlist_tbl_page 5

qlist_tbl_updateBody true
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

04 Nov 2011, 18:50

Any one has tried <p:ajax event="page" to update other components ?
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

jtrotman
Posts: 49
Joined: 29 Nov 2010, 14:32
Location: United Kingdom

04 Nov 2011, 19:01

I've used it without problems in M3 - are you saying that it has broken in M4? If so it's probably worth raising an issue ticket once you're happy it's a bug.

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

05 Nov 2011, 22:29

PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

17 Nov 2011, 19:57

Bumping the post as now Cagatay might have a look at it as he has completed PrimeFaces documentation :)

Related issue is http://code.google.com/p/primefaces/iss ... il?id=2743
PrimeFaces 3.4, Seam Faces 3.0.2.Final, Glassfish v3.1, Mojarra 2.1.10, NetBeans 7.2, Hibernate JPA 2.0, Seam Persistence 3.0.0.Final Theme default HOT-SNEAKS

User avatar
kwintesencja
Posts: 316
Joined: 08 Feb 2010, 20:33
Location: Brazil

18 Nov 2011, 17:10

maybe its not working cause the id SelAnswerRadio is prepended by row id at render time so for each row you will have something like 0:SelAnswerRadio, 1:SelAnswerRadio, and so on, i think p:ajax can't know which SelAnswerRadio he has to process


it is just a guess, try processing a component outside the datatable and see if it works.
Att,

--

Rafael Mauricio Pestano


Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano

jopasa
Posts: 3
Joined: 09 Apr 2011, 18:15

28 Nov 2011, 13:23

hi

i read your forum posts bercolax and i failed at the same issue. Its defintely not his failure
maybe its not working cause the id SelAnswerRadio is prepended by row id at render time so for each row you will have something like 0:SelAnswerRadio, 1:SelAnswerRadio, and so on, i think p:ajax can't know which SelAnswerRadio he has to process
it is just a guess, try processing a component outside the datatable and see if it works.
i craeted issue ticket with some source to reproduce my problem:

https://code.google.com/p/primefaces/is ... il?id=2910
NetBeans 7.1 Beta, GlassFish 3.1.1, Java EE 6, PrimeFaces 3.0.RC1-SNAPSHOT, and Mojarra 2.1.3

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 50 guests