valueString not being stored

View: New views
3 Messages — Rating Filter:   Alert me  

valueString not being stored

by aman_tuladhar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying an example found in Zend Gdata Google Calendar documentation.
It seem to work and create Event, but it is not storing the valueString data.
I want to use valueString to store human readable date.

Is it some kind of bug in the framework or did I do something wrong ??
Any help or hint would be appreciated very much.

Thanx

Here is the code from documentation.

$when = $service->newWhen();
$when->startTime = "2007-12-05T14:00:00-08:00";
$when->endTime="2007-12-05T15:00:00:00-08:00";

// Specify a optional human readable value for the above date
$when->valueString = "This Afternoon";

// Apply the when property to an event
$event->when = array($when);

Re: valueString not being stored

by Trevor Johns :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 23 Feb 2009 00:14:22 -0800 (PST), aman_tuladhar
<aman_tuladhar@...> wrote:

>
> I am trying an example found in Zend Gdata Google Calendar documentation.
> It seem to work and create Event, but it is not storing the valueString
> data.
> I want to use valueString to store human readable date.
>
> Is it some kind of bug in the framework or did I do something wrong ??
> Any help or hint would be appreciated very much.
>
> Thanx

Hi Aman,
The gd:when element (and Zend_Gdata_Extension_When, in turn) is part of the
Google Data common elements suite. Since these elements are used across all
of the Google Data APIs, there are some fields that aren't supported by all
APIs.

The valueString property happens to be one of these, and Google Calendar
doesn't actually do anything with it that I can recall. You're setting it
properly, but the data is being discarded when it reaches the server.

You'll either have to store your human-readable information in the event
description, or as an extended property (in which case only your
application would know what to do with it).

If you're just looking for a way to create events using a freeform time
description, you could also use the quick add interface described here:

http://code.google.com/apis/calendar/docs/1.0/developers_guide_php.html#CreatingQuickAdd

--
Trevor Johns

Re: valueString not being stored

by Trevor Johns :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 24 Feb 2009 08:37:00 +0000, Trevor Johns <trevor@...> wrote:

> On Mon, 23 Feb 2009 00:14:22 -0800 (PST), aman_tuladhar
> <aman_tuladhar@...> wrote:
>>
>> I am trying an example found in Zend Gdata Google Calendar
> documentation.
>> It seem to work and create Event, but it is not storing the valueString
>> data.
>> I want to use valueString to store human readable date.
>>
>> Is it some kind of bug in the framework or did I do something wrong ??
>> Any help or hint would be appreciated very much.
>>
>> Thanx
>
> Hi Aman,
> The gd:when element (and Zend_Gdata_Extension_When, in turn) is part of
> the
> Google Data common elements suite. Since these elements are used across
> all
> of the Google Data APIs, there are some fields that aren't supported by
> all
> APIs.
>
> The valueString property happens to be one of these, and Google Calendar
> doesn't actually do anything with it that I can recall. You're setting it
> properly, but the data is being discarded when it reaches the server.
>
> You'll either have to store your human-readable information in the event
> description, or as an extended property (in which case only your
> application would know what to do with it).
>
> If you're just looking for a way to create events using a freeform time
> description, you could also use the quick add interface described here:
>
>
http://code.google.com/apis/calendar/docs/1.0/developers_guide_php.html#CreatingQuickAdd

Also, I've opened up a feature request for this behavior here:

http://code.google.com/p/gdata-issues/issues/detail?id=1056

If you want to be notified should this be implemented in the future, please
star the issue (upper-left hand corner, next to the issue number).

--
Trevor Johns