[pal-cvs 2776] [538] cleanup warning for java5.

svnno****@sourc***** svnno****@sourc*****
2007年 9月 4日 (火) 22:55:32 JST


Revision: 538
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=538
Author:   shinsuke
Date:     2007-09-04 22:55:31 +0900 (Tue, 04 Sep 2007)

Log Message:
-----------
cleanup warning for java5. fixed javascript issue. 

Modified Paths:
--------------
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CategoriesDxo.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/CategoryService.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CategoryServiceImpl.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditAction.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditPage.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListAction.java
    pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListPage.java
    pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/admin/order/label.properties
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryEdit.html
    pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryList.html

Added Paths:
-----------
    pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/label.properties


-------------- next part --------------
Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CategoriesDxo.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CategoriesDxo.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/dxo/CategoriesDxo.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -15,7 +15,8 @@
             + ",categoriesName : categoriesName"
             + ",categoriesId : categoriesId"
             + ",categoriesImage : categories.categoriesImage")
-    void convert(List<CategoriesDescription> categories, List<Map> list);
+    void convert(List<CategoriesDescription> categories,
+            List<Map<String, Object>> list);
 
     CategoriesDescription convert(CategoryEditPage page);
 

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/CategoryService.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/CategoryService.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/CategoryService.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -8,7 +8,7 @@
 
 public interface CategoryService extends Serializable {
 
-    public List getSubCategoryList(BigDecimal id);
+    public List<CategoriesDescription> getSubCategoryList(BigDecimal id);
 
     public CategoriesDescription getCategoriesDescription(
             BigDecimal categoriesId);

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CategoryServiceImpl.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CategoryServiceImpl.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/service/impl/CategoryServiceImpl.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -24,21 +24,22 @@
 
     private CategoriesDescriptionBhv categoriesDescriptionBhv;
 
-    public List getSubCategoryList(BigDecimal id) {
+    public List<CategoriesDescription> getSubCategoryList(BigDecimal id) {
         CategoriesDescriptionCB cb = new CategoriesDescriptionCB();
-        //		CategoriesCB cb = new CategoriesCB();
-        //		cb.query().set_Equal(new BigDecimal(id));
+        //      CategoriesCB cb = new CategoriesCB();
+        //      cb.query().set_Equal(new BigDecimal(id));
         cb.setupSelect_Categories();
         cb.query().setLanguageId_Equal(new BigDecimal("1"));
         cb.query().queryCategories().setParentId_Equal(id);
         cb.query().queryCategories().addOrderBy_SortOrder_Asc();
 
-        List list = categoriesDescriptionBhv.selectList(cb);
-        //		categoriesBhv.
-        //		List list = new ArrayList();
-        //		for(int i=0;i<5;i++) {
-        //			list.add(new CategoryDto(i+1,new Integer(i).toString(),"サブ商品"+1, "hoge.jpg"));
-        //		}
+        List<CategoriesDescription> list = categoriesDescriptionBhv
+                .selectList(cb);
+        //      categoriesBhv.
+        //      List list = new ArrayList();
+        //      for(int i=0;i<5;i++) {
+        //          list.add(new CategoryDto(i+1,new Integer(i).toString(),"サブ商品"+1, "hoge.jpg"));
+        //      }
         return list;
     }
 
@@ -101,6 +102,7 @@
      *
      */
     public void deleteCategories(BigDecimal id) {
+        //TODO does not work
         CategoriesDescriptionCB cb = new CategoriesDescriptionCB();
         cb.query().setCategoriesId_Equal(id);
         CategoriesDescription d = categoriesDescriptionBhv.selectEntity(cb);
@@ -113,7 +115,7 @@
 
     public void updateCategory(CategoriesDescription d) {
         Categories c = d.getCategories();
-        //		c.setDateAdded(new Timestamp(new Date().getTime()));
+        //      c.setDateAdded(new Timestamp(new Date().getTime()));
         c.setLastModified(new Timestamp(new Date().getTime()));
 
         categoriesBhv.update(c);

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditAction.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditAction.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -7,6 +7,7 @@
 import java.util.List;
 import java.util.Map;
 
+import jp.sf.pal.common.util.FacesMessageUtil;
 import jp.sf.pal.pompei.PompeiConstants;
 import jp.sf.pal.pompei.dxo.CategoriesDxo;
 import jp.sf.pal.pompei.exentity.Categories;
@@ -24,7 +25,7 @@
     /**
      * dxo
      */
-    private CategoriesDxo dxo;
+    private CategoriesDxo categoriesDxo;
 
     /**
      * カテゴリ編集ページ
@@ -46,6 +47,10 @@
     }
 
     public Class<?> initialize() {
+        return null;
+    }
+
+    public Class<?> prerender() {
         if (categoryEditPage.getMode().equals(PompeiConstants.UPDATE_MODE)) {
             CategoriesDescription d = categoryService
                     .getCategoriesDescription(categoryEditPage.getTargetId());
@@ -60,23 +65,23 @@
             categoryEditPage.setCategoriesImage("");
             categoryEditPage.setSortOrder(null);
         }
-        return null;
-    }
 
-    public Class<?> prerender() {
+        // redner FacesMessages
+        FacesMessageUtil.renderMessages();
         return null;
     }
 
     public Class<?> doUpdate() {
 
-        CategoriesDescription d = dxo.convert(this.categoryEditPage);
+        CategoriesDescription d = categoriesDxo.convert(this.categoryEditPage);
 
-        List list = categoryEditPage.getBreadcrumbItems();
+        List<Map<String, Object>> list = categoryEditPage.getBreadcrumbItems();
         int index = list.size() - 1;
 
-        Map m = (Map) list.get(index);
+        Map<String, Object> m = list.get(index);
         BigDecimal parentId = (BigDecimal) m.get("categoriesId");
 
+        //TODO always null
         Categories c = d.getCategories();
 
         if (c == null) {
@@ -102,6 +107,7 @@
 
         categoryEditPage.setTargetId(parentId);
 
+        //TODO put message
         return CategoryListPage.class;
     }
 
@@ -113,12 +119,12 @@
         this.categoryService = categoryListService;
     }
 
-    public CategoriesDxo getDxo() {
-        return dxo;
+    public CategoriesDxo getCategoriesDxo() {
+        return categoriesDxo;
     }
 
-    public void setDxo(CategoriesDxo dxo) {
-        this.dxo = dxo;
+    public void setCategoriesDxo(CategoriesDxo dxo) {
+        this.categoriesDxo = dxo;
     }
 
 }

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditPage.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditPage.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryEditPage.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -6,6 +6,7 @@
 import java.util.Map;
 
 import org.seasar.teeda.extension.annotation.scope.SubapplicationScope;
+import org.seasar.teeda.extension.util.LabelHelper;
 
 public class CategoryEditPage implements Serializable {
 
@@ -31,7 +32,7 @@
      * パンくずリスト
      */
     @SubapplicationScope
-    private List<Map> breadcrumbItems;
+    private List<Map<String, Object>> breadcrumbItems;
 
     private String categoriesImage;
 
@@ -41,8 +42,6 @@
 
     private BigDecimal sortOrder;
 
-    private List messages;
-
     /**
      * 処理モード
      */
@@ -50,6 +49,8 @@
 
     private BigDecimal targetId;
 
+    private LabelHelper labelHelper;
+
     public String getCategoriesImage() {
         return categoriesImage;
     }
@@ -74,11 +75,11 @@
         this.breadcrumb = breadcrumb;
     }
 
-    public List<Map> getBreadcrumbItems() {
+    public List<Map<String, Object>> getBreadcrumbItems() {
         return breadcrumbItems;
     }
 
-    public void setBreadcrumbItems(List<Map> breadcrumbItems) {
+    public void setBreadcrumbItems(List<Map<String, Object>> breadcrumbItems) {
         this.breadcrumbItems = breadcrumbItems;
     }
 
@@ -114,12 +115,21 @@
         this.sortOrder = sortOrder;
     }
 
-    public List getMessages() {
-        return messages;
+    /**
+     * @return labelHelper
+     */
+    public LabelHelper getLabelHelper() {
+        return labelHelper;
     }
 
-    public void setMessages(List messages) {
-        this.messages = messages;
+    /**
+     * @param labelHelper 設定する labelHelper
+     */
+    public void setLabelHelper(LabelHelper labelHelper) {
+        this.labelHelper = labelHelper;
     }
 
+    public String getDoUpdateValue() {
+        return getLabelHelper().getLabelValue(getMode());
+    }
 }

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListAction.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListAction.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListAction.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -7,161 +7,158 @@
 import java.util.List;
 import java.util.Map;
 
+import jp.sf.pal.common.util.FacesMessageUtil;
 import jp.sf.pal.pompei.dxo.CategoriesDxo;
 import jp.sf.pal.pompei.exentity.CategoriesDescription;
 import jp.sf.pal.pompei.service.CategoryService;
 
-public class CategoryListAction  implements Serializable{
+public class CategoryListAction implements Serializable {
 
-	/**
+    /**
      * 
      */
     private static final long serialVersionUID = -8616177799734159313L;
 
     /**
-	 *
-	 */
-	private CategoriesDxo dxo;
+     *
+     */
+    private CategoriesDxo dxo;
 
-	/**
-	 *
-	 */
-	private CategoryListPage categoryListPage;
+    /**
+     *
+     */
+    private CategoryListPage categoryListPage;
 
-	/**
-	 *
-	 */
-	private CategoryService categoryService;
+    /**
+     *
+     */
+    private CategoryService categoryService;
 
-	public Class initialize() {
-		return null;
-	}
+    public Class<?> initialize() {
+        return null;
+    }
 
-	public Class prerender() {
+    public Class<?> prerender() {
 
-		if(categoryListPage.getParentId() == null) {
-			categoryListPage.setParentId(new BigDecimal("0"));
-		}
+        if (categoryListPage.getParentId() == null) {
+            categoryListPage.setParentId(new BigDecimal("0"));
+        }
 
-		if(categoryListPage.getBreadcrumbItems() == null) {
+        if (categoryListPage.getBreadcrumbItems() == null) {
 
-			categoryListPage.setCategoriesId(new BigDecimal("0"));
+            categoryListPage.setCategoriesId(new BigDecimal("0"));
 
-			List<Map> list = new ArrayList<Map>();
-			Map<String, Object> m = new HashMap<String, Object>();
-			m.put("categoriesId",new BigDecimal("0"));
-			m.put("breadcrumb","TOP");
-			list.add(m);
-			categoryListPage.setBreadcrumbItems(list);
+            List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+            Map<String, Object> m = new HashMap<String, Object>();
+            m.put("categoriesId", new BigDecimal("0"));
+            m.put("breadcrumb", "TOP");
+            list.add(m);
+            categoryListPage.setBreadcrumbItems(list);
 
-		}else {
-			if(categoryListPage.getCategoriesId()!=null) {
-				categoryListPage.setParentId(categoryListPage.getCategoriesId());
-			}
+        } else {
+            if (categoryListPage.getCategoriesId() != null) {
+                categoryListPage
+                        .setParentId(categoryListPage.getCategoriesId());
+            }
 
-			//パンくずリストを再セット
-			List list = setBreadcrumb(categoryListPage.getBreadcrumbItems(),categoryListPage.getParentId());
-			categoryListPage.setBreadcrumbItems(list);
-		}
+            //パンくずリストを再セット
+            List<Map<String, Object>> list = setBreadcrumb(categoryListPage
+                    .getBreadcrumbItems(), categoryListPage.getParentId());
+            categoryListPage.setBreadcrumbItems(list);
+        }
 
-		//カテゴリ一覧の取得
-		List list = categoryService.getSubCategoryList(categoryListPage.getParentId());
-		List cList = new ArrayList();
-		dxo.convert(list,cList);
-		categoryListPage.setCategoryItems(cList);
+        //カテゴリ一覧の取得
+        List<CategoriesDescription> list = categoryService
+                .getSubCategoryList(categoryListPage.getParentId());
+        List<Map<String, Object>> cList = new ArrayList<Map<String, Object>>();
+        dxo.convert(list, cList);
+        categoryListPage.setCategoryItems(cList);
 
-		return null;
-	}
+        // redner FacesMessages
+        FacesMessageUtil.renderMessages();
+        return null;
+    }
 
-	public Class doChangeOrder() {
-		return null;
-	}
+    public Class<?> doChangeOrder() {
+        return null;
+    }
 
-	public Class doDelete() {
+    public Class<?> doDelete() {
 
-		//選択行を取得
-		BigDecimal id = getCategoriesId();
+        //選択行を取得
+        BigDecimal id = getCategoryListPage().getTargetId();
+        // TODO check if id is null
 
-		if(categoryService.hasChild(id)) {
-			return null;
-		}
+        if (categoryService.hasChild(id)) {
+            //TODO put message
+            return null;
+        }
 
-		categoryService.deleteCategories(id);
+        // TODO check related tables
+        categoryService.deleteCategories(id);
 
-		return null;
-	}
+        //TODO put message
+        return null;
+    }
 
-	private BigDecimal getCategoriesId() {
-		int rowId = categoryListPage.getRowIndex();
-		List list = categoryListPage.getCategoryItems();
-		Map d = (Map)list.get(rowId);
-		BigDecimal id = (BigDecimal)d.get("categoriesId");
-		return id;
-	}
+    /**
+     * @return categoryListPage
+     */
+    public CategoryListPage getCategoryListPage() {
+        return categoryListPage;
+    }
 
-	/**
-	 * @return categoryListPage
-	 */
-	public CategoryListPage getCategoryListPage() {
-		return categoryListPage;
-	}
+    /**
+     * @param categoryListPage 設定する categoryListPage
+     */
+    public void setCategoryListPage(CategoryListPage categoryListPage) {
+        this.categoryListPage = categoryListPage;
+    }
 
-	/**
-	 * @param categoryListPage 設定する categoryListPage
-	 */
-	public void setCategoryListPage(CategoryListPage categoryListPage) {
-		this.categoryListPage = categoryListPage;
-	}
+    /**
+     * @return categoryListService
+     */
+    public CategoryService getCategoryService() {
+        return categoryService;
+    }
 
-	/**
-	 * @return categoryListService
-	 */
-	public CategoryService getCategoryService() {
-		return categoryService;
-	}
+    private List<Map<String, Object>> setBreadcrumb(
+            List<Map<String, Object>> breadcrumbItems, BigDecimal id) {
+        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+        for (Map<String, Object> m : breadcrumbItems) {
+            list.add(m);
+            if (((BigDecimal) m.get("categoriesId")).equals(id)) {
+                return list;
+            }
+        }
 
+        CategoriesDescription d = categoryService
+                .getCategoriesDescription(categoryListPage.getCategoriesId());
 
-	private List<Map> setBreadcrumb(List<Map> breadcrumbItems, BigDecimal id) {
-		List<Map> list = new ArrayList<Map>();
-		for (Map m : breadcrumbItems) {
-			list.add(m);
-			if(((BigDecimal)m.get("categoriesId")).equals(id)) {
-				return list;
-			}
-		}
+        Map<String, Object> m = new HashMap<String, Object>();
+        m.put("categoriesId", id);
+        m.put("breadcrumb", d.getCategoriesName());
+        list.add(m);
+        return list;
+    }
 
-		CategoriesDescription d = categoryService.getCategoriesDescription(categoryListPage.getCategoriesId());
+    /**
+     * @param categoryListService 設定する categoryListService
+     */
+    public void setCategoryService(CategoryService categoryListService) {
+        this.categoryService = categoryListService;
+    }
 
-		Map m = new HashMap();
-		m.put("categoriesId", id);
-		m.put("breadcrumb", d.getCategoriesName());
-		list.add(m);
-		return list;
-	}
+    public CategoriesDxo getDxo() {
+        return dxo;
+    }
 
-	/**
-	 * @param categoryListService 設定する categoryListService
-	 */
-	public void setCategoryService(CategoryService categoryListService) {
-		this.categoryService = categoryListService;
-	}
+    public void setDxo(CategoriesDxo dxo) {
+        this.dxo = dxo;
+    }
 
-	public Class goCategoryList() {
-		return null;
-	}
+    public Class<?> doUpdate() {
+        return CategoryEditPage.class;
+    }
 
-	public CategoriesDxo getDxo() {
-		return dxo;
-	}
-
-	public void setDxo(CategoriesDxo dxo) {
-		this.dxo = dxo;
-	}
-
-	public String doUpdate() {
-		BigDecimal id = getCategoriesId();
-		categoryListPage.setTargetId(id);
-		return "categoryEdit";
-	}
-
 }

Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListPage.java
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListPage.java	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/admin/product/CategoryListPage.java	2007-09-04 13:55:31 UTC (rev 538)
@@ -37,8 +37,6 @@
 
     private String breadcrumb;
 
-    private int rowIndex;
-
     private BigDecimal targetId;
 
     @SubapplicationScope
@@ -50,10 +48,10 @@
     private String mode;
 
     @SubapplicationScope
-    private List<Map> breadcrumbItems;
+    private List<Map<String, Object>> breadcrumbItems;
 
     @SubapplicationScope
-    private List categoryItems;
+    private List<Map<String, Object>> categoryItems;
 
     public String getCategoriesImage() {
         return categoriesImage;
@@ -91,11 +89,11 @@
     //		return null;
     //	}
 
-    public List getCategoryItems() {
+    public List<Map<String, Object>> getCategoryItems() {
         return categoryItems;
     }
 
-    public void setCategoryItems(List categoryList) {
+    public void setCategoryItems(List<Map<String, Object>> categoryList) {
         this.categoryItems = categoryList;
     }
 
@@ -107,11 +105,11 @@
         this.categoriesId = categoriesId;
     }
 
-    public List<Map> getBreadcrumbItems() {
+    public List<Map<String, Object>> getBreadcrumbItems() {
         return breadcrumbItems;
     }
 
-    public void setBreadcrumbItems(List<Map> breadcrumbs) {
+    public void setBreadcrumbItems(List<Map<String, Object>> breadcrumbs) {
         this.breadcrumbItems = breadcrumbs;
     }
 
@@ -123,14 +121,6 @@
         this.breadcrumb = string;
     }
 
-    public int getRowIndex() {
-        return rowIndex;
-    }
-
-    public void setRowIndex(int updateId) {
-        this.rowIndex = updateId;
-    }
-
     public String getMode() {
         return mode;
     }

Modified: pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/admin/order/label.properties
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/admin/order/label.properties	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/admin/order/label.properties	2007-09-04 13:55:31 UTC (rev 538)
@@ -1,6 +1,3 @@
 orderList.title=\u6ce8\u6587\u7ba1\u7406\u3000\u4e00\u89a7\u753b\u9762
 orderEdit.title=\u6ce8\u6587\u7ba1\u7406\u3000\u767b\u9332\u753b\u9762
 orderConfirm.title=\u6ce8\u6587\u7ba1\u7406\u3000\u78ba\u8a8d\u753b\u9762
-
-deliveryMethodEdit.insert=\u767b\u9332\u3059\u308b
-deliveryMethodEdit.update=\u66f4\u65b0\u3059\u308b
\ No newline at end of file

Added: pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/label.properties
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/label.properties	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/label.properties	2007-09-04 13:55:31 UTC (rev 538)
@@ -0,0 +1,3 @@
+insert=\u767b\u9332\u3059\u308b
+update=\u66f4\u65b0\u3059\u308b
+delete=\u524a\u9664\u3059\u308b
\ No newline at end of file


Property changes on: pompei/portlets/pompei-core/trunk/src/main/resources/jp/sf/pal/pompei/web/label.properties
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryEdit.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryEdit.html	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryEdit.html	2007-09-04 13:55:31 UTC (rev 538)
@@ -10,11 +10,6 @@
 	&gt;&nbsp;<span id="breadcrumb">パンくずリスト</span>
 </div>
 <hr/>
-<!--
-<div id="messageItems">
-	<span id="message"></span><br/>
-</div>
--->
 <form id="form" method="post">
 <div><span id="allMessages"></span></div>
 <input type="hidden" id="mode" />

Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryList.html
===================================================================
--- pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryList.html	2007-09-04 12:41:49 UTC (rev 537)
+++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/admin/product/categoryList.html	2007-09-04 13:55:31 UTC (rev 538)
@@ -8,14 +8,13 @@
 <body>
 <script language="javascript">
 <!--
-function setRowIndex(form, updId){
-	args = updId.split(":");
+function setTargetId(form, id){
 	children = form.childNodes;
-	children[1].value = args[2];
-}
+	children[1].value = id;
+}
 function setMode(form, mode){
-	children = form.childNodes;
-	children[0].value = mode;
+	children = form.childNodes;
+	children[0].value = mode;
 }
  -->
 </script>
@@ -23,7 +22,7 @@
 	&gt;&nbsp;<a id="goSubCategory" href="categoryList.html?categoriesId=0"><span id="breadcrumb"></span></a>
 </div>
 <hr/>
-<form id="categoryListForm" method="post"><input type="hidden" id="mode" /><input type="hidden" id="rowIndex" />
+<form id="categoryListForm" method="post"><input type="hidden" id="mode" /><input type="hidden" id="targetId" />
 <input type="hidden" id="parentId" />
 <table  border="1">
 	<thead>
@@ -40,8 +39,7 @@
 			<td><a id="goCategoryList" href="categoryList.html?categoriesId=1"><span id="categoriesName">カテゴリ</span></a></td>
 			<td><span id="categoriesImage"></span>&nbsp;</td>
 			<td>
-				<input type="submit" id="doUpdate" value="編集" onclick="setMode(this.form,'update');setRowIndex(this.form,this.name);"/>
-				<input type="button" id="doDelete" value="削除" onclick="if(confirm('削除します。よろしいですか?')){setMode('delete');setRowIndex(this.form,this.name)}else{return false}" />
+              <input type="submit" id="doUpdate" value="編集" onclick="setMode(this.form,'update');setTargetId(this.form,this.nextSibling.value);" /><input type="hidden" id="categoriesId" /><input type="button" id="doDelete" value="削除" onclick="if(confirm('削除します。よろしいですか?')){setMode(this.form,'delete');setTargetId(this.form,this.previousSibling.value)}else{return false}" />
 			</td>
 		</tr>
 	</tbody>


pal-cvs メーリングリストの案内