-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have created a window with a close button as follows:
<window id="screenPaintDialog" title="Screen Painting" closable="true" border="normal" width="1000px" position="center,center" action="show: slideDown;hide: slideUp" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('com.empower.viewmodel.ScreenPaintingViewModel')">
<vlayout>
<grid model="@bind(vm.personalDetailsScreenPaintingFields)" height="600px;">
...
</grid>
<hlayout><button id="cancelBtn" label="Cancel" onClick="screenPaintDialog.detach();"/></hlayout>
</vlayout>
</window>
When I click the Cancel button the following error occurs and displays:
SEVERE: >>bsh.InterpreterError: set: Field access: bsh.ReflectError: No such field: system : at Line: -1 : in file: <called from="" java="" code=""> : <compiled java="" code="">
I have run below code
<zk>
<window id="screenPaintDialog" title="Hi!" border="normal" width="200px">
<caption>
<toolbarbutton label="Help"/>
</caption>
<checkbox label="Hello, Wolrd!"/>
</window>
<button label="Detch" onClick="screenPaintDialog.detach();"/>
</zk>
Its worked fine for me
It might be the way I am implementing the window, given the following window.zul:
<window id="screenPaintDialog" title="Painting" width="850px" >
<vlayout>
<hlayout>
<button id="Btn" label="Cancel" onClick="screenPaintDialog.detach();"/>
</hlayout>
</vlayout>
</window>
If I display this from a menu controller using the following code:
Window w = (Window)Executions.createComponents("/content/window.zul", null, null);
window.doModal();
When clicking the cancel button, I still get:
SEVERE: >>bsh.InterpreterError: set: Field access: bsh.ReflectError: No such field: system : at Line: -1 : in file: <called from="" java="" code=""> : <compiled java="" code="">
Asked: 2013-04-23 09:12:32 +0800
Seen: 35 times
Last updated: Apr 24 '13