This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Primefaces Data table select issue. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Primefaces Data table select issue." Watch "Primefaces Data table select issue." New topic
Author

Primefaces Data table select issue.

Janardhan Chowdary
Greenhorn

Joined: May 21, 2012
Posts: 15

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

Joined: Jun 25, 2001
Posts: 14477
    
    7

I edited the title to more accurately reflect the problem. It's easier to attract people who understand PrimeFaces that way.


Customer surveys are for companies who didn't pay proper attention to begin with.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Primefaces Data table select issue.
 
Similar Threads
Problem using valueChangeListener and onchange
Newbie selectOneListBox question
JSF Issue
How to make one of the Radio button default selected
JSF <<f:selectItem> will increase execution time?