Search in sources :

Example 1 with ExecutionResolver

use of org.zkoss.zk.xel.impl.ExecutionResolver in project collect by openforis.

the class ComponentUtil method getCurrentComponent.

/**
 * Returns the component handled by the current {@link Execution} object
 * @return
 */
public static Component getCurrentComponent() {
    Execution execution = Executions.getCurrent();
    ExecutionResolver variableResolver = (ExecutionResolver) execution.getVariableResolver();
    Object self = variableResolver.getSelf();
    Component component = (Component) self;
    return component;
}
Also used : ExecutionResolver(org.zkoss.zk.xel.impl.ExecutionResolver) Execution(org.zkoss.zk.ui.Execution) Component(org.zkoss.zk.ui.Component) HtmlBasedComponent(org.zkoss.zk.ui.HtmlBasedComponent)

Aggregations

Component (org.zkoss.zk.ui.Component)1 Execution (org.zkoss.zk.ui.Execution)1 HtmlBasedComponent (org.zkoss.zk.ui.HtmlBasedComponent)1 ExecutionResolver (org.zkoss.zk.xel.impl.ExecutionResolver)1