Results 1 to 2 of 2

Thread: Strange Zimlet behavior

  1. #1
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    Default Strange Zimlet behavior

    I've been hitting some really strange zimlet behavior with 5.0b1.
    Code:
    <zimlet name="org_technicaldetails_weather"  version="1.8" description="Weather Test Sample">
    	   <zimletPanelItem label="Weather">
    	      <toolTipText>Pull up the weather forecast for your location</toolTipText>
    	      <contextMenu>
    	         <menuItem label="Lookup the weather for your location" id="WEATHER">
    	            <canvas type="dialog" title="Weather" width="800"  height="600" />
    	            <actionUrl 
    	            	target="http://www.wunderground.com/cgi-bin/findweather/getForecast">
    	            	<param name="query">${prop.zipcode}</param>
    	            </actionUrl>
    	         </menuItem>
    	      </contextMenu>
    	   </zimletPanelItem>
       <userProperties>
    	  <property type="string" name="zipcode" minLength="6" maxLength="10" label="Zip Code"/>
       </userProperties>
    
    	</zimlet>
    The problematic code is:
    Code:
    	            <actionUrl 
    	           target="http://www.wunderground.com/cgi-bin/findweather/getForecast">
    	            	<param name="query">${prop.zipcode}</param>
    	            </actionUrl>
    For whatever reason {prop.zipcode}, even when it exists, returns null. (I get my URI plus ?query=).

    Also, the standard zimlet handler automatically pops up the property editor when I double click, but the okay button does not work. Thankfully the cancel button does, but it also saves the properrties(!!?)

    Code:
    <zimlet name="org_technicaldetails_weather"  version="1.8" description="Weather Test Sample">
    	   <zimletPanelItem label="Weather">
    	      <toolTipText>Pull up the weather forecast for your location</toolTipText>
    	      <contextMenu>
    	         <menuItem label="Lookup the weather for your location" id="WEATHER">
    	            <canvas type="dialog" title="Weather" width="800"  height="600" />
    	            <actionUrl 
    	            	target="http://www.wunderground.com/cgi-bin/findweather/getForecast/${prop.zipcode}">
    	            </actionUrl>
    	         </menuItem>
    	      </contextMenu>
    	   </zimletPanelItem>
       <userProperties>
    	  <property type="string" name="zipcode" minLength="6" maxLength="10" label="Zip Code"/>
       </userProperties>
    
    	</zimlet>
    For some reason
    Code:
    target="http://www.wunderground.com/cgi-bin/findweather/getForecast/${prop.zipcode}">
    	            </actionUrl>
    ${prop.zipcode} is never substituted at all. This is a bad thing is a REST view of the world.

    Any ideas?

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    I think these are just bugs. One thing you could try is to use Firebug or Venkman to step through the Zimlet code just before your URLs are called and make sure that prop is even defined. I know in some cases we use obj. rather than prop.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  2. Replies: 5
    Last Post: 01-11-2008, 04:34 AM
  3. Domain Admin Error: Permission Denied
    By shanson in forum Administrators
    Replies: 3
    Last Post: 05-29-2007, 05:48 AM
  4. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •