> Usually the error message you listed means the OGNL expression you 
> provided for some argument did not evaluate correctly, thus some 
> required piece of information is not available.  Please post your tag 
> usage again and I'll take a look.
> 

It's amazing what a calming effect a weekend and a few beers can have. In
preparing a simplified version of what I was trying to do - everything
clicked into place and at least I've got the checkboxlist displaying now. I
still can't get the selected values back into my action though - the map
selectedroles remains empty. I do have the checkbox interceptor configured.
This is what I've got;

<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html>
<head></head>
<body>
<s:form>
<s:checkboxlist name="selectedroles" list="%{availableroles}"
value="%{preselectedroles}"/>
<s:submit type="button" label="Add"/>
</s:form>

</body>
</html>

public class Checkbox extends ActionSupport implements Preparable {
        /**
         * 
         */
    
    private Map<String,String> availableroles;
    private Map<String,String> selectedroles;
    private Map<String,String> preselectedroles;

    public String execute() {
        return SUCCESS;
    }
    
    

    
        
        @Override
        public void prepare() throws Exception {
                        availableroles = new HashMap<String,String>();
                availableroles.put("ROLE_USER", "Diagnostics");
                availableroles.put("ROLE_ADMIN", "Adminstrator");
                availableroles.put("ROLE_UBER", "Unrestricted");
                
                preselectedroles = new HashMap<String,String>();
                preselectedroles.put("ROLE_USER", "Diagnostics");
                
                selectedroles = new HashMap<String,String>();
                
        }
        
        
        public Map<String, String> getAvailableroles() {
                return availableroles;
        }

        public void setAvailableroles(Map<String, String> availableroles) {
                this.availableroles = availableroles;
        }

        public Map<String, String> getSelectedroles() {
                return selectedroles;
        }

        public void setSelectedroles(Map<String, String> selectedroles) {
                this.selectedroles = selectedroles;
        }

        public Map<String, String> getPreselectedroles() {
                return preselectedroles;
        }

        public void setPreselectedroles(Map<String, String> preselectedroles) {
                this.preselectedroles = preselectedroles;
        }
        
        
}

Regards
-- 
View this message in context: 
http://old.nabble.com/Where-is-the-documentation-for-Struts-tags-....-tp28413026p28432059.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to