Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-2010, 05:03 AM
Active Member
 
Posts: 31
Default Zimlet not showing up anything

I'm writing my first Zimlet so that I can show up basic membership information when a member ID (one letter + 4 digits) is detected. So I did this :

<zimlet name="com_acaiq_zimlet_infomembre" version="0.46" description="Affiche les infos sur un membre">
<contentObject>
<matchOn>
<regex attrs="ig">(X1005)</regex>
</matchOn>
<toolTip>
<actionUrl method="get" target="http://staging.xxxxx.xxx/cgi-bin/WebObjects/ServeurCertification.woa/ra/formations/liste.xml" />
</toolTip>
</contentObject>
</zimlet>

liste.xml (REST service) returns :

<?xml version="1.0" encoding="UTF-8"?>
<FormParticipants type="FormParticipants">
<FormActivite type="FormActivite" id="9924">
<facHeurePrevue>09:00</facHeurePrevue>
<facDatePrevue>2010-08-01T00:00:00Z</facDatePrevue>
<formTypeActivite type="FormTypeActivite" id="467">
<ftaTitre>Formation obligatoire - loi 73</ftaTitre>
</formTypeActivite>
<formLieu type="FormLieu" id="1">
<flNom>Some place</flNom>
</formLieu>
</FormActivite>
</FormParticipants>

I do see, with Firebug and Apache logs, that the data is fetched from the REST service, but the tooltip only shows "undefined". I tried adding a XSLT file :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="FormParticipants/FormActivite">
<div><b>ID: </b> <xsl:value-of select="id"/></div>
<xsl:choose>
<xsl:when test="@error != ''">
<div><b>Error: </b> <xsl:value-of select="@error"/></div>
</xsl:when>
<xsl:otherwise>
<div><b>Date prévue: </b> <xsl:value-of select="facDatePrevue"/></div>
<div><b>Heure prévue: </b> <xsl:value-of select="facHeurePrevue"/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()|@*"/>
</xsl:stylesheet>

and in the definition file, I added :

<resource>membre.xsl</resource>

Still a nogo. I did modify the allowed domains list so that staging.xxxxx.xxx is allowed, so I don't know why it's not showing anything. I didn't find any JavaScripts error in Firefox console, and neither in mailbox.log.
__________________
ZCS 6.05 on CentOS 5.3 (VMWare ESX 4)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.