struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiuma <ki...@usa.net>
Subject Damn where is bug in my code????
Date Tue, 15 Oct 2002 16:28:19 GMT
Hi, now I've the following problem:

in my jsp page I have

<c:set var='allGroups' value='${sessionScope.userEditForm.allGroups}'/>
....
...
<c:forEach items="${allGroups}" var="permission">
  <tr>
    <td align='left'>
      <html-el:checkbox property="principalPermissions" 
value="${permission}">
        <c:out value='${permission}'/>
      </html-el:checkbox>
    </td>
  </tr>
</c:forEach>

in the OpenEditAction I write:

try {
            Collection cAllRolesData = cSession.getAllGroups();           
            Iterator iter = cAllRolesData.iterator();
            UserGroupsData gData;
            while (iter.hasNext())
            {
                gData = (UserGroupsData)iter.next();               
                uForm.setAllGroups( gData.getDescription() 
);                               
            }           
        } catch (Exception e) {          
        }

and It correcty fills the list.

Then I try to fill check values:

Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() 
).iterator();
           
            while (iUserRoleData.hasNext())
            {
                RoleData rData;
                rData = (RoleData)iUserRoleData.next();
                System.out.println( "Group: " + rData.getRoleGroup() );
                if ( rData.getRoleGroup().equals("Roles") )
                {
                    uForm.setPrincipalPermissions( rData.getRoleName() );
                    System.out.println( "Name: " + rData.getRoleName() );
                }
            }  

This list is filled, but check boxes are not checked. Why??
Please help me.

Mime
View raw message