6 messages in com.googlegroups.google-mashup-editorRe: Calendar Times and Sorting| Subject: | Re: Calendar Times and Sorting![]() |
|---|---|
| From: | Jason (gmej...@google.com) |
| Date: | 08/27/2007 03:53:51 PM |
| List: | com.googlegroups.google-mashup-editor |
Hi Benjamin. The 'sort' attribute specifies which gm:sort control, if any, should be applied to a list after its initial pull. Consider a simple listing of titles and ratings. If I initially want to sort my list by title, I should specify 'titleSort' in the list's 'sort attribute:
<gm:list data="${myData}" sort="titleSort"> <gm:sort name="titleSort" ref="atom:title"/> <gm:sort name="ratingSort" ref="gmd:rating/@value"/> </gm:list>
I can use a gm:header control or GME's JavaScript API to change the list's sort order by specifying the name of the second sorter ("ratingSort" in this example).
- Jason
On Aug 23, 11:08 am, Benjamin <chec...@gmail.com> wrote:
Hi Jason,
this thread triggers another question and possibly request. According to the tag reference, "a gm:sort tag must be present as a child of the gm:list element to enable sorting.". Why is a sort attribute necessary to reference the sorter when a gm:sort element is present? XSLT allows sorting with just the xsl:sort element inside e.g. xsl:apply-templates or xsl:for-each. Isn't that tautologous and the attribute could be omitted?
Benjamin
On Aug 21, 8:40 pm, Jason <gmej...@google.com> wrote:
Hi, and welcome to the group! Your first problem can be solved by inserting a gm:sort tag before the opening and closing tags of your list module:
<gm:list id="myList" data="${eventCal}" sort="dateSort" template="events"> <gm:sort name="dateSort" ref="gd:when/@startTime" /> </gm:list>
Your events should now appear in order, earliest to most recent. (You can add a 'reverse' attribute to gm:sort to display the most recent events first.) Moving on to your second issue: at present, your date and time display options are limited to displaying the full date string using gm:date or gm:text, but we are planning to expand these options greatly in a future release. Thanks for your patience!
- Jason
On Aug 18, 10:05 pm, candeeguy <cand...@gmail.com> wrote:
I have been working with the details sample in order to make a simple interactive event list. I have two problems, first I recently added a event to google calendar and now it shows the events out of order. Secondly I can't figure out how to get a readable time format, similar to agenda view. I am looking to have a list of five events and a details section when one event is selected. This is what I havehttp://uwpivcalweb.googlemashups.com/ but this is what I want:
Calendar Monday Event 1 Friday Event 2 Jul 4 Event 3 Aug 23 Event 4 Dec 25 Event 5
--------------------------------------- Event 2 Location: over there Time: 6:00am - 10:00pm Short description of the event, taken from the calendar feed.- Hide quoted text -
- Show quoted text -




