Results 1 to 2 of 2

Thread: illegal argument expression.

  1. #1
    Join Date
    Feb 2007
    Posts
    291

    Default illegal argument expression.

    Code:
    java.lang.IllegalArgumentException: Map key 'group_id' has value [3] that is not of expected type [class java.lang.Integer], instead it is of type [java.lang.String]
    Code:
    <input name="group_id" value="flowScope.group_id" type="int"/>
    GroupFormAction.java
    Code:
    @Override
        protected Object createFormObject(RequestContext context) throws Exception
        {
            final Integer groupId = context.getFlowScope().getInteger("group_id");
            GroupCommand groupCommand = new GroupCommand();
            if (groupId == null)
                return groupCommand;
            Group group = this.groupService.getGroupById(groupId);
            groupCommand.setId(groupId);
            groupCommand.setGroupname(group.getAuthority());
            groupCommand.setActive(Boolean.valueOf(group.isActive()));
            return groupCommand;
        }
    what is wrong? i thought [3] was an integer.

  2. #2

    Default

    try using
    PHP Code:
    type="integer" 
    because "integer" is registered as alias in
    org.springframework.binding.convert.servic.Default ConversionService

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •