Hi Terence,

I found out this is a bug with the setValue for AcRole and I am going to
submit a fix for that.  For now you can do this to fix your problem -

    var ACL_URL = "
http://www.google.com/calendar/feeds/default/acl/full/default";;

    var entry = new google.gdata.AclEntry();
    var role = new google.gdata.AclRole();
    //role.setValue(google.gdata.AclRole.VALUE_READER);
    role.setValue('http://schemas.google.com/gCal/2005#read');
    entry.setRole(role);

    var scope = new google.gdata.AclScope();
    scope.setType(google.gdata.AclScope.TYPE_DEFAULT);
    entry.setScope(scope);

    calendarService.updateEntry(ACL_URL, entry, function() {alert('ACL is
updated');}, handleError, google.gdata.AclEntry);

Thanks for helping us to discover this!
Austin

On Mon, Mar 3, 2008 at 11:37 AM, Austin (Google) <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> This is strange, I get the similar result you do.  I will look into this
> and update you on this.
>
> Austin
>
>
> On Sat, Mar 1, 2008 at 11:55 PM, Terence Kim <[EMAIL PROTECTED]> wrote:
>
> >
> > Update: Here's what I have now:
> >
> > function setPublic() {
> >  calendarService.getAclFeed(EVENT_FEED_URL, publishCalendar,
> > handleError);
> > }
> >
> > function publishCalendar(entryRoot) {
> >  var entry = new google.gdata.AclEntry();
> >   var ACL_URL = "http://www.google.com/calendar/feeds/default/acl/full/
> > default";
> >   var ar = new google.gdata.AclRole();
> >   ar.setValue(google.gdata.AclRole.VALUE_READER);
> >   entry.setRole(ar);
> >  var as = new google.gdata.AclScope();
> >   as.setType("default");
> >   entry.setScope(as);
> >  calendarService.updateEntry(ACL_URL, entry, handleTest, handleError,
> > Object);
> > }
> >
> > Here's the message I get now:
> > Illegal value of gAcl:role passed: reader
> >
> > On Mar 1, 11:27 pm, Terence Kim <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > I've read a lot of other threads regarding this issue (mostly
> > > addressed by Austin) and I feel like they're getting me closer and
> > > closer to the solution.  However, I am not held up in that there are
> > > no concrete examples of how to do this in Javascript.  Here's what I
> > > have so far:
> > >
> > > function setPublic() {
> > >   calendarService.getAclFeed(ACL_URL, publishCalendar, handleError);
> > >
> > > }
> > >
> > > function publishCalendar(entryRoot) {
> > >   var entry = new google.gdata.AclEntry();
> > >
> > >   var ar = new google.gdata.AclRole();
> > >   ar.setValue("read");
> > >   entry.setRole(ar);
> > >
> > >   var as = new google.gdata.AclScope();
> > >   as.setValue("default");
> > >   entry.setScope(as);
> > >
> > >   calendarService.updateEntry(ACL_URL, entry, handleTest, handleError,
> > > Object);
> > >
> > > }
> > >
> > > I get an error message saying:
> > > "Unknown visibility found:Acl"
> > >
> > > And what I have may not be close to the actual solution.  So in short,
> > > does anyone know how to set a calendar public using Javascript?
> > >
> > > Thanks in advance!
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to