Aron and Levi,
 
thanks for your suggestions.
 
Though:
1. when I use plain html: <input type="checkbox" name="selectedCandidates" 
value="${candidate.id}" />    it still does not render value="${candidate.id}".
2. My xml explicitly declares:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.4//EN" "http://java.sun.com/dtd/web-app_2_4.dtd";>
 
Stripes 1.5 only works for specification 2.4, right? All the other staffs I 
tried work fine, but just this pieces won't work. Even when I used display tag 
instead of JSTL, the same problem persist.
 
Anybody has any other suggestions?
 
thanks,
 
Lu
 
 
 



Date: Thu, 20 Nov 2008 15:28:16 -0700From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: Re: [Stripes-users] issues with stripes indexed check boxYou should 
be able to fix the problem by just using plain HTML:<input type="checkbox" 
name="selectedCandidates" value="${candidate.id}" />Although I'm not sure why 
it wouldn't work the way you have it. Also if you do go the plain HTML route it 
won't be repopulated if there are validation errors.Aaronping lu wrote: 


Hi, all,while playing with Stripes indexed check box, I hit a wall. The 
scenario is straight forward:1. step one, retrieve a list of object called 
"candidates" from the database, and put this in flash scope (Attribute name = 
"candidateListInFlash").2. step two, display the contents of the  candidate 
list in a table,  such as id and lastName, plus an indexed checkbox for each 
row.3. step three, try to capture the checkboxes (the id of the candidates) the 
user clicked. And those values are defined as a list of Long in the action 
class with property name of "selectedCandidates".    private List<Long> 
selectedCandidates;    public List<Long> getSelectedCandidates() {        
return selectedCandidates;    }    public void setSelectedCandidates(List<Long> 
selectedCandidates) {        this.selectedCandidates = selectedCandidates;    
}The problem is in step two, in the displaying jsp, with code of:<s:form 
beanclass="com.bla.mvc.checkBoxActionBean">   <table>      <tr>        
<th>ID</th>        <th>First name</th>        <th>Last name</th>        
<th>checkbox</th>      </tr>      <c:forEach var="candidate" 
items="${candidateListInFlash}" varStatus="loop">         <tr>                  
<td>                         <c:out value="${candidate.id}"/>                   
</td>                  <td><c:out value='${candidate.firstName}'/> </td>        
  <td><c:out value='${candidate.lastName}'/> </td>          <td>                
                   <s:checkbox name="selectedCandidates" 
value="${candidate.id}" />          </td>        </tr>      </c:forEach>    
</table> <s:submit name="checkBox2"/></s:form>Somhow, in the <s:checkbox 
name="selectedCandidates" value="${candidate.id}" /> statement, the 
value="${candidate.id}" is never rendered in the jsp. For example, in the html 
source of the jsp, the value for a row of data looks like that:       <tr>      
  
          <td>110796</td>        
          <td>Dave</td>
          <td>BROWN </td>
          <td>                   
              <input value="${candidate.id}" type="checkbox" 
name="selectedCandidates" />
          </td>
        </tr>
  See, the ${candidate.id} value is never rendered in the checkbox field. I 
have tried various way, nothing is working. By the way, if I put a hard code 
value such as <s:checkbox name="selectedCandidates" value="4" />, the whole 
things works in hard way.So value="${candidate.id}" renders fine in regular 
jstl tag, but doesn't work inside the stripes checkbox tag in indexed property 
scenario. Is there anything I am missing or should do differently? Your helps 
are greatly appreciated.Lu

Windows Live Hotmail now works up to 70% faster. Sign up today. 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users
  
_________________________________________________________________
Access your email online and on the go with Windows Live Hotmail.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_access_112008
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to