Hello, You are using addExtension instead of addExtendedProperty to add an extended property, that is why it is not working.
Best, Alain On Tue, Aug 9, 2011 at 3:15 AM, L. G. <[email protected]> wrote: > My problem : > > CalendarEventEntry temp = new CalendarEventEntry(); > > temp.setTitle(new PlainTextConstruct("Test001")); > setNewExtProperty("Blabla","Ok", temp); > setNewExtProperty("PKID","007", temp); > showExtended(temp); > > Result : > > "Extended property (0 ) of Test001" (only) > > When I try to create a new Event and setting some external id for sync > operations (into the Extended field), the new fields do never appear ! And > after inserting the event, and retrieving it, the problem remains the same : > no Extended Fields found. > However it does work when an CalendarEventEntry is created from google, not > through the JAVA Api. > > Is it impossible to inject custom fields in a new CalendarEventEntry ?? > > > public static void showExtended(CalendarEventEntry e) > { > List<ExtendedProperty> p_list = e.getExtendedProperty(); > disp("Extended property ("+p_list.size()+" ) of > "+e.getTitle().getPlainText()); > for(ExtendedProperty p : p_list) > { > disp("("+p.getName()+","+p.getValue()+")"); > } > } > > public static void setNewExtProperty(String name,String value, > CalendarEventEntry myEntry) throws IOException, ServiceException > { > ExtendedProperty property = new ExtendedProperty(); > property.setName(name); > property.setValue(value); > myEntry.addExtension(property); > } > > -- > You received this message because you are subscribed to the Google > Groups "Google Calendar Data API" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://code.google.com/apis/calendar/community/forum.html > -- Alain Vongsouvanh -- You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://code.google.com/apis/calendar/community/forum.html
