so i'd done a GridPager modification for my target,share my way here: 1.i'd override the GridPage class with add 2 method:
package org.apache.tapestry5.corelib.components; ... public class GridPager{ .... private void writePreviewPageLink(MarkupWriter writer){ if (currentPage>1){ Object[] context = zone == null ? new Object[] { currentPage-1 } : new Object[] { currentPage-1, zone }; Link link = resources.createEventLink(EventConstants.ACTION, context); Element element = writer.element("a", "class","nav", "href", zone == null ? link : "#", "title", messages.get("preview-page")); writer.write(messages.get("preview-page")); writer.end(); if (zone != null){ String id = renderSupport.allocateClientId(resources); element.attribute("id", id); clientBehaviorSupport.linkZone(id, zone, link); } } } private void writeNextPageLink(MarkupWriter writer){ if (currentPage<maxPages){ Object[] context = zone == null ? new Object[] { currentPage+1 } : new Object[] { currentPage+1, zone }; Link link = resources.createEventLink(EventConstants.ACTION, context); Element element = writer.element("a", "class","nav", "href", zone == null ? link : "#", "title", messages.get("next-page")); writer.write(messages.get("next-page")); writer.end(); if (zone != null){ String id = renderSupport.allocateClientId(resources); element.attribute("id", id); clientBehaviorSupport.linkZone(id, zone, link); } } } } and call them in void beginRender(MarkupWriter writer) function. 2.added some message define to GridPage.properties: preview-page=preview next-page=next 3.changed related css define for preview and next links: DIV.t-data-grid-pager a.nav{ border:0px; color:black; font-size:medium; margin-right:5px; padding:2px 5px; text-decoration:underline; } 2009/10/19 cleverpig <greatclever...@gmail.com>: > i found a way to make a special grid pager:modify the GridPager class. > but it was a hard coding way.anyone have a more general way to define > pager's function and style? > > 2009/10/17 cleverpig <greatclever...@gmail.com>: >> hi,all buddy! >> >> I got a new trouble that i never met that is customize tapestry grid >> ui:include pager model and sort button.. >> the grid pager will be customized to google pager style:such as add >> preview,next arrow link. >> do you get this answer? please share what's in your experience! thank a lot! >> >> -- >> cleverpig(Dan) >> Location: Beijing >> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China >> Zipcode: 100031 >> MSN: great_liu...@hotmail.com >> QQ: 149291732 >> Skype: cleverpigatmatrix >> Facebook ID:cleverpig >> Blog: www.cleverpig.name >> Tags: del.icio.us/cleverpig >> Twitter: twitter.com/cleverpig >> 新浪微博: t.sina.com.cn/cleverpig >> Organization: www.beijing-open-party.org >> or...@facebook: http://www.facebook.com/group.php?gid=8159558294 >> > > > > -- > cleverpig(Dan) > Location: Beijing > Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China > Zipcode: 100031 > MSN: great_liu...@hotmail.com > QQ: 149291732 > Skype: cleverpigatmatrix > Facebook ID:cleverpig > Blog: www.cleverpig.name > Tags: del.icio.us/cleverpig > Twitter: twitter.com/cleverpig > 新浪微博: t.sina.com.cn/cleverpig > Organization: www.beijing-open-party.org > or...@facebook: http://www.facebook.com/group.php?gid=8159558294 > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: www.cleverpig.name Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org