-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys,
we test our entire application through ZATS, which works pretty good. Now we've came across the problem, that we need to check the content of the tooltip shown for XulElements.
We have some custom mechanisms implemented, but in the end its this what we do:
<label value="something" tooltip="generic_tooltip_popup, position=end_before" />
The "generic_tooltip_popup" is the ID of an included component that dynamically renders the content.
On the testing side, we would like to do something like this:
ComponentAgent label = ... query ...
ComonentAgent tootipPopup = label.openTooltip();
// or label.tooltip()
// or label.as(TooltipAgent.class).open()
Anyone can help us?
Cheers, Charles
It does't support this feature yet, could you post a feature at http://tracker.zkoss.org/secure/Dashboard.jspa. and the possible workaround is get the popup component and call it's open directly.
Hi dennis,
thanks for your reply. I cant get that working, as it fails with this error:
java.lang.IllegalStateException: Components can be accessed only in event listeners
at org.zkoss.zk.ui.impl.UiEngineImpl.getCurrentVisualizer(UiEngineImpl.java:259)
at org.zkoss.zk.ui.impl.UiEngineImpl.addResponse(UiEngineImpl.java:293)
at org.zkoss.zk.ui.AbstractComponent.response(AbstractComponent.java:1491)
at org.zkoss.zk.ui.AbstractComponent.response(AbstractComponent.java:1452)
at org.zkoss.zul.Popup.open(Popup.java:142)
Moreover, as we're using MVVM to bind the popup context and listen for then open event, I guess that we'll have to go through the full event system. I tried this:
// desktopId from targetAgent
Map<String, Object> data = EventDataManager.getInstance().build(
new OpenEvent(Events.ON_OPEN,
(Component) tooltipComponentAgent.getDelegatee(),
true,
(Component)targetAgent.getDelegatee()));
((ClientCtrl)targetAgent.getClient()).postUpdate(desktopId, tooltipComponentAgent.getUuid(), Events.ON_OPEN, data, false);
((ClientCtrl)targetAgent.getClient()).flush(desktopId);
It's not that nice, but it seem to work ok.
Feature request: http://tracker.zkoss.org/browse/ZATS-26
Asked: 2013-09-23 14:27:52 +0800
Seen: 17 times
Last updated: Sep 24 '13
ZATS: Error 500 when connecting to ZUL due to missing class org.zkoss.xel.zel.XelELResolver
ZATS DesktopAgent.query not working with id's
ZATS: NoSuchMethodError getContextPath()
ZATS Mimic - Replacing Server Emulator (Jetty Lite) with Glassfish
ZATS does not work with combobox MVVM @save
What is ZATS version 1.1.0.FL.20120710?