• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Primefaces Data table select issue.

 
Greenhorn
Posts: 15
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I have a requirement in my JSF based project, i.e., select one record from a datatable by using the below line of code in xhtml page.

<p:column selectionMode="multiple"/>
<p:column>1<p:column>
<p:column>2</p:column>....so on...

After selection --> click on 'save' -->data saved.

But when I try to open the same page again, i am getting previous selected records in selection mode.

So how to get them in unselect mode....?

Please let me know if you have any solution or reference.

Thanks,
Janardhan.B
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I edited the title to more accurately reflect the problem. It's easier to attract people who understand PrimeFaces that way.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read up on the JSF lifecycle, it is quite complicated.

What appears to be happening is your view state is saved, then restored (hence the resetting of the selections).

You may need to do some work in your backing bean(s) to clear those out.

WP
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic