Disclaimer: I'm new to JSF but still couldn't find any other questions to help me with this.
I have a CRUD view in JSF(More specifically in a primefaces dialog if that's important) when I have the ID as a long it works fine, but when I use ObjectID as the ID(I use ObjectID because Morphia will auto-generate an ID if using ObjectID).
What happens is the ObjectID transfers down to the view and displays fine, but when I click save nothing happens(Breakpoint doesn't get hit in save method and no errors are displayed in the console) as mentioned before if I use a long as an ID this works fine.
Here is the input field of the ObjectID and the action for the save button(I display the ObjectID as the save method returns with a null ObjectID and just creates a new record if I don't).
<p:inputText value="#{dealerBean.selectedDealer.id}"
style="display:none;" />
<p:commandButton id="saveButton" value="Save" update="dealers"
actionListener="#{dealerBean.save}"
title="Save" type="Submit" oncomplete="dealerDialog.hide()">
</p:commandButton>
//type of selectedDealer
@com.google.code.morphia.annotations.Entity
class Dealer {
@com.google.code.morphia.annotations.Id
@Property //Generates getters and setter in XTend
org.bson.types.ObjectId id;
}
My guess is that it's having trouble de-serializing ObjectID(No error message in console though) but I don't know JSF well enough to know where to go from there and any help would be appreciated.