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

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 Display Modes
  #1 (permalink)  
Old 05-15-2007, 08:38 PM
Active Member
 
Posts: 29
Default src.objectContent not populating

Can't quite figure this one out... Any idea why {$src.objectContent} populates under the tooltip correctly, but passes a literal "{$src.objectContent}" on the context menu items?

Code:
<zimlet name="com_zimbra_mcis_property" version="1.8" description="MCIS Property Card">
  <resource>mcisproperty.xsl</resource>
  <contentObject>
    <matchOn>
      <regex attrs="igm">(?:\d{2}-\d{2}-\d{3}-\d{3})</regex>
    </matchOn>
    <toolTip>
      <actionUrl target="http://server/zimlets/pin2xml.php" xslt="mcisproperty.xsl">
        <param name="pin">${src.objectContent}</param>
      </actionUrl>
    </toolTip>
    <contextMenu>
      <menuItem id="MCIS.PROPERTY.PROPCARD" label="View Property Card">
        <canvas type="window" width="800" height="600"/>
          <actionUrl target="http://server/cgi/card.cgi">
            <param name="FindParcel">1</param>
            <param name="parcel">${src.objectContent}</param>
          </actionUrl>
      </menuItem>
      <menuItem id="MCIS.PROPERTY.MAP" label="GIS Maps">
        <canvas type="window" width="800" height="600"/>
        <actionUrl target="http://maps/viewer.htm">
          <param name="ActiveLayer">0</param>
          <param name="QueryZoom">Yes</param>
          <param name="hostname">ntims</param>
          <param name="Query">PIN%20LIKE%20%27${src.objectContent}%27</param>
        </actionUrl>
      </menuItem>
    </contextMenu>
  </contentObject>
</zimlet>
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 10:30 AM
Member
 
Posts: 11
Default

I have same issue

Did you solved it?
Reply With Quote
  #3 (permalink)  
Old 02-10-2009, 09:56 AM
Active Member
 
Posts: 49
Thumbs up

After a good day spent on writing my zimlet with plenty of satisfaction, I faced the same behavior as u268 and code0 just described here.

Therefore I fgrepped through all known existing zimlet source codes to get an idea on where I was mistaking but alas, none of the implementations works here!

I tried the following ways (all found around, zimlet draft included - BTW how come we've got so many different modes in the shipped zimlets??!?!):

1- the official one: ${src.objectContent}
2- the wikipedia/bugz way ( ${src.$1} ):
Code:
<param name="search">${src.$1}</param>
3- amazon Zimlet ( ${objectContent} ):
Code:
<actionUrl target="http://www.amazon.com/exec/obidos/external-search/002-8747903-2137627?field-keywords=${objectContent}&amp;sourceid=Zimbra"/>
Keep in mind that I am not testing via _dev dir anymore, I fully deployed via the zmzimletctl facility.

My tests (collects whatever found above, and more - everything else works)

Code:
	<contentObject type="phone">
		<matchOn>
            <regex attrs="ig">^([0-9]*\-?\ ?\/?[0-9]*)$</regex>
		</matchOn>
        <contextMenu>
	        <menuItem label="Chiama src.objectContent ${src.objectContent}" icon="Telephone" id="CALL_JSP">
            	<canvas type="window" title="Panel" width="600" height="600" />
				<actionUrl target="/service/zimlet/it_open1_phone/phone.jsp">
					<param name="dial_second">${src.objectContent}</param>
				</actionUrl>
			</menuItem>
	        <menuItem label="Chiama obj.objectContent ${obj.objectContent}" icon="Telephone" id="CALL_JSP2">
            	<canvas type="window" title="Panel" width="600" height="600" />
				<actionUrl target="/service/zimlet/it_open1_phone/phone.jsp">
					<param name="dial_second">${obj.objectContent}</param>
				</actionUrl>
			</menuItem>
	        <menuItem label="Chiama objectContent ${objectContent}" icon="Telephone" id="CALL_JSP3">
            	<canvas type="window" title="Panel" width="600" height="600" />
				<actionUrl target="/service/zimlet/it_open1_phone/phone.jsp">
					<param name="dial_second">${objectContent}</param>
				</actionUrl>
			</menuItem>
	        <menuItem label="Aggiungi ai contatti" icon="NewContact" id="ADDCONTACT"/>
	    </contextMenu>
	</contentObject>
Whatta.... :-(

P.S. During these hours of work I am keeping track of my findings, including wrong things in the draft, shortcuts for faster deployment, what works and what doesn't by usign the _dev dir, and so on. Hope I'll get some feedback from you guys.. ;-)

P.P.S. I am sooo tired working with this stuff (7 days +/-)! I wanna get back to VDCs, sysAdministration, clustering labs....!!! Gosh!
Reply With Quote

Why Join?

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

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0