File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primefaces Data table select issue.

 
Janardhan Chowdary
Greenhorn
Posts: 15
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic