On 30/01/2013 14:05, Giri Prasad wrote:
Hello All,

  I have a very simple jsf page and a backing bean for this jsf, which is 
implemented in hibernate using Netbeans.

  <Select> button does properly populate the list box. <Details> button does 
display the debug message in glassfish log, when no entry in list box is chosen.

  After I press <Select>, choose a entry from the list, pressing <Detail> 
button, is not executing the backing bean function 'studDet()'. On this situation, the 
screen just refreshes, the list goes empty, and the backing bean function is not executed.

  The same backing bean function ['studDet()']  is executed when nothing is 
selected from the list. Apparently the logic when implemented via jpa seems to 
work just perfectly correctly.

Can any one provide your insights, as why this problem is occuring. Thanks in 
advance.
I recently had a problem with jsf+hibernate, with another control from the selectOneXXX family (see http://forum.primefaces.org/viewtopic.php?f=3&t=27919#p88162 and later)

My problem was that I was comparing "real" objects and "hibernate proxy" objects. The standard java equals function just fails in this case. I do not see how you fetch your objects, but this might be the case.

Your problem might also be simplier. I am also a bit surprised that you return a list of SelectItem as value for your f:selectItems.

Let say that you have a Student type.
You will then have a

    List<Student> getStudentList()

method and a custom Converter to propertly manage the String <-> Object mapping.

Your selectedItem property should in this case also be of Student type.


Hope this helps,

Ludovic

|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|

Reply via email to