java - Error getting the id of DefaultScheduleEvent Primefaces Schedule -
I am trying to set the "setId" and "getId" of a DefaultScheduleEvent object Set the id of the object and manually the event ID (like 15 ), but when I try to get the ID (I expect 15 to be set ) I liked something like this: c3e083a9-c418-4753-976c-801c0e9e6157 , which I believe is an object ID, Do you know that I Once set, So do not get? I'm using Prefetch 4.0 After working on this for a while, I got a solution that worked for me The problem is that when you add event to event model, then ID is specified. If you set an id after the event model has been added, then it will keep good id use:
Personal Schedule Model Deficiency Model; Private ScheduleEvent event; Event = new DefaultScheduleEvent (title, startDate, endDate); EventModel.addEvent (event); Event.setId (clientEntity.getId ()); Instead of
event = new DefaultScheduleEvent (title, startDate, endDate); Event.setId (clientEntity.getId ()); EventModel.addEvent (event);
Comments
Post a Comment