Ted Husted wrote: Of course, help and comments are always welcome. :)
-Ted.
What I have found my clients confused is that the DAO faking part is many classes in sample app, and it confuses them as to what is "Struts" and what is DAO xml reader, they both read XML. I would remove all the DAO, replace with something that is easy to undertstand and use and clearly not a part of "Struts". (I use this class in development also to generate data for a view for demo/prototype, without having to design a db, since I do not know what they want yet). Ah, and I win a design award. =:-} It just makes it simpler.
.V <eom>
public class ZFakeData {
public static ArrayList getFakeRows() { ArrayList rows = new ArrayList(); Map cols = new HashMap(); cols.put("id", new Integer(1)); cols.put("name", "Vic"); cols.put("subject", "How to"); cols.put("date", new Timestamp(new java.util.Date().getTime())); cols.put("content", "Now is the time to hepl the King1"); rows.add(cols); cols = new HashMap(); cols.put("id", new Integer(2)); cols.put("name", "Dave"); cols.put("subject", "C#"); cols.put("date", new Timestamp(new java.util.Date().getTime())); cols.put("content", "Now is the time to hepl the King2"); rows.add(cols); cols = new HashMap(); cols.put("id", new Integer(3)); cols.put("name", "Tom"); cols.put("subject", "Struts"); cols.put("date", new Timestamp(new java.util.Date().getTime())); cols.put("content", "Now is the time to hepl the King3"); rows.add(cols); return rows;
}
public static Map getFakeRow() { Map cols = new HashMap(); cols.put("id", new Integer(1)); cols.put("name", "Vic"); cols.put("subject", "How to"); cols.put("date", new Timestamp(new java.util.Date().getTime())); cols.put("content", "Now is the time to hepl the King1"); return cols; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]