[Seasar-user:21105] Re: 【ご質問】ForEach内のAタグでインデックス値を渡してPageクラスで処理したい

Koichi Kobayashi [E-MAIL ADDRESS DELETED]
2011年 10月 31日 (月) 18:01:33 JST


$B>.NS(B (koichik) $B$G$9!%(B

> $B!c(BJavaScript$B!d!A(BonClick$B=hM}0lItH4?h!A(Bfunction deleteForm(){
>  document.getElementById("doDelete").click();$B!!"+!!-"(BA$B%?%0$G$O(BPage$B%/%i%9$N%a%=%C%I$r8F$S=P$;$J$$$?$a(BonClick$B$r;HMQ$7$F(BPage$B%/%i%9$r8F$S=P$7$F$$$k!#(B
> }

$B$3$l$@$1$@$H<B:]$K$d$C$F$k=hM}$,$o$+$i$J$$$N$G$9$,!"(B
siteInfoIndex $B$O$I$3$+$[E-MAIL ADDRESS DELETED]$7$F$$$^$9$+!)(B

$B%j%s%/$O(B form $B$r%5%V%_%C%H$9$k$?$a$K;H$o$l$F$$$k$@$1$N$h$&$J$N$G!"(B
$B%j%s%/$N%Q%i%a!<%?$H$OJL$K(B form $B$K(B

<input type="hidden" id="selectedSiteInfoIndex" />

$B$N$h$&$J$b$N$,I,MW$G$9!#(B
# $B%Z!<%8%/%i%9$K$bF1$8%W%m%Q%F%#$,I,MW$G$9!#(B

$B$=$7$F(B deleteForm() $B$NCf$G%j%s%/$N%Q%i%a!<%?$+$i<hF@$7$?CM$r(B
$B$3$N(B <input> $BMWAG$[E-MAIL ADDRESS DELETED]$9$k$h$&$K$7$F$/$@$5$$!#$=$7$F!"(B

> $B!c(BPage$B%/%i%9!d!A(BdoXXX$B%a%=%C%IItJ,0lItH4?h!A(B
>  public String doDelete(){
>   siteInfoItems.remove(siteInfoIndex);$B!!"+!!-#%$%s%G%C%/%9$r<hF@$7$F!"$=$N9T$@$1:o=|$7$?$$!#%$%s%G%C%/%9$,$&$^$/EO$l$P:o=|$G$-$k$O$:!#(B
>   return null;
>  }

$B$G;2>H$9$k$N$O(B selectedSiteInfoIndex $B$K$7$F$/$@$5$$!#(B

siteInfoIndex $B$O(B forEach $B$G7+$jJV$5$l$k(B DTO $B$N%W%m%Q%F%#$G!"(B
$B$=$l$H$OJL$K(B selectedSiteInfoIndex $B$N$h$&$J%W%m%Q%F%#(B ($B$3$l$O(B
DTO $B$N%W%m%Q%F%#$G$O$"$j$^$;$s(B) $B$,I,MW$H$$$&$3$H$KN10U$7$F$/$@$5$$!#(B


Date: Sun, 30 Oct 2011 21:54:06 +0900
From: $BKRG7Fb(B $BN4;K(B <[E-MAIL ADDRESS DELETED]>
Subject: [Seasar-user:21103] $B!Z$4<ALd![(BForEach$BFb$N(BA$B%?%0$G%$%s%G%C%/%9CM$rEO$7$F(BPage$B%/%i%9$G=hM}$7$?$$(B

> 
> $BKRG7Fb$H?=$7$^$9!#(B
>  
> $B$9$_$^$;$s!#<+J,$J$j$KD4$Y$F9T$C$F$$$?$s$G$9$,!"(B
> $B$I$&$7$F$bJ,$+$i$J$$$?$a$4<ALd$5$;$F$$$?$@$-$^$9!#(B
>  
> $B$d$j$?$$$3$H$O(BForEach$BJ8$G0lMwI=<($7$F$"$k3F9T$K:o=|%j%s%/$rI=<($5$;!"(B
> $B:o=|%j%s%/$r%/%j%C%/$7$?$i!"$=$N9T$r:o=|$7$?$$$H;W$C$F$*$j$^$9!#(B
> $B8=>u$O$&$^$/0lMw$N%$%s%G%C%/%9$r<hF@$G$-$:!"(BPage$B%/%i%9B&$K%$%s%G%C%/%9$NCM$rEO$9$3$H$,$G$-$^$;$s!#(B
> $BA[Dj$H$O0c$&9T$,:o=|$5$l$F$7$^$$$^$9!#(B
> $B2a5n$K$bF1$8$h$&$J0U8+$,$"$j!";29M$K$7$F9T$C$F$_$?$s$G$9$,$&$^$/$G$-$^$;$s$G$7$?!#(B
> $B$I$J$?$+J,$+$kJ}$465<x$NJ}$h$m$7$/$*4j$$CW$7$^$9!#(B
> $B"(2a5n$N;w$?$h$&$J<ALd!!"M!!(Bhttp://ml.seasar.org/archives/seasar-user/2007-November/011557.html
>  
> $B!c2hLL%$%a!<%8!d(B
> 1$B9TL\!!!!:o=|%j%s%/(B
> 2$B9TL\!!!!:o=|%j%s%/(B
> 3$B9TL\!!!!:o=|%j%s%/(B
>  
> $B",(B2$B9TL\$N:o=|%j%s%/2!2<(B
>  
> 1$B9TL\!!!!:o=|%j%s%/(B
> 3$B9TL\!!!!:o=|%j%s%/(B
>  
> $B!c(Bhtml$B%=!<%9!d!A(BA$B%?%0ItJ,0lItH4?h!A(B
>        <a id="goNewSiteEntry"
>        href="newSiteEntry.html?siteInfoIndex=1" >$B!!"+!!-!(Bhref$B$G%$%s%G%C%/%9$N%Q%i%a!<%?$rEO$;$J$$!*!)(B
>        <img src="../../img/batu2.png" alt="$B:o=|(B" border="0" onclick="deleteForm();/></a>
>  
> $B!c(BJavaScript$B!d!A(BonClick$B=hM}0lItH4?h!A(Bfunction deleteForm(){
>  document.getElementById("doDelete").click();$B!!"+!!-"(BA$B%?%0$G$O(BPage$B%/%i%9$N%a%=%C%I$r8F$S=P$;$J$$$?$a(BonClick$B$r;HMQ$7$F(BPage$B%/%i%9$r8F$S=P$7$F$$$k!#(B
> }
>  
> $B!c(BPage$B%/%i%9!d!A(BdoXXX$B%a%=%C%IItJ,0lItH4?h!A(B
>  public String doDelete(){
>   siteInfoItems.remove(siteInfoIndex);$B!!"+!!-#%$%s%G%C%/%9$r<hF@$7$F!"$=$N9T$@$1:o=|$7$?$$!#%$%s%G%C%/%9$,$&$^$/EO$l$P:o=|$G$-$k$O$:!#(B
>   return null;
>  }
> 
> $B0J>e$G$9!#(B
> $B$h$m$7$/$*4j$$CW$7$^$9!#(B
>   		 	   		  

--
{
  name: "Koichi Kobayashi",
  mail: "[E-MAIL ADDRESS DELETED]",
  blog: "http://d.hatena.ne.jp/koichik/",
  twitter: "@koichik"
 }



Seasar-user メーリングリストの案内