An example in DISPLAYTAG

xiaoxiao2021-03-06  38

Backstage section: =============================================== ======== Import org.displaytag.Decorator.tableDecorator; import java.util.hashmap; import java.text.SIMPLEDATEFORMAT; import java.util.date;

public class BulletinListDecorator extends TableDecorator {private String bulletinId = null; private String title = null; private SimpleDateFormat sdf = null; private int i = 0; public BulletinListDecorator () {sdf = new SimpleDateFormat ( "yy-MM-dd");} Public string getBulletinId () {i = 1; return "" i;} public string gettitle () {bulletinid = (String) ("BulletinID"); Title = (String "); Title = (HashMap). Getcurrentrowobject ()). Get ("Title"); return "" title " "} Public string getlastpubd () {return sdf.format ((" ("(" LastPubd "));}} ======================================== ======================================== front part part: ======= =====================================================

Class = "value" headerclass = "valueetd" /> Where BulletinList is an arraylist, titleKey points to the Properties file ========================================= =============

转载请注明原文地址:https://www.9cbs.com/read-72929.html

New Post(0)