i did not provide the code for getAsObject, since the saving of the combo box works fine. If it has to do something with my problem, please ask me for this code..
The System.out.prinln prints all ids correctly, but the generated HTML Code does not select the given value in the combobox.
So whats wrong with the getAsString Method? or is the function completely somewhere else? I have to say that the function ((Keyword) obj).getId() returns a long !! is that the problem?
Any help is very appreciated
Joined: Feb 27, 2008
I think i know now where the problem is:
the value of person.getRepresentative function returns a keyword, when i printout the hashCode of the keyword object, i get e.g. 55336644
if i check the objects for the hashCode loaded in the SelectOne Combobox (printout in the KeywordConvertor.getAsString() method), i get a different hashCode for this selection!!! So there are two different objects and JSF doesn't recognise the selection of the different objects, although they have the same values.. is this correct?
By the way, we work with hibernate..
i tried also a function in the Keyword Class hashCode, which returns the id of the Database, in order to have the same ids in the objects, but no success
Anybody a solution?
If i don't find any, i forget working with objects in the selectOne Combobox but working with strings only, in the converter i get the keyword object again with the provided id. But if anyody has another solution, it would be very appreciated..