on 2016 Oct 17 11:35 PM
Does anyone have a chance to use external javascript libraries in zul files on widgets in productcockpit?
or in any related to *.zul files in zkoss 3.x framework ?
I tried to use it in such way: myWidget.zul
<include src="/trailcockpit/js/test.zul" visible="true"/>
test.zul
<?xml version="1.0" encoding="UTF-8"?>
<div visible="false" use="de.hybris.platform.cockpit.components.CustomCsaIncludeHelper">
<html>
<![CDATA[
<script type="text/javascript">
function works(){
alert("JS works")
}
</script>
]]>
</html>
</div>
But! after first trying of execution I get Error: than I press redraw button after this I trying execute it againe - and its works
But I cant understood: how avoid first part:(
I had the same challenge. Please look through my article about integrating the external javascript code (cropping images) with Product cockpit:
https://hybrismart.com/2016/08/23/image-crop-resize-in-product-cockpit/
In short:
Product cockpit is a single page
application. The external javascript
is always a pain when you integrate
it with any SPA including ZK.
Hybris Product Cockpit is based on ZK
3.6.4. The architecture of ZK Framework 3.6.4 is not compatible
with Javascript modules (by the way, 3.6.4 was released 7 (!) years ago). The last
versions are better, but ... see #1.
You need to redesign and rewrite the
modules completely to make them
pluggable to ZK.
there is a workaround: using iframe and pop-up windows. See the link above for the details
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.