0

Grid paging control rendering problem

asked 2010-11-05 05:55:12 +0800

cyiannoulis gravatar image cyiannoulis
1191 10

Hi to all,

There is a problem in the following snippet. It is ok if you load it as is. But if you try to put some images in the toolbar (size 64x64) the paging control is not visible anymore. The funny thing is that this happens only the first time you load the page. Any subsequent reloading renders ok.

<?page title="Paging Example" contentType="text/html;charset=UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" root="./winContacts" ?>
<zk>

<zscript><![CDATA[
    import java.util.List;
    import java.util.ArrayList;
    
	import org.zkoss.zk.ui.event.ForwardEvent;
	import org.zkoss.zk.ui.event.Event;
	import org.zkoss.zkplus.databind.BindingListModelList;
	import org.zkoss.zul.ListModelList;
	
	AnnotateDataBinder binder;
	
    List names = new ArrayList();
    for (int i = 0; i < 100; i++) {
    	names.add("record " + i);
    }
    
    BindingListModelList gridmodel = new BindingListModelList(names, true);
    
    void bind(Event event) {
    	binder = (AnnotateDataBinder) event.getTarget().getAttribute("binder", true);
    }
    
    ]]>
</zscript>

<window id="winContacts" width="800px" height="100%" border="normal" onCreate="bind(event)">
	
	<panel>
		<panelchildren>
		<toolbar>
		<!-- UNCOMMENT THE FOLLOWING TOOLBAR AND USE SOME IMAGES SIZED 64x64
			<toolbarbutton id="_tbRefresh" image="/images/refresh.png" tooltiptext="Refresh contacts list"/>
			<toolbarbutton id="_tbAdd" image="/images/add_contact.png" tooltiptext="Create a new contact"/>
			<toolbarbutton id="_tbSave" image="/images/save.png" tooltiptext="Save modifications"/>
			<toolbarbutton id="_tbRemove" image="/images/delete_contact.png" tooltiptext="Delete contact"/>
		-->
			<toolbarbutton id="_tbRefresh" label="Refresh"  tooltiptext="Refresh contacts list"/>
			<toolbarbutton id="_tbAdd" label="Add" tooltiptext="Create a new contact"/>
			<toolbarbutton id="_tbSave" label="Save" tooltiptext="Save modifications"/>
			<toolbarbutton id="_tbRemove" label="Remove" tooltiptext="Delete contact"/>
			
		</toolbar>
		</panelchildren>
	</panel>

	<borderlayout vflex="true">
		
		<west width="0px">
		</west>
		
		<center>
				<grid id="gridContacts" fixedLayout="true" vflex="true"
						model="@{ names }" mold="paging" pageSize="15">
						
					<columns sizable="true">
						<column label="Contacts"/>
					</columns>
					
					<rows>
						<row self="@{each='record'}" value="@{ record }">
							<label value="@{ record }" width="100%"/>
						</row>
					</rows>
				</grid>	
		</center>
		
		<east id="editorPanel" splittable="true" size="150px">
			<panel>
			</panel>
		</east>
		
	</borderlayout>
	
</window>

</zk>

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-11-07 20:47:05 +0800

PeterKuo gravatar image PeterKuo
481 2

Nice sample code to reproduce the problem.
I have posted the bug at sourceforge:
https://sourceforge.net/tracker/?func=detail&aid=3105006&group_id=152762&atid=785191

Please track from there.

link publish delete flag offensive edit

answered 2010-11-08 04:09:12 +0800

cyiannoulis gravatar image cyiannoulis
1191 10

OK. Thanks Peter

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-11-05 05:55:12 +0800

Seen: 520 times

Last updated: Nov 08 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More