KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > blogunity > web > decorator > GlobalCategoriesTableDecorator


1 /*
2  * $Id: GlobalCategoriesTableDecorator.java,v 1.3 2004/12/26 00:26:18 michelson Exp $
3  *
4  * Copyright (c) 2004 j2biz Group, http://www.j2biz.com Koeln / Duesseldorf ,
5  * Germany
6  *
7  * @author Max Kalina
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation; either version 2 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22  * Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */

25
26 package com.j2biz.blogunity.web.decorator;
27
28 import org.apache.commons.logging.Log;
29 import org.apache.commons.logging.LogFactory;
30
31 import com.j2biz.blogunity.pojo.Category;
32
33 public class GlobalCategoriesTableDecorator extends AbstractTableDecorator {
34     /**
35      * Logger for this class
36      */

37     private static final Log log = LogFactory.getLog(GlobalCategoriesTableDecorator.class);
38     
39     public String JavaDoc getActions() {
40
41         Category category = (Category) getCurrentRowObject();
42         StringBuffer JavaDoc out = new StringBuffer JavaDoc();
43         out.append("<nobr>");
44
45         // edit link
46
out.append("<a HREF=\"");
47         out.append(ctx);
48         out.append("/my/editGlobalCategoryForm?id=");
49         out.append(category.getId());
50         out.append("\">");
51         out.append(getMessageForKey("EDIT"));
52         out.append("</a>");
53         
54         // delete link
55
out.append("&nbsp;|&nbsp;");
56         out.append("<a HREF=\"");
57         out.append(ctx);
58         out.append("/my/deleteGlobalCategoryConfirm?id=");
59         out.append(category.getId());
60         out.append("\">");
61         out.append(getMessageForKey("DELETE"));
62         out.append("</a>");
63
64         out.append("</nobr>");
65
66         return out.toString();
67     }
68
69
70
71 }
Popular Tags