Grouping model Grip problem
if I test the group component, there is an error found:
Servlet.service() for servlet zkLoader threw exception
org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: group in [LanguageDefinition: xul/html], [SYS file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ParameterManagement/dataware/new_file.zul line 13 col 31]
at org.zkoss.zk.ui.metainfo.Parser.parse(Parser.java:778)
The code is like this:
<grid fixedLayout="true">
<columns sizable="true">
<column label="Brand" sort="auto" />
<column label="Processor Type" width="150px" sort="auto" />
<column label="Memory (RAM)" width="120px" sort="auto" />
<column label="Price" width="100px" sort="auto" />
<column label="Hard Drive Capacity" width="150px" sort="auto" />
</columns>
<rows>
<group label="Dell" />
<row>
<label style="padding-left:15px" value="Dell E4500 2.2GHz" />
<label value="Intel Core 2 Duo" />
<label value="2GB RAM" />
<label value="$261.00" style="color:green" />
<label value="500GB" />
</row>
</rows>
</grid>
You need PE version to use Group component. You can download evaluation copy here:
http://www.zkoss.org/download/zk.dsp
Search "Free Evaluation Downloads"
The second problem is done. Thanks very much. But the fist problem still exists.
I guess it is caused by this code.There is an inherited method render() which has a parameter "row".
public class CognosBranchGroupRender implements RowRenderer {
public void render(Row row, java.lang.Object obj) {
}
}
The problem is settled.
Thanks for your help.
ZK - Open Source Ajax Java Framework
Is there anybody who could help me?
It is about the new ZK utility class GroupModelArra which is used to group data in grid. My program is almost the same as the case which is demonstrated on http://www.zkoss.org/zkdemo/grid/grouping_model. Stack trace is shown as follow:
>>java.lang.ClassCastException: org.zkoss.zul.Row cannot be cast to org.zkoss.zul.Group
>> at org.zkoss.zul.Rows.getGroup(Rows.java:168)
>> at org.zkoss.zul.Rows.updateVisibleCount(Rows.java:432)
>> at org.zkoss.zul.Rows.afterInsert(Rows.java:415)
>> at org.zkoss.zul.Rows.insertBefore(Rows.java:257)
>> at org.zkoss.zul.impl.GridDataLoader.syncModel(GridDataLoader.java:301)
>> at org.zkoss.zul.Grid$3.onEvent(Grid.java:583)