svnno****@sourc*****
svnno****@sourc*****
2007年 9月 30日 (日) 06:57:07 JST
Revision: 597 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=597 Author: shinsuke Date: 2007-09-30 06:57:07 +0900 (Sun, 30 Sep 2007) Log Message: ----------- categoryId handling in action. Modified Paths: -------------- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListAction.java pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListPage.java pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/product/categoryList.html -------------- next part -------------- Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListAction.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListAction.java 2007-09-29 07:02:24 UTC (rev 596) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListAction.java 2007-09-29 21:57:07 UTC (rev 597) @@ -92,6 +92,14 @@ return null; } + public Class<?> doFinish() { + // set current id + SessionUtil.putToApplicationScope(PompeiConstants.CURRENT_CATEGORY_ID, + getCategoryListPage().getTargetId()); + + return CategoryListPage.class; + } + /** * @return categoryListPage */ Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListPage.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListPage.java 2007-09-29 07:02:24 UTC (rev 596) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/web/user/product/CategoryListPage.java 2007-09-29 21:57:07 UTC (rev 597) @@ -24,6 +24,8 @@ private BigDecimal categoryId; + private BigDecimal targetId; + public int getBreadcrumbIndex() { return breadcrumbIndex; } @@ -80,4 +82,18 @@ this.categoryId = parentId; } + /** + * @return targetId + */ + public BigDecimal getTargetId() { + return targetId; + } + + /** + * @param targetId 設定する targetId + */ + public void setTargetId(BigDecimal targetId) { + this.targetId = targetId; + } + } Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/product/categoryList.html =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/product/categoryList.html 2007-09-29 07:02:24 UTC (rev 596) +++ pompei/portlets/pompei-core/trunk/src/main/webapp/view/user/product/categoryList.html 2007-09-29 21:57:07 UTC (rev 597) @@ -7,13 +7,20 @@ <title id="title-head">カテゴリ一覧画面</title> </head> <body> -<form id="categoryForm"> -<input type="hidden" id="categoryId" /> +<script language="javascript"> +<!-- +function setCategoryId(form, id){ + children = form.childNodes; + children[1].value = id; + children[0].click(); +} + --> +</script><form id="categoryForm"><input id="doFinish" type="submit" style="display: none;"/><input type="hidden" id="targetId" /> <div id="breadcrumbItems"> -<span id="depth" te:escape="false"> </span><a id="goCategoryList-breadcrmb" href="./categoryList.html?categoryId=0"><span id="name">カテゴリ</span></a><br/> +<span id="depth" te:escape="false"> </span>» <input type="hidden" id="categoryId-breadcrumbItems" /><a id="goCategoryList-breadcrmb" href="./categoryList.html?categoryId=0" onclick="setCategoryId(this.previousSibling.form,this.previousSibling.value);"><span id="name">カテゴリ</span></a><br/> </div> <div id="categoryItems"> -<span id="depth" te:escape="false"> </span><a id="goCategoryList" href="./categoryList.html?categoryId=1"><span id="name">スニーカー</span></a><br/> + <span id="depth" te:escape="false"> </span>- <input type="hidden" id="categoryId-categoryItems" /><a id="goCategoryList" href="./categoryList.html?categoryId=1" onclick="setCategoryId(this.previousSibling.form,this.previousSibling.value);"><span id="name">スニーカー</span></a><br/> </div> </form> </body>