2 messages in com.googlegroups.google-mashup-editorRe: Filtering by date| Subject: | Re: Filtering by date![]() |
|---|---|
| From: | Jason (gmej...@google.com) |
| Date: | 06/18/2007 03:41:19 PM |
| List: | com.googlegroups.google-mashup-editor |
Greetings Oleg. Yes! It is possible to filter on dynamic values if you use the JavaScript API. Every module (gm:item, gm:list, etc.) has a setFilterParam method which accepts the name of a filter and a value to filter on.
<gm:list id="myList" data="${user}/filterme" template="myTemplate"> <gm:filter name="myFilter" ref="atom:title" /> </gm:list>
You can filter the above list on the title value "Test" using the following JavaScript:
var list = google.mashups.getObjectById('myList'); list.setFilterParam('myFilter', 'Test');
Keep in mind that the filter value can be any JavaScript string. You could even pull this value from a form input, making your filters truly dynamic. For more information, please see the JavaScript API reference page.
http://code.google.com/gme/jsapi.html
Happy mashing! - Jason
On Jun 18, 3:43 am, 2sheds <mobi...@gmail.com> wrote:
Hi all!
I'm testing the waters trying to make my own Google Mashup and I would like to be able to filter my ${app} feed by "gd:when/@startTime" date selected in gm:calendar instance. An example of filtering (http://editor.googlemashups.com/docs/ sortfilter.html) uses an exact matching string, I would like to reference a dynamic value - if it is at all possible, what would be the correct way to use gm:filter and, possibly, gm:handleEvent to achieve this?
Cheers, Oleg




