gpt4 book ai didi

css - ZK 错误 UI 组件

转载 作者:太空宇宙 更新时间:2023-11-04 16:07:15 25 4
gpt4 key购买 nike

我在 apache 中部署 ZK 时出错,

 java.lang.ClassCastException: neraca.neracaController cannot be cast
to org.zkoss.zk.ui.util.Composer
org.zkoss.zk.ui.metainfo.ComponentInfo.toComposer(ComponentInfo.java:410)
org.zkoss.zk.ui.metainfo.ComponentInfo.toComposer(ComponentInfo.java:397)
org.zkoss.zk.ui.metainfo.ComponentInfo.toComposers(ComponentInfo.java:365)
continued...

这是我的 zul 文件,

<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?>
<zk>
<style>
.silvergray .complex-layout,
.silvergray .complex-layout .z-south,
.silvergray .complex-layout .z-west {
background: #C5E6EF;
}
.breeze .complex-layout,
.breeze .complex-layout .z-south,
.breeze .complex-layout .z-west {
background: #F7F7F7;
}
</style>
<style>
.z-borderlayout {
background: #FFFFFF
}
.complex-layout .z-north {
background: #008BB6;
}
img.complex-layout-header-img {
padding: 0 10px;
}
.complex-layout-header-label {
position: relative;
top: -30px;
padding-left: 40px;
font-size: 24px;
color: White;
font-weight: bold;
}
.inner-border,
.inner-border .z-north,
.inner-border .z-west,
.inner-border .z-south,
.inner-border .z-east {
background: #FFFFFF;
}
.dl-link {
text-decoration: none;
cursor: pointer;
}

</style>
<borderlayout sclass="complex-layout" height="700px">
<north size="90px" border="0">
<div>
<image sclass="complex-layout-header-img" src="/images/Adempiere.png" />
<label sclass="complex-layout-header-label" value="SCM for Small and Medium Business" />
</div>
</north>
<!-- Sidebar -->
<west width="200px" border="0" flex="true" splittable="true" margins="0,5,0,0">
<vlayout spacing="0">
<panel width="100%" border="normal" title="Menu">
<panelchildren style="padding:5px;">
<vbox>
<toolbarbutton label="Jurnal Keuangan" href="lap_keuangan.zul" image="images/book.png"/>
<toolbarbutton label="Buku Besar " href="neraca.zul" image="images/3.png"/>
<toolbarbutton label="Rasio Lancar" href="rasiolancar.zul" image="images/Modify.png" />
<toolbarbutton label="Rasio Kas" href="kas.zul" image="images/2.png"/>
<toolbarbutton label="Rasio Cepat" href="cepat.zul" image="images/Pie.png"/>
<toolbarbutton label="Rasio Modal Kerja dan Aktiva" href="aktiva.zul" image="images/Bar.png"/>
</vbox>
</panelchildren>
</panel>

</vlayout>
</west>

<!-- Content -->
<center>
<borderlayout sclass="inner-border">
<north border="0" height="4%" margins="2,3,0,0">
<label value="Neraca Keuangan" style="font-size:20px;" />
</north>
<center border="0" margins="0,3,3,3">
<window id="win2" title="" width="auto" height="auto" border="" apply="neraca.neracaController">
<grid>
<rows>
<row>
<hlayout>
<div>
<label>Tahun</label>
<combobox id="tahun" >
<comboitem label="2002"/>
<comboitem label="2003"/>
<comboitem label="2004"/>
<comboitem label="2005"/>
<comboitem label="2006"/>
</combobox>
<button id="pilih" label="pilih"/>
<button id="cetak" label="Cetak" image="images/Print.png"/>
</div>
</hlayout>
</row>
</rows>
</grid>
<listbox id="neraca" multiple="true" model="@{win2$composer.allEvents, load-after='pilih.onClick'}">
<listhead>
<listheader label="Nomer Transaksi"/>
<listheader label="Akun"/>
<listheader label="Periode"/>
<listheader label="Saldo Awal"/>
<listheader label="Debet"/>
<listheader label="Credit"/>
</listhead>
<listitem self="@{each='event'}" value="@{event}">
<listcell label="@{event.trans_no}"/>
<listcell label="@{event.acc_number}"/>
<listcell label="@{event.periode}"/>
<listcell label="@{event.saldo}"/>
<listcell label="@{event.debet}"/>
<listcell label="@{event.credit}"/>
</listitem>
</listbox>
</window>
</center>
</borderlayout>
</center>
<south size="40px" border="0" style="background: none repeat scroll 0 0 ;">
<toolbar mold="panel" align="center">
Powered by ZK
</toolbar>
</south>
</borderlayout>
</zk>

我猜应用标签有错误,但我不确定,我已经更改了它但错误仍然发生,请任何人帮助我:)

最佳答案

您的 java 类 neraca.neracaController 是什么样的?它必须从 GenericForwardComposer 扩展。如果是,则应该没有问题。

public class NeracaController extends GenericForwardComposer {
...
}

更多信息请引用this documentation .

关于css - ZK 错误 UI 组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8905493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com