struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: checkbox problem
Date Tue, 26 Oct 2010 02:09:44 GMT
Hidden parameters are the only way to get a value for an unchecked
checkbox, that's just how HTML works. But yes, you're wrong; the
checkbox interceptor does the work for you. Please read the
documentation and just try it.

Dave

(Cumbersome? Compared to what?)

On Monday, October 25, 2010, Peter Bliznak <pbliznak@gmail.com> wrote:
> Sorry about "of course" we have over two dozens of s1 apps and evaluating if
> s2 makes sense to switch to or go with something else.
> And for that we have over 50 items to cover to see how difficult/easy it is
> in s2.
> I am really surprise that such a trivial task has to be done using hidden
> parameters.
> Just to be sure : you really meant to assign dynamically hidden parameter
> values inside iterator? --  and then -- since you will end up with 2
> collections to go ahead and compared them and figure out what is "missing in
> one of them" and so to get values from the other?...I hope I am wrong -
> sounds very cumbersome for 2010.
>
> On Mon, Oct 25, 2010 at 9:39 PM, Dave Newton <davelnewton@gmail.com> wrote:
>
>> Same way they're generated now, with the checkbox tag, or by hand. Or use a
>> map.
>>
>> And there's no "of course": people use both versions.
>>
>> Dave
>>
>> On Monday, October 25, 2010, Peter Bliznak <pbliznak@gmail.com> wrote:
>> > Hi Dave,
>> > using S2 of course.
>> > not sure I am getting what you suggested. I have dynamic list and have no
>> > idea what size is going to be (inside my jsp which was created prior to
>> that
>> > call)-- how would you then create hidden parameters dynamically?
>> >
>> > On Mon, Oct 25, 2010 at 9:19 PM, Dave Newton <davelnewton@gmail.com>
>> wrote:
>> >
>> >> Which version of Struts?
>> >>
>> >> Struts 2 uses a hidden field to deal with default (unchecked) values.
>> >> Struts 1 ActionForms used the reset() method to pre-load default
>> >> values.
>> >>
>> >> Dave
>> >>
>> >> On Mon, Oct 25, 2010 at 9:16 PM, Peter Bliznak <pbliznak@gmail.com>
>> wrote:
>> >> > Hi,
>> >> > I have a list over which I am iterating - it has checkbox and other
>> >> fields.
>> >> > I know I can define array associated with checkbox's values but that
>> only
>> >> > returns values which were checked. In my other column I have date and
>> I
>> >> have
>> >> > to make that date associated with checkbox's state. How am I supposed
>> to
>> >> do
>> >> > that?........Say I get five values in table and decide to check 2 of
>> them
>> >> > but array is only going to return true for 2 elements ...Is there any
>> way
>> >> I
>> >> > would define collection/array for checkboxes and it would return ALL
>> >> value
>> >> > including those which were unchecked?...
>> >> > Regards
>> >> > Peter.
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>>
>>
>

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


Mime
View raw message