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?