Question

i have this code

<image src='/img/navigation/delete.png'/> the image shows OK.
<menupopup id="listmenu">
   <menuitem label="Delete" image="img/navigation/delete.png"/>//image dont show at all
</menupopup>

i have also try using single quotes double quotes without success starting with slash or without also try static internet resources.

image='/img/navigation/delete.png'
image='img/navigation/delete.png'
image="/img/navigation/delete.png" 
image="img/navigation/delete.png"       
image="https://www.google.com.tw/images/icons/product/chrome-128.png"

the image on the image tag shows good but dont show on the menuitem even when they have the same path...

UPDATE

i have check the sample provided by ZK and this is the ZUL code Zk Official Page

<menuitem image="/widgets/menu/context_menu/img/UserProfileMale-16x16.png" label="Profile" />

this generate this HTML

<a href="javascript:;" id="b9FVk-a" class="z-menuitem-content">
   <img src="/zkdemo/widgets/menu/context_menu/img/UserProfileMale-16x16.png;jsessionid=690619C76D278163402749B336894F89.zkdemo" class="z-menuitem-image" align="absmiddle"> 
   <span class="z-menuitem-text">Profile</span>
</a>

and the image shows OK.

but my ZUL

<menuitem label="Delete" image="/img/navigation/delete.png"/>

generates this HTML

<a href="javascript:;" id="b2IQyj3-a" class="z-menuitem-cnt">
 <span class="z-menuitem-img" style="background-image:url(/main/img/navigation/delete.png)"></span> 
 Delete
</a>

they differs a lot i am Using ZK. EE 6.5.2 what i am doing wrong..

i also try to do this by hand using Debugger http://sourceforge.net/p/zk1/bugs/2244/ without success.

Tested Browsers

Chrome latest version[Versión 32.0.1700.76 m]
Mozilla latest version[26.0]..

Environment

Apache Tomcat/7.0.41
ZK 6.5.2 EE (build: 2013032614)
Java SE 7  jdk1.7.0_21
Windows Seven 64 bits.
Was it helpful?

Solution

Oke I reproduced your problem on Zk fiddle here

As you can see it works under zk 7.0.0 but but doesn't work zk 6.5.2 and zk 6.5.3.

I tested myself to under zk 6.5.3. If I set the google image, I don't get the image in the popup. But if I make a delete.png image local it works (but it is caption sensitive!).

Very strange...

But for your project, try (if you are allowed) to upgrade to 6.5.3 and test there.

edit : I added to your bugreport this fiddle.

Greetz chill.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top