On 2008-12-19 05:31:48 -0800, Mikado <[email protected]> said: > > Hello, > > I'm using the Java client library to manage some calendars, and I got > a problem when trying to create secondary calendars. > > Here is my problem : when I create the calendar, it IS created and is > displayed in the list of my calendars in the web interface. On the > other hand : > - I cannot create events for this calendar ; > - I cannot show the options menu ; > - I cannot display any information about it (even from "Settings" > menu). > > I based my work completely upon the example in the documentation. > Even though I doubt it makes any difference, just for information, the > account i'm using is from a registered Google Apps firm account. > > Below is my method to create the secondary calendars. Tried different > things, I let these in comments, but nothing changed : > > public void createSecondaryCalendar(String calFeed, String calName, > String calSummary, String calTimeZone, String calLocation) > { > CalendarEntry calendar = new CalendarEntry(); > calendar.setTitle(new PlainTextConstruct(calName)); > calendar.setSummary(new PlainTextConstruct(calSummary)); > calendar.setTimeZone(new TimeZoneProperty(calTimeZone)); > calendar.setHidden(HiddenProperty.FALSE); > calendar.setColor(new ColorProperty("#2952A3")); > calendar.addLocation(new Where("", "", calLocation)); > calendar.setCanEdit(true); > // calendar.setAccessLevel(AccessLevelProperty.OWNER); > // calendar.setService(this.service); > > try{ > URL postUrl = new > URL("http://www.google.com/calendar/feeds/default/ > owncalendars/full"); > CalendarEntry inserted = service.insert(postUrl, calendar); > }catch(ServiceException e) > { > e.printStackTrace(); > }catch(IOException e) > { > e.printStackTrace(); > } > } > > The service is created in the constructor (I used this a singleton to > manage Google Calendar operations) : > > private GoogleCalendar() > { > service = new CalendarService("Interface de calendriers"); > try{ > service.setUserCredentials("x...@yyy", "zzz"); > }catch(Exception e) > { > e.printStackTrace(); > } > } > > And the call is : > > public static void main(String[] args) { > > try{ > GoogleCalendar.getInstance().createSecondaryCalendar("msarton", > "Mikado", "Mon calendrier", "France/Paris", "Paris"); > }catch(Exception e) > { > e.printStackTrace(); > } > } > > As said, the calendar Mikado IS created, but I can't do anything on it > nor create events for this calendar. > You can find a screenshot of the result on http://ro-revo.eu/mikado/pbGoogl > eCal.jpg > > On this, I can't click on the small arrow right of the calendar's > name, neither can I access any settings from the settings menu (even > though the calendar does display in the calendar list, but clicking > doesn't provide any new page). > > Thanks in advance for the help, > > Kind regards, > Michaƫl.
Mikado, To help me debug this, can you provide an HTTP transcript of your calendar creation request, as documented here: http://code.google.com/apis/gdata/articles/debugging_client_libs.html#java It would also help if I knew the username of the account used and the affected calendar ID. -- Trevor Johns --~--~---------~--~----~------------~-------~--~----~ 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://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
