26 messages in com.googlegroups.google-mashup-editorRe: [gme] Re: gm:link Tag and Google ...| From | Sent On | Attachments |
|---|---|---|
| Reto Meier | 08 Oct 2007 02:32 | |
| Jason | 08 Oct 2007 15:56 | |
| Reto Meier | 09 Oct 2007 05:16 | |
| Jason | 10 Oct 2007 10:46 | |
| Jason | 12 Nov 2007 11:16 | |
| adszhu | 06 Jan 2008 04:37 | |
| Jason | 07 Jan 2008 10:34 | |
| adszhu | 10 Jan 2008 11:23 | |
| Jason | 10 Jan 2008 16:17 | |
| adszhu | 14 Jan 2008 08:50 | |
| Jason | 14 Jan 2008 16:25 | |
| Jason | 15 Jan 2008 10:46 | |
| adszhu | 16 Jan 2008 04:43 | |
| Ádám Szigeti | 22 Jan 2008 10:52 | |
| Jason | 22 Jan 2008 11:25 | |
| Ádám Szigeti | 23 Jan 2008 03:26 | |
| Jason | 23 Jan 2008 10:35 | |
| Ádám Szigeti | 24 Jan 2008 01:15 | |
| Ádám Szigeti | 24 Jan 2008 10:47 | |
| Jason | 25 Jan 2008 18:32 | |
| Ádám Szigeti | 26 Jan 2008 09:09 | |
| adszhu | 19 Feb 2008 01:00 | |
| Jason | 21 Feb 2008 14:19 | |
| Ádám Szigeti | 22 Feb 2008 01:41 | |
| Jason | 22 Feb 2008 14:14 | |
| Ádám Szigeti | 23 Feb 2008 08:01 |
| Subject: | Re: [gme] Re: gm:link Tag and Google Data Source Freshness![]() |
|---|---|
| From: | Ádám Szigeti (ads...@gmail.com) |
| Date: | 02/23/2008 08:01:07 AM |
| List: | com.googlegroups.google-mashup-editor |
Thank You, Jason, problem solved :) Anyway, I believed the "autheticate" attribute of tag "gm:page" served for transferring the authentication of the browser to the gm application. Just like when logged into Google Reader and opening Gmail in another tab of the browser, You are automatically signed into Gmail, too. If it turns real in the future, that will be fun!
Ádám
On Fri, Feb 22, 2008 at 11:14 PM, Jason <gmej...@google.com> wrote:
As far as I can tell, your authenticate() function is never executed, which probably explains why I can't see the authenticated content. To fix this, you can amend your onload() function as follows:
function onLoad() { if (google.accounts.user.checkLogin(authenticationURL)) { google.gdata.client.init(); myService = new google.gdata.calendar.CalendarService('Google- GData_Calendar_Mash-1.0'); ... } else { authenticate(); } };
Unfortunately, you cannot use the account credentials provided during application sign-in to authenticate to a Google data service, but I'll go ahead and file a feature request.
Happy mashing! - Jason
On Feb 22, 1:41 am, "Ádám Szigeti" <ads...@gmail.com> wrote:
Hi Jason, Your question makes me beleive that it is the authenticated content (a table with calendar entry data) that is missing. So I assume I handle the token fetching incorrectly. My FireFox has got a valid token, that is why it is the only session showing the authenticated contents, too. In fact, I would like to use the GME login to fetch the token, too. Is it possible at all? When logging into GME, I use the same account that I refer to when fetching the token, right?
Ádám
On Thu, Feb 21, 2008 at 11:20 PM, Jason <gmej...@google.com> wrote:
Hi Ádám. I see the same page across all three browsers: a green header ("The latest entries of calendars shared with You") along the top and a gm:calendar and gm:map display below it. Are you seeing anything different? What are you expecting to see?
- Jason
On Feb 19, 1:01 am, adszhu <ads...@gmail.com> wrote:
Hi Jason, After some break I am working on my mashup again. Now I got the basics work, meaning I can access data, and the UI operates. Not that surprising, since it all comes from your demo. Although the functions are hardly touched, I am building a different logic with them. According to your recommendation, now I work with FireFox and FireBug. The result is a mashup that seems to be OK in FireFox, but not in IE6 or Safari for Win. In these last browsers the authenticated content simply does not appear. Would You pls have a look at it?http://ppfinder.googlemashups.com/ Thanks in advance
On Jan 26, 3:33 am, Jason <gmej...@google.com> wrote:
Hi Ádám. Sorry, this was my fault; google.gdata.Person.getName() returns a google.gdata.Name object. This object provides a getValue() method which returns a JavaScript string.
So, taking my code from earlier:
var authors = eventEntry.getAuthors(); var authorName = null;
if (authors.length > 0) { authorName = authors[0].getName().getValue();
}
... if (authorName) { new GPath('gmd:author').setValue(newEntry, authorName);
}
Two quick notes: 1. Currently, Safari 3 is not officially supported. Please use a supported browser such as Firefox 1.5+ or IE 6.0+. 2. Firebug is the best tool I know for JavaScript debugging. I found this particular error by setting a breakpoint just after initializing author. Firebug showed that author was an object instead of a string. I then used the JavaScript client library documentation to find the correct method to use.
I hope this helps. Please let me know if you continue to run into issues
- Jason
On Jan 24, 10:47 am, "Ádám Szigeti" <ads...@gmail.com> wrote:
Hi Jason, Unfortunately, the same error message comes again: GPath.setValue(): Value set should be of type string. Is there any tool to get more info about javascript errors? I've tried Firefox's Javascript debugger, but it delivers the very same error message. Anyway, I've shared my Calendar with You, have a look at the
feed if
You like...
Ádám
On Jan 23, 2008 7:35 PM, Jason <gmej...@google.com> wrote:
Ah, I see. More than likely, you're seeing this error because your author variable evaluates to null, either because the entry doesn't have an author associated with it or the author in question doesn't have an initialized name. See if this slight change suppresses the error:
var authors = eventEntry.getAuthors(); var authorName = null;
if (authors.length > 0) { authorName = authors[0].getName(); } ... if (authorName) { new GPath('gmd:author').setValue(newEntry, authorName); }
On Jan 23, 3:27 am, "Ádám Szigeti" <ads...@gmail.com> wrote:
Hi Jason, Thanks. Strange, but the browser (IE6) reports the same
error:
"Line
44; Char 356; Error: GPath.setValue(): Value set should be
of
type
string." Unfortunately, at the specified line there's
nothing to
do
with setValue.... I tried to coplete the setValue with .getValueString(), but it didn't work either. I haven't modified the "create new entry" block, neither its template, because I plan to remove this parts from my mashup. So I
just
put an
entry into my calendar from the standard interface, and try
to
display
its data with the mashup
Ádám
On Jan 22, 2008 8:26 PM, Jason <gmej...@google.com> wrote:
Hi Ádám. The google.gdata.Entry class' getAuthors() method returns an array of google.gdata.Person objects. The class
specification
is
located here:
As you can see, this specification does not provide a getValueString() method. It does, however, provide getName():
var author = eventEntry.getAuthors()[0].getName(); ... new GPath('gmd:author').setValue(newEntry, author);
Please let me know if this works.
Happy mashing! - Jason
On Jan 22, 10:52 am, "Ádám Szigeti" <ads...@gmail.com>
wrote:
Hi All, Having slightly modified Jason's demo mashup, l have
faced a
problem
with getAuthors(). Compilation is OK, but the browser reports an error around fetching/storing/displaying the "author"
element.
While I keep
on trying to get over it, I would appretiate any instruction...http://ppfinder.googlemashups.com Thanks, Ádám
On 1/11/08, Jason <gmej...@google.com> wrote:
Hi Adam. Since atom:author is managed by GME's
server-side
services,
it is not exposed in fetched feeds; this explains why
it
is not
appearing. I haven't tried this myself, but you may be able to extract an event's author using the getAuthors() method of the google.gdata.Entry class.
..
You could then copy this value into a custom GME
element (
e.g.
gmd:author) and display it using your textarea
control.
Please let me
know if this works for you.
- Jason
On Jan 10, 11:23 am, adszhu <ads...@gmail.com> wrote:
Hi, In fact I don't want to write to that element, I
just
want to read it.
Quite exactly, I want the owner of the calendar
along
with the
Location of the appointments in the calendar appear
in a
table. The
mashup is being built here: http://ppfinder.googlemashups.com/ Line 350 and 352 are not OK, I meand they fail to
show
on the mashup,
although I believe I apply the correct XPath
addressing.
wrote:
GME does not allow you to write to atom:author
because
this element is
managed internally. Try using a custom element
like
wrote:
Hi, I am usinghttp://demo-
jsgdatalib.googlemashups.com/asabasisformy
own mashup, and I faced some difficulties when reaching the elements of the calendar feed. It is the lines 374..376 of the code in GME.
While
Jason's <td
align="center"><gm:date ref="gd:when/@startTime
"/></td>
expression
operates, the <td><gm:text
ref="author/name"/></td>
does not. I have
tried all the methods mentioned athttp://www.w3schools.com/xpath/xpath_syntax.asp, including ".author/name", and "atom:author/name"
as
well.
I also could not reach the "gd:where@valueString
"
data element. On the
other hand, "title" can be fetched succesfully. Is there any trick that makes it work?
On Nov 12 2007, 8:17 pm, Jason <
gmej...@google.com>
wrote:
Hi Reto. I have some good news for you:
1) As of last week's release, all caches,
including those from
Spreadsheets and Google Calendar, now expire
after
10 minutes --
much
better than once or twice a day. :) This
greatly
increases the
utility
of applications that use Google Spreadsheets,
et
al. as a data
store.
2) Styles for certain tags (including gm:link
and
gm:image) have
been
adjusted so that they now more closely match
their
HTML analogues,
meaning that they are now displayed as inline elements rather than block.
Enjoy!
-
...
read more »
-- Ádám http://adszhu.googlepages.com




