org.zkoss.zk.ui.UiException: can't find Page to resolve a view model >>> >>> class >>> > :'package.MyViewModel' at [null, line:11, nearby column: 77]

Google Groups | Sergio Michels | 4 years ago
  1. 0

    MVVM + Executions.createComponents = org.zkoss.zk.ui.UiException

    Google Groups | 4 years ago | Sergio Michels
    org.zkoss.zk.ui.UiException: can't find Page to resolve a view model >>> >>> class >>> > :'package.MyViewModel' at [null, line:11, nearby column: 77]
  2. 0

    New Install Centos 7.2.1 with OSS v1.5.13 build 2b6dfa4d90

    opensearchserve | 11 months ago | madmaxdallas
    org.zkoss.zk.ui.UiException: cannot find any method that is annotated for the command onListRefresh with @Command in com.jaeksoft.searchlib.web.controller.PrivilegesController@4c9422a at [file:/root/opensearch/opensearchserver/server/web apps/ROOT/WEB-INF/zul/privileges/index.zul, line:148]
  3. 0

    According to http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Window.html it is possible to manage onClose event in custom way and prevent the default behaviour (detach the window) from being executed. The test provided in the attached files demonstrate that behaviour can't be achieved when using a composer. The idea of the test is that the two windows winOk and winWrong will respond to onClose by hiding the window only, so it can be shown later (multiple times) by the "Open Wrong Window" and "Open Good Window" buttons. In the case of winOk everything is coded in zscript in test.zul and works as expected, however when trying to implement the same for winWrong in its controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) the window will detach. A subsequent click to "Open Wrong Window" will produce this error: 08/09/2011 11:53:20 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1280 SEVERE: >>org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >>Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) >> >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.UtilEvalError.toEvalError(Unknown Source) >> at bsh.BSHMethodInvocation.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.BSHPrimaryExpression.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at bsh.Interpreter.eval(Unknown Source) >> at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:134) >> at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) >> at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:876) >> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) >> at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) >> at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) The problem happens either when clicking the cross button (available by setting closable="true") or forwarding the onClose event from buttonWrong button. In both cases the controller method org.zkoss.test.WinViewCtroller.onClose$winWrong(Event) gets called, I can see the log message as follows: 11:53:16,269 INFO [Thread-12] zkoss.test.WinViewCtroller.onClose$winWrong(18): Called Further testing while debugging my real code (when I first faced the problem), showed that at some point the internal ZK event processing code, there are two instances of the onClose event, one of them gets to the composer where it is sopped from being propagated but later on the second instance gets through to Window.onClose() causing the windows to be detached.

    ZK-Tracker | 5 years ago | javich
    org.zkoss.zk.ui.UiException: Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( ) Sourced file: inline evaluation of: `` winWrong.doModal();'' : Attempt to resolve method: doModal() on undefined variable or class name: winWrong : at Line: 2 : in file: inline evaluation of: `` winWrong.doModal();'' : winWrong .doModal ( )
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.zkoss.zk.ui.UiException

      can't find Page to resolve a view model >>> >>> class >>> > :'package.MyViewModel' at [null, line:11, nearby column: 77]

      at org.zkoss.bind.BindComposer.initViewModel()
    2. ZK Bind
      BindComposer.initViewModel
      1. org.zkoss.bind.BindComposer.initViewModel(BindComposer.java:237)
      1 frame