3 messages in com.googlegroups.google-mashup-editorproblems with getSelectedEntry
FromSent OnAttachments
ken16 Nov 2007 10:52 
Jason16 Nov 2007 16:00 
ken18 Nov 2007 01:36 
Subject:problems with getSelectedEntry
From:ken (kenk@gmail.com)
Date:11/16/2007 10:52:59 AM
List:com.googlegroups.google-mashup-editor

Hi all,

I'm new to GME and please help me with a little problem here...

That's what I suppose to do: 1. get the data from ${test} and displaying them in myList 2. clicking at an element will change the data source of myList2

the code below works fine until I added this line : var e2 = lm1.getSelectedEntry();

myList2 is not loaded at all once it's added.

(What I want to do here is getting the selected entry , then get the value of it, combining it to set the data source URL)

I just can't figure out what's wrong now, any idea? thanks.

-Ken

<table width="100%"> <tr> <td style="padding-right:10px; width:250px" valign="top"> <gm:list id="myList" data="${test}" pagesize="5" /> </td> <td valign="top"> <gm:list id="myList2"> <gm:handleEvent event="select" src="myList" execute="foo()"/> </gm:list> </td> </tr> </table>

<script> function foo(){

var lm2=google.mashups.getObjectById('myList2'); var lm1=google.mashups.getObjectById('myList').getData(); var e2 = lm1.getSelectedEntry();

lm2.setData('http://news.google.com/news? hl=en&ned=us&q=tech&ie=UTF-8&output=rss');

}