Cooliris is a beautifull plugin for manage image galleries, and ZK (ZKoss) is my favorite RIA based on Java… so i want to try an integration of all those amazing tech…. About CoolIris exists a flash plugin named “Embedded Wall” that is an SWF that can be embed in you site or application.
Yuo can view an exaple at :Â http://www.blu-blu.info/galleria_new.zul
The code of the example :
-
-
-
<![CDATA[
-
int wh = 0;
-
int whd = 0;
-
-
session.setAttribute("CH",evt.getDesktopHeight());
-
session.setAttribute("CW",evt.getDesktopWidth());
-
-
/* org.zkoss.zhtml.Messagebox.show(getClientHeight() + "pippo"); */
-
}
-
-
void onResizeMe(Div dd)
-
{
-
-
if (session.getAttribute("CH")!= null) {
-
wh = whd - 80;
-
-
if (dd != null) {
-
dd.setHeight(wh + "px");
-
}
-
}
-
-
}
-
]]></zscript>
-
<window title="album" border="normal" onClientInfo="getClientInfo(event);onResizeMe(div_mainContent);buildCool(html_flash_obj);">
-
<div id="div_mainContent" style="overflow:auto;" mce_style="overflow:auto;" >
-
<html id="html_flash_obj"><![CDATA[
-
-
]]>
-
<zscript><![CDATA[
-
public void buildCool(Html renderTo)
-
{
-
String strFeedPhoto = "http%3A%2F%2Fwww.viadallufficio.eu%2Fwp-content%2Fplugins%2Fnextgen-gallery%2Fxml%2Fmedia-rss.php%3Fgid%3D4%26mode%3Dgallery";
-
-
String str_Cooliris = "<span class="mceItemObject" id=\"o\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
-
str_Cooliris += " width=\"" + strWidth + "\" height=\"" + strHeight + "\"> \n";
-
//str_Cooliris += "<span name=\"movie\" value=\"http://apps.cooliris.com/embed/cooliris.swf\" class="mceItemParam"></span>\n";
-
str_Cooliris += "<span name=\"movie\" value=\"http://localhost:7080/blublu/cooliris.swf\" class="mceItemParam"></span>\n";
-
str_Cooliris += "<span name=\"flashvars\" value=\"feed=" + strFeedPhoto + "\" class="mceItemParam"></span>\n";
-
str_Cooliris += "<span name=\"allowFullScreen\" value=\"true\" class="mceItemParam"></span>\n";
-
str_Cooliris += "<span name=\"allowScriptAccess\" value=\"always\" class="mceItemParam"></span>\n";
-
// str_Cooliris += "<span class="mceItemEmbed" type=\"application/x-shockwave-flash\" src="\" mce_src="\""http://apps.cooliris.com/embed/cooliris.swf\" \n";
-
str_Cooliris += "<span class="mceItemEmbed" type=\"application/x-shockwave-flash\" src="\" mce_src="\""http://localhost:7080/blublu/cooliris.swf\" \n";
-
str_Cooliris += "width=\"" + strWidth + "\" height=\"" + strHeight + "\" ";
-
str_Cooliris += "flashvars=\"feed=" + strFeedPhoto + "\" ";
-
str_Cooliris += "allowFullScreen=\"true\" allowScriptAccess=\"always\"></span></span>";
-
-
renderTo.setContent(str_Cooliris);
-
}
-
//buildCool(html_flash_obj);
-
]]>

