You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ignacio de Córdoba <ic...@skios.es> on 2009/05/05 17:47:43 UTC

Re: Integer s:checkbox sends "false" value to action setter

Hi,
I've seen this has not been solved or replied here. Could anybody give me
any directions on how to post a JIRA issue for this?
I've seen https://issues.apache.org/struts/secure/BrowseProject.jspa but
can't get to the area for posting new issues/bugs.

Thanks,
Ignacio
-- 
View this message in context: http://www.nabble.com/Integer-s%3Acheckbox-sends-%22false%22-value-to-action-setter-tp22210478p23390245.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Integer s:checkbox sends "false" value to action setter

Posted by Ignacio de Córdoba <ic...@skios.es>.
OK, I understand but I am using checkboxes for the typical "remove entries in
this forum" action. The value are integesr (primary keys of the entries) and
so the setter in the action is:

public void setRemoveEntry(Integer[] id)
{
}

When i check no checkboxes in the form, I get the exception, as struts is
sending "false" (string) to a Integer array property. I'll try the
interceptor you point. Thanks,
Ignacio 



Rubbinio wrote:
> 
> I do not believe this is a bug. Setting the value to false when unchecked
> is most useful for a lot of cases. I hated when in S1 you had to reset all
> your checkboxes in code in order to get unchecked values that were
> previously checked when the page loaded.
> 
> Furthermore, there are struts 2 books out there that explain how this
> could work. Did you try this:
> 
> <interceptor-ref name="completeDefault">
>       -1
> </interceptor-ref>
> 
> 
> 
> -----Original Message-----
> From: Ignacio de Córdoba [mailto:icordoba@skios.es]
> Sent: May 5, 2009 11:48 AM
> To: user@struts.apache.org
> Subject: Re: Integer s:checkbox sends "false" value to action setter
> 
> 
> Hi,
> I've seen this has not been solved or replied here. Could anybody give me
> any directions on how to post a JIRA issue for this?
> I've seen https://issues.apache.org/struts/secure/BrowseProject.jspa but
> can't get to the area for posting new issues/bugs.
> 
> Thanks,
> Ignacio
> --
> View this message in context:
> http://www.nabble.com/Integer-s%3Acheckbox-sends-%22false%22-value-to-action-setter-tp22210478p23390245.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Integer-s%3Acheckbox-sends-%22false%22-value-to-action-setter-tp22210478p23390777.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Integer s:checkbox sends "false" value to action setter

Posted by Radu Solomon <rs...@n-able.com>.
I do not believe this is a bug. Setting the value to false when unchecked is most useful for a lot of cases. I hated when in S1 you had to reset all your checkboxes in code in order to get unchecked values that were previously checked when the page loaded.

Furthermore, there are struts 2 books out there that explain how this could work. Did you try this:

<interceptor-ref name="completeDefault">
      <param name="checkbox.uncheckedValue">-1</param>
</interceptor-ref>



-----Original Message-----
From: Ignacio de Córdoba [mailto:icordoba@skios.es]
Sent: May 5, 2009 11:48 AM
To: user@struts.apache.org
Subject: Re: Integer s:checkbox sends "false" value to action setter


Hi,
I've seen this has not been solved or replied here. Could anybody give me
any directions on how to post a JIRA issue for this?
I've seen https://issues.apache.org/struts/secure/BrowseProject.jspa but
can't get to the area for posting new issues/bugs.

Thanks,
Ignacio
--
View this message in context: http://www.nabble.com/Integer-s%3Acheckbox-sends-%22false%22-value-to-action-setter-tp22210478p23390245.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


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