-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I need some helppictures (more than icons) for the selection from comboboxes, listitems. I found a very fast way for onmouseover-action.
However, CSA can only enable the view form a popup. But the first time view from the popup has to be from the serverside (position).
Is there a way to do "popup.open(Component)" in CSA? Meanwhile i use serverside-action to open the popup the first time.
Here is a small demo, build with the zkdemo-pictures:
<hbox> <zscript> void openCombo(OpenEvent event) { if (event.isOpen()) { help.open(dummy); // real life: set image from the selected item } else { help.close(); } } </zscript> <button label="test" action="onmouseover: #{test}.src='/zkdemo/img/Centigrade-Widget-Icons/GoldBar-32x32.gif';"/> Combobox with description and icons: <combobox onOpen="openCombo(event)"> <comboitem label="Simple and Rich" action="onmouseover: window.action.show(#{help}); #{helpsrc}.src='/zkdemo/img/Centigrade-Widget-Icons/GoldBar-32x32.gif'; onmouseout: window.action.hide(#{help})" /> <comboitem label="Cool!" action="onmouseover: window.action.show(#{help}); #{helpsrc}.src='/zkdemo/img/Centigrade-Widget-Icons/CogwheelEye-32x32.gif'; onmouseout: window.action.hide(#{help})" /> <comboitem label="Ajax and RIA" action="onmouseover: window.action.show(#{help}); #{helpsrc}.src='/zkdemo//img/Centigrade-Widget-Icons/WindowGlobe-32x32.gif'; onmouseout: window.action.hide(#{help})" /> </combobox> <label id="dummy"/> <popup id="help"> <image id="helpsrc" src="" height="150px" width="150px"/> </popup> </hbox>
Maybe a zero-tooltiptime only for one page is an alternative.
BTW: This works also for iframe (i.e. html help)
BTW2: I use a converter to setup the CSA-Action, like
<comboitem label="@{product.description}"
action="@{product.picture, converter='com.at.od.MouseHelpImage'" />
/Robert
hi Robert,
You can use the comm utility provided by ZK to fire Client side event towards the Server, see this post for a dirty workaround:
http://zkoss.org/forum/index.zul#path%3DlistComment%3BdiscussionId%3D6532%3BcategoryId%3D14%3B
Regards,
Robert
cool customization on combobox, :).
Hi Robert (Lee),
thanks for your answer. i hoped for a client-side-only resolution (without server-roundtrip). However, the speed seems ok. Fire the first open from the server and the changes at clientside is fast enough. With your workaround i could avoid the empty popup at the first time.
@dennis
thanks, i need many (help) pictures and html-help. I think my application will be "on air" next week (for betatesting) - i've also done some other image-prompters.
/Robert
Would you post the url of the application, so we can 'play' it also ? :)
Asked: 2009-01-19 12:56:04 +0800
Seen: 687 times
Last updated: Jan 21 '09