You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Fabian Richter <fr...@mtg.de> on 2014/04/03 11:19:24 UTC

Not calling setters when callchaining into fields and using complex type, bug or feature?

Hey,

not sure this is a Bug or a Feature, but I ran into the following 
troubles, someone might be able to explain:

class ComplexType {
	private DifferentComplexType test;

	public void setTest(DifferentComplexType test){
		this.test = test;
	}
	public DifferentComplexType getTest(){
		return this.test;
	}
}

In an action class I have

	private ComplexType field;

	public ComplexType getField(){
		return this.field;
	}

	public void setField(ComplexType field){
		this.field = field;
	}

Now in this Action, I am setting "test" with a <s:select list="..." 
key="field.test" headerKey="" headerValue="Undefined" />

But when I want to null it, by selecting the header entry "Undefined", 
Struts is not calling getField().setTest() its not changing "test" in 
"field" at all.

When I add to my action

	public DifferentComplexType getTest(){
		return this.field.getTest();
	}

	public void setTest(DifferentComplexType test){
		this.field.setTest(test);
	}

and change the <s:select> to use key="test" it works like a charm.

Is that how its supposed to be? If so, why?

Thank you for explaining!

Best
Fabian


Re: struts 2.3.17

Posted by Lukasz Lenart <lu...@apache.org>.
After long weekend probably, there are few issues I want to solve
before and maybe add a better security mechanism [1] - it will solve
problems with accessing Object's properties and maybe I will block
some other potential flaws ( eg. exclude Runtime class)

[1] https://github.com/apache/struts/pull/11


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2014-04-28 11:23 GMT+02:00 Markus Fischer <Ma...@knipp.de>:
> Hi Łukasz and all.
>
> Am 26.04.2014 06:24, schrieb Lukasz Lenart:
>> Let me finish 2.3.16.2 ;-)
>
> First of all, many thanks to the whole team for getting out Struts
> 2.3.16.2 with the S2-021 fix that quick.
>
> I am now in a situation - probably like many other users on this list -
> that I have a number of systems running Struts 2.3.16.1 with the
> mitigation patch [1] applied. I am aware that these patches are not as
> secure as what is contained in the 2.3.16.2 release. However, with the
> Struts 2.3.17 release right ahead, I would rather avoid the efforts of
> updating all those systems twice within just a few days. On the other
> hand, if it should be more than only a few days until 2.3.17 is
> available, I would deploy the 2.3.16.2 update right away...
>
> So, do you have an updated ETA for Struts 2.3.17 for us?
>
> Many thanks and best regards,
> Markus
>
>
> [1] http://struts.apache.org/announce.html#a20140424
>
> --
> ____________________________________________________________________
>      |       |
>      | knipp |            Knipp  Medien und Kommunikation GmbH
>       -------                    Technologiepark
>                                  Martin-Schmeisser-Weg 9
>                                  44227 Dortmund
>                                  Germany
>
>      Dipl.-Inform.               Fon:    +49 231 9703-0
>                                  Fax:    +49 231 9703-200
>      Markus Fischer              SIP:    Markus.Fischer@knipp.de
>      Software Development        E-Mail: Markus.Fischer@knipp.de
>
>                                  Register Court:
>                                  District Court Dortmund, HRB 13728
>
>                                  Chief Executive Officers:
>                                  Dietmar Knipp, Elmar Knipp
>
> ---------------------------------------------------------------------
> 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


Re: struts 2.3.17

Posted by Markus Fischer <Ma...@knipp.de>.
Hi Łukasz and all.

Am 26.04.2014 06:24, schrieb Lukasz Lenart:
> Let me finish 2.3.16.2 ;-)

First of all, many thanks to the whole team for getting out Struts
2.3.16.2 with the S2-021 fix that quick.

I am now in a situation - probably like many other users on this list -
that I have a number of systems running Struts 2.3.16.1 with the
mitigation patch [1] applied. I am aware that these patches are not as
secure as what is contained in the 2.3.16.2 release. However, with the
Struts 2.3.17 release right ahead, I would rather avoid the efforts of
updating all those systems twice within just a few days. On the other
hand, if it should be more than only a few days until 2.3.17 is
available, I would deploy the 2.3.16.2 update right away...

So, do you have an updated ETA for Struts 2.3.17 for us?

Many thanks and best regards,
Markus


[1] http://struts.apache.org/announce.html#a20140424

-- 
____________________________________________________________________
     |       |
     | knipp |            Knipp  Medien und Kommunikation GmbH
      -------                    Technologiepark
                                 Martin-Schmeisser-Weg 9
                                 44227 Dortmund
                                 Germany

     Dipl.-Inform.               Fon:    +49 231 9703-0
                                 Fax:    +49 231 9703-200
     Markus Fischer              SIP:    Markus.Fischer@knipp.de
     Software Development        E-Mail: Markus.Fischer@knipp.de

                                 Register Court:
                                 District Court Dortmund, HRB 13728

                                 Chief Executive Officers:
                                 Dietmar Knipp, Elmar Knipp

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


Re: struts 2.3.17

Posted by Lukasz Lenart <lu...@apache.org>.
Let me finish 2.3.16.2 ;-)

2014-04-26 6:08 GMT+02:00 Amol Ghotankar <gh...@gmail.com>:
> Any update here?
>
>
>
> On Sat, Apr 5, 2014 at 1:54 AM, Lukasz Lenart <lu...@apache.org>wrote:
>
>> Next week, I haven't had time to work on it this week
>>
>> 2014-04-04 20:16 GMT+02:00 Manuel López Blasi <lo...@conicet.gov.ar>:
>> > By any chance does anybody has an estimate of when struts version 2.3.17
>> > will be available?
>> > Thanks in advance!!
>> >
>> > El 04/04/2014 4:08, Lukasz Lenart escribió:
>> >>
>> >> Aha... ok :-)
>> >>
>> >> 2014-04-04 9:06 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> >>>
>> >>> I was using my own converter extending DefaultTypeConverter, but was
>> >>> under
>> >>> the impression that exceptions thrown inside the converter will be
>> caught
>> >>> by
>> >>> the default exception handler.
>> >>>
>> >>> Am 04.04.2014 08:58, schrieb Lukasz Lenart:
>> >>>>
>> >>>> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
>> >>>>
>> >>>> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> >>>>>
>> >>>>> Yeah, I was having Converters for both types, AND
>> DifferentComplexType
>> >>>>> is
>> >>>>> an
>> >>>>> enum.
>> >>>>>
>> >>>>> The problem was, in the converters convertFromString method the
>> >>>>> enum.valueOf() should have thrown an IllegalArgumentException when
>> >>>>> calling
>> >>>>> it with an emtpy String "" but instead, just the conversion silently
>> >>>>> failed
>> >>>>> and the value didnt get set.
>> >>>>>
>> >>>>> Not sure this is "as designed" thats up to you guys, but I solved it
>> by
>> >>>>> handling "" explicitly.
>> >>>>>
>> >>>>> Thanks for your support!
>> >>>>>
>> >>>>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>> >>>>>>
>> >>>>>>
>> >>>>>> Do you have converters for ComplexType and DifferentComplexType
>> >>>>>> registered?
>> >>>>>>
>> >>>>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> Hey,
>> >>>>>>>
>> >>>>>>> not sure this is a Bug or a Feature, but I ran into the following
>> >>>>>>> troubles,
>> >>>>>>> someone might be able to explain:
>> >>>>>>>
>> >>>>>>> class ComplexType {
>> >>>>>>>            private DifferentComplexType test;
>> >>>>>>>
>> >>>>>>>            public void setTest(DifferentComplexType test){
>> >>>>>>>                    this.test = test;
>> >>>>>>>            }
>> >>>>>>>            public DifferentComplexType getTest(){
>> >>>>>>>                    return this.test;
>> >>>>>>>            }
>> >>>>>>> }
>> >>>>>>>
>> >>>>>>> In an action class I have
>> >>>>>>>
>> >>>>>>>            private ComplexType field;
>> >>>>>>>
>> >>>>>>>            public ComplexType getField(){
>> >>>>>>>                    return this.field;
>> >>>>>>>            }
>> >>>>>>>
>> >>>>>>>            public void setField(ComplexType field){
>> >>>>>>>                    this.field = field;
>> >>>>>>>            }
>> >>>>>>>
>> >>>>>>> Now in this Action, I am setting "test" with a <s:select list="..."
>> >>>>>>> key="field.test" headerKey="" headerValue="Undefined" />
>> >>>>>>>
>> >>>>>>> But when I want to null it, by selecting the header entry
>> >>>>>>> "Undefined",
>> >>>>>>> Struts is not calling getField().setTest() its not changing "test"
>> in
>> >>>>>>> "field" at all.
>> >>>>>>>
>> >>>>>>> When I add to my action
>> >>>>>>>
>> >>>>>>>            public DifferentComplexType getTest(){
>> >>>>>>>                    return this.field.getTest();
>> >>>>>>>            }
>> >>>>>>>
>> >>>>>>>            public void setTest(DifferentComplexType test){
>> >>>>>>>                    this.field.setTest(test);
>> >>>>>>>            }
>> >>>>>>>
>> >>>>>>> and change the <s:select> to use key="test" it works like a charm.
>> >>>>>>>
>> >>>>>>> Is that how its supposed to be? If so, why?
>> >>>>>>>
>> >>>>>>> Thank you for explaining!
>> >>>>>>>
>> >>>>>>> Best
>> >>>>>>> Fabian
>> >>>>>>>
>> >>>>>>
>> ---------------------------------------------------------------------
>> >>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >>>>>> For additional commands, e-mail: user-help@struts.apache.org
>> >>>>>>
>> >>>>> --
>> >>>>> media transfer AG
>> >>>>>
>> >>>>> Fabian Richter, M.Sc.
>> >>>>> Softwareentwickler
>> >>>>>
>> >>>>> Mail:    frichter@mtg.de
>> >>>>> Telefon: +49 6151 8193-24
>> >>>>> Telefax: +49 6151 8193-43
>> >>>>> Web:     http://www.mtg.de
>> >>>>>
>> >>>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>> >>>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>> >>>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>> >>>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>> >>>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >>>> For additional commands, e-mail: user-help@struts.apache.org
>> >>>>
>> >>> --
>> >>> media transfer AG
>> >>>
>> >>> Fabian Richter, M.Sc.
>> >>> Softwareentwickler
>> >>>
>> >>> Mail:    frichter@mtg.de
>> >>> Telefon: +49 6151 8193-24
>> >>> Telefax: +49 6151 8193-43
>> >>> Web:     http://www.mtg.de
>> >>>
>> >>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>> >>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>> >>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>> >>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>> >>>
>> >> ---------------------------------------------------------------------
>> >> 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
>>
>>
>
>
> --
>
>
>
> *With Best Regards,*
>
> Amol Ghotankar
> Technical Lead
> M: +91 9960 980 419 <http://www.cursivetech.com>

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


Re: struts 2.3.17

Posted by Amol Ghotankar <gh...@gmail.com>.
Any update here?



On Sat, Apr 5, 2014 at 1:54 AM, Lukasz Lenart <lu...@apache.org>wrote:

> Next week, I haven't had time to work on it this week
>
> 2014-04-04 20:16 GMT+02:00 Manuel López Blasi <lo...@conicet.gov.ar>:
> > By any chance does anybody has an estimate of when struts version 2.3.17
> > will be available?
> > Thanks in advance!!
> >
> > El 04/04/2014 4:08, Lukasz Lenart escribió:
> >>
> >> Aha... ok :-)
> >>
> >> 2014-04-04 9:06 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> >>>
> >>> I was using my own converter extending DefaultTypeConverter, but was
> >>> under
> >>> the impression that exceptions thrown inside the converter will be
> caught
> >>> by
> >>> the default exception handler.
> >>>
> >>> Am 04.04.2014 08:58, schrieb Lukasz Lenart:
> >>>>
> >>>> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
> >>>>
> >>>> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> >>>>>
> >>>>> Yeah, I was having Converters for both types, AND
> DifferentComplexType
> >>>>> is
> >>>>> an
> >>>>> enum.
> >>>>>
> >>>>> The problem was, in the converters convertFromString method the
> >>>>> enum.valueOf() should have thrown an IllegalArgumentException when
> >>>>> calling
> >>>>> it with an emtpy String "" but instead, just the conversion silently
> >>>>> failed
> >>>>> and the value didnt get set.
> >>>>>
> >>>>> Not sure this is "as designed" thats up to you guys, but I solved it
> by
> >>>>> handling "" explicitly.
> >>>>>
> >>>>> Thanks for your support!
> >>>>>
> >>>>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
> >>>>>>
> >>>>>>
> >>>>>> Do you have converters for ComplexType and DifferentComplexType
> >>>>>> registered?
> >>>>>>
> >>>>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> >>>>>>>
> >>>>>>>
> >>>>>>> Hey,
> >>>>>>>
> >>>>>>> not sure this is a Bug or a Feature, but I ran into the following
> >>>>>>> troubles,
> >>>>>>> someone might be able to explain:
> >>>>>>>
> >>>>>>> class ComplexType {
> >>>>>>>            private DifferentComplexType test;
> >>>>>>>
> >>>>>>>            public void setTest(DifferentComplexType test){
> >>>>>>>                    this.test = test;
> >>>>>>>            }
> >>>>>>>            public DifferentComplexType getTest(){
> >>>>>>>                    return this.test;
> >>>>>>>            }
> >>>>>>> }
> >>>>>>>
> >>>>>>> In an action class I have
> >>>>>>>
> >>>>>>>            private ComplexType field;
> >>>>>>>
> >>>>>>>            public ComplexType getField(){
> >>>>>>>                    return this.field;
> >>>>>>>            }
> >>>>>>>
> >>>>>>>            public void setField(ComplexType field){
> >>>>>>>                    this.field = field;
> >>>>>>>            }
> >>>>>>>
> >>>>>>> Now in this Action, I am setting "test" with a <s:select list="..."
> >>>>>>> key="field.test" headerKey="" headerValue="Undefined" />
> >>>>>>>
> >>>>>>> But when I want to null it, by selecting the header entry
> >>>>>>> "Undefined",
> >>>>>>> Struts is not calling getField().setTest() its not changing "test"
> in
> >>>>>>> "field" at all.
> >>>>>>>
> >>>>>>> When I add to my action
> >>>>>>>
> >>>>>>>            public DifferentComplexType getTest(){
> >>>>>>>                    return this.field.getTest();
> >>>>>>>            }
> >>>>>>>
> >>>>>>>            public void setTest(DifferentComplexType test){
> >>>>>>>                    this.field.setTest(test);
> >>>>>>>            }
> >>>>>>>
> >>>>>>> and change the <s:select> to use key="test" it works like a charm.
> >>>>>>>
> >>>>>>> Is that how its supposed to be? If so, why?
> >>>>>>>
> >>>>>>> Thank you for explaining!
> >>>>>>>
> >>>>>>> Best
> >>>>>>> Fabian
> >>>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>>>
> >>>>> --
> >>>>> media transfer AG
> >>>>>
> >>>>> Fabian Richter, M.Sc.
> >>>>> Softwareentwickler
> >>>>>
> >>>>> Mail:    frichter@mtg.de
> >>>>> Telefon: +49 6151 8193-24
> >>>>> Telefax: +49 6151 8193-43
> >>>>> Web:     http://www.mtg.de
> >>>>>
> >>>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
> >>>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
> >>>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
> >>>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
> >>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>
> >>> --
> >>> media transfer AG
> >>>
> >>> Fabian Richter, M.Sc.
> >>> Softwareentwickler
> >>>
> >>> Mail:    frichter@mtg.de
> >>> Telefon: +49 6151 8193-24
> >>> Telefax: +49 6151 8193-43
> >>> Web:     http://www.mtg.de
> >>>
> >>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
> >>> Registergericht: Amtsgericht Darmstadt, HRB 8901
> >>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
> >>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
> >>>
> >> ---------------------------------------------------------------------
> >> 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
>
>


-- 



*With Best Regards,*

Amol Ghotankar
Technical Lead
M: +91 9960 980 419 <http://www.cursivetech.com>

Re: struts 2.3.17

Posted by Lukasz Lenart <lu...@apache.org>.
Next week, I haven't had time to work on it this week

2014-04-04 20:16 GMT+02:00 Manuel López Blasi <lo...@conicet.gov.ar>:
> By any chance does anybody has an estimate of when struts version 2.3.17
> will be available?
> Thanks in advance!!
>
> El 04/04/2014 4:08, Lukasz Lenart escribió:
>>
>> Aha... ok :-)
>>
>> 2014-04-04 9:06 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>
>>> I was using my own converter extending DefaultTypeConverter, but was
>>> under
>>> the impression that exceptions thrown inside the converter will be caught
>>> by
>>> the default exception handler.
>>>
>>> Am 04.04.2014 08:58, schrieb Lukasz Lenart:
>>>>
>>>> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
>>>>
>>>> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>>>
>>>>> Yeah, I was having Converters for both types, AND DifferentComplexType
>>>>> is
>>>>> an
>>>>> enum.
>>>>>
>>>>> The problem was, in the converters convertFromString method the
>>>>> enum.valueOf() should have thrown an IllegalArgumentException when
>>>>> calling
>>>>> it with an emtpy String "" but instead, just the conversion silently
>>>>> failed
>>>>> and the value didnt get set.
>>>>>
>>>>> Not sure this is "as designed" thats up to you guys, but I solved it by
>>>>> handling "" explicitly.
>>>>>
>>>>> Thanks for your support!
>>>>>
>>>>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>>>>>>
>>>>>>
>>>>>> Do you have converters for ComplexType and DifferentComplexType
>>>>>> registered?
>>>>>>
>>>>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>>>>>
>>>>>>>
>>>>>>> Hey,
>>>>>>>
>>>>>>> not sure this is a Bug or a Feature, but I ran into the following
>>>>>>> troubles,
>>>>>>> someone might be able to explain:
>>>>>>>
>>>>>>> class ComplexType {
>>>>>>>            private DifferentComplexType test;
>>>>>>>
>>>>>>>            public void setTest(DifferentComplexType test){
>>>>>>>                    this.test = test;
>>>>>>>            }
>>>>>>>            public DifferentComplexType getTest(){
>>>>>>>                    return this.test;
>>>>>>>            }
>>>>>>> }
>>>>>>>
>>>>>>> In an action class I have
>>>>>>>
>>>>>>>            private ComplexType field;
>>>>>>>
>>>>>>>            public ComplexType getField(){
>>>>>>>                    return this.field;
>>>>>>>            }
>>>>>>>
>>>>>>>            public void setField(ComplexType field){
>>>>>>>                    this.field = field;
>>>>>>>            }
>>>>>>>
>>>>>>> Now in this Action, I am setting "test" with a <s:select list="..."
>>>>>>> key="field.test" headerKey="" headerValue="Undefined" />
>>>>>>>
>>>>>>> But when I want to null it, by selecting the header entry
>>>>>>> "Undefined",
>>>>>>> Struts is not calling getField().setTest() its not changing "test" in
>>>>>>> "field" at all.
>>>>>>>
>>>>>>> When I add to my action
>>>>>>>
>>>>>>>            public DifferentComplexType getTest(){
>>>>>>>                    return this.field.getTest();
>>>>>>>            }
>>>>>>>
>>>>>>>            public void setTest(DifferentComplexType test){
>>>>>>>                    this.field.setTest(test);
>>>>>>>            }
>>>>>>>
>>>>>>> and change the <s:select> to use key="test" it works like a charm.
>>>>>>>
>>>>>>> Is that how its supposed to be? If so, why?
>>>>>>>
>>>>>>> Thank you for explaining!
>>>>>>>
>>>>>>> Best
>>>>>>> Fabian
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>>
>>>>> --
>>>>> media transfer AG
>>>>>
>>>>> Fabian Richter, M.Sc.
>>>>> Softwareentwickler
>>>>>
>>>>> Mail:    frichter@mtg.de
>>>>> Telefon: +49 6151 8193-24
>>>>> Telefax: +49 6151 8193-43
>>>>> Web:     http://www.mtg.de
>>>>>
>>>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>>>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>>>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>>>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>> --
>>> media transfer AG
>>>
>>> Fabian Richter, M.Sc.
>>> Softwareentwickler
>>>
>>> Mail:    frichter@mtg.de
>>> Telefon: +49 6151 8193-24
>>> Telefax: +49 6151 8193-43
>>> Web:     http://www.mtg.de
>>>
>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>>
>> ---------------------------------------------------------------------
>> 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


struts 2.3.17

Posted by Manuel López Blasi <lo...@conicet.gov.ar>.
By any chance does anybody has an estimate of when struts version 2.3.17 
will be available?
Thanks in advance!!

El 04/04/2014 4:08, Lukasz Lenart escribió:
> Aha... ok :-)
>
> 2014-04-04 9:06 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> I was using my own converter extending DefaultTypeConverter, but was under
>> the impression that exceptions thrown inside the converter will be caught by
>> the default exception handler.
>>
>> Am 04.04.2014 08:58, schrieb Lukasz Lenart:
>>> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
>>>
>>> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>> Yeah, I was having Converters for both types, AND DifferentComplexType is
>>>> an
>>>> enum.
>>>>
>>>> The problem was, in the converters convertFromString method the
>>>> enum.valueOf() should have thrown an IllegalArgumentException when
>>>> calling
>>>> it with an emtpy String "" but instead, just the conversion silently
>>>> failed
>>>> and the value didnt get set.
>>>>
>>>> Not sure this is "as designed" thats up to you guys, but I solved it by
>>>> handling "" explicitly.
>>>>
>>>> Thanks for your support!
>>>>
>>>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>>>>>
>>>>> Do you have converters for ComplexType and DifferentComplexType
>>>>> registered?
>>>>>
>>>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>>>>
>>>>>> Hey,
>>>>>>
>>>>>> not sure this is a Bug or a Feature, but I ran into the following
>>>>>> troubles,
>>>>>> someone might be able to explain:
>>>>>>
>>>>>> class ComplexType {
>>>>>>            private DifferentComplexType test;
>>>>>>
>>>>>>            public void setTest(DifferentComplexType test){
>>>>>>                    this.test = test;
>>>>>>            }
>>>>>>            public DifferentComplexType getTest(){
>>>>>>                    return this.test;
>>>>>>            }
>>>>>> }
>>>>>>
>>>>>> In an action class I have
>>>>>>
>>>>>>            private ComplexType field;
>>>>>>
>>>>>>            public ComplexType getField(){
>>>>>>                    return this.field;
>>>>>>            }
>>>>>>
>>>>>>            public void setField(ComplexType field){
>>>>>>                    this.field = field;
>>>>>>            }
>>>>>>
>>>>>> Now in this Action, I am setting "test" with a <s:select list="..."
>>>>>> key="field.test" headerKey="" headerValue="Undefined" />
>>>>>>
>>>>>> But when I want to null it, by selecting the header entry "Undefined",
>>>>>> Struts is not calling getField().setTest() its not changing "test" in
>>>>>> "field" at all.
>>>>>>
>>>>>> When I add to my action
>>>>>>
>>>>>>            public DifferentComplexType getTest(){
>>>>>>                    return this.field.getTest();
>>>>>>            }
>>>>>>
>>>>>>            public void setTest(DifferentComplexType test){
>>>>>>                    this.field.setTest(test);
>>>>>>            }
>>>>>>
>>>>>> and change the <s:select> to use key="test" it works like a charm.
>>>>>>
>>>>>> Is that how its supposed to be? If so, why?
>>>>>>
>>>>>> Thank you for explaining!
>>>>>>
>>>>>> Best
>>>>>> Fabian
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>> --
>>>> media transfer AG
>>>>
>>>> Fabian Richter, M.Sc.
>>>> Softwareentwickler
>>>>
>>>> Mail:    frichter@mtg.de
>>>> Telefon: +49 6151 8193-24
>>>> Telefax: +49 6151 8193-43
>>>> Web:     http://www.mtg.de
>>>>
>>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>> --
>> media transfer AG
>>
>> Fabian Richter, M.Sc.
>> Softwareentwickler
>>
>> Mail:    frichter@mtg.de
>> Telefon: +49 6151 8193-24
>> Telefax: +49 6151 8193-43
>> Web:     http://www.mtg.de
>>
>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>
> ---------------------------------------------------------------------
> 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


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Lukasz Lenart <lu...@apache.org>.
Aha... ok :-)

2014-04-04 9:06 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> I was using my own converter extending DefaultTypeConverter, but was under
> the impression that exceptions thrown inside the converter will be caught by
> the default exception handler.
>
> Am 04.04.2014 08:58, schrieb Lukasz Lenart:
>>
>> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
>>
>> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>
>>> Yeah, I was having Converters for both types, AND DifferentComplexType is
>>> an
>>> enum.
>>>
>>> The problem was, in the converters convertFromString method the
>>> enum.valueOf() should have thrown an IllegalArgumentException when
>>> calling
>>> it with an emtpy String "" but instead, just the conversion silently
>>> failed
>>> and the value didnt get set.
>>>
>>> Not sure this is "as designed" thats up to you guys, but I solved it by
>>> handling "" explicitly.
>>>
>>> Thanks for your support!
>>>
>>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>>>>
>>>>
>>>> Do you have converters for ComplexType and DifferentComplexType
>>>> registered?
>>>>
>>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>>>
>>>>>
>>>>> Hey,
>>>>>
>>>>> not sure this is a Bug or a Feature, but I ran into the following
>>>>> troubles,
>>>>> someone might be able to explain:
>>>>>
>>>>> class ComplexType {
>>>>>           private DifferentComplexType test;
>>>>>
>>>>>           public void setTest(DifferentComplexType test){
>>>>>                   this.test = test;
>>>>>           }
>>>>>           public DifferentComplexType getTest(){
>>>>>                   return this.test;
>>>>>           }
>>>>> }
>>>>>
>>>>> In an action class I have
>>>>>
>>>>>           private ComplexType field;
>>>>>
>>>>>           public ComplexType getField(){
>>>>>                   return this.field;
>>>>>           }
>>>>>
>>>>>           public void setField(ComplexType field){
>>>>>                   this.field = field;
>>>>>           }
>>>>>
>>>>> Now in this Action, I am setting "test" with a <s:select list="..."
>>>>> key="field.test" headerKey="" headerValue="Undefined" />
>>>>>
>>>>> But when I want to null it, by selecting the header entry "Undefined",
>>>>> Struts is not calling getField().setTest() its not changing "test" in
>>>>> "field" at all.
>>>>>
>>>>> When I add to my action
>>>>>
>>>>>           public DifferentComplexType getTest(){
>>>>>                   return this.field.getTest();
>>>>>           }
>>>>>
>>>>>           public void setTest(DifferentComplexType test){
>>>>>                   this.field.setTest(test);
>>>>>           }
>>>>>
>>>>> and change the <s:select> to use key="test" it works like a charm.
>>>>>
>>>>> Is that how its supposed to be? If so, why?
>>>>>
>>>>> Thank you for explaining!
>>>>>
>>>>> Best
>>>>> Fabian
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>
>>> --
>>> media transfer AG
>>>
>>> Fabian Richter, M.Sc.
>>> Softwareentwickler
>>>
>>> Mail:    frichter@mtg.de
>>> Telefon: +49 6151 8193-24
>>> Telefax: +49 6151 8193-43
>>> Web:     http://www.mtg.de
>>>
>>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> --
> media transfer AG
>
> Fabian Richter, M.Sc.
> Softwareentwickler
>
> Mail:    frichter@mtg.de
> Telefon: +49 6151 8193-24
> Telefax: +49 6151 8193-43
> Web:     http://www.mtg.de
>
> Firmensitz: Dolivostraße 11, 64293 Darmstadt
> Registergericht: Amtsgericht Darmstadt, HRB 8901
> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>

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


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Fabian Richter <fr...@mtg.de>.
I was using my own converter extending DefaultTypeConverter, but was 
under the impression that exceptions thrown inside the converter will be 
caught by the default exception handler.

Am 04.04.2014 08:58, schrieb Lukasz Lenart:
> You mean in EnumTypeConverter? Or in DefaultTypeConverter?
>
> 2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> Yeah, I was having Converters for both types, AND DifferentComplexType is an
>> enum.
>>
>> The problem was, in the converters convertFromString method the
>> enum.valueOf() should have thrown an IllegalArgumentException when calling
>> it with an emtpy String "" but instead, just the conversion silently failed
>> and the value didnt get set.
>>
>> Not sure this is "as designed" thats up to you guys, but I solved it by
>> handling "" explicitly.
>>
>> Thanks for your support!
>>
>> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>>>
>>> Do you have converters for ComplexType and DifferentComplexType
>>> registered?
>>>
>>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>>
>>>> Hey,
>>>>
>>>> not sure this is a Bug or a Feature, but I ran into the following
>>>> troubles,
>>>> someone might be able to explain:
>>>>
>>>> class ComplexType {
>>>>           private DifferentComplexType test;
>>>>
>>>>           public void setTest(DifferentComplexType test){
>>>>                   this.test = test;
>>>>           }
>>>>           public DifferentComplexType getTest(){
>>>>                   return this.test;
>>>>           }
>>>> }
>>>>
>>>> In an action class I have
>>>>
>>>>           private ComplexType field;
>>>>
>>>>           public ComplexType getField(){
>>>>                   return this.field;
>>>>           }
>>>>
>>>>           public void setField(ComplexType field){
>>>>                   this.field = field;
>>>>           }
>>>>
>>>> Now in this Action, I am setting "test" with a <s:select list="..."
>>>> key="field.test" headerKey="" headerValue="Undefined" />
>>>>
>>>> But when I want to null it, by selecting the header entry "Undefined",
>>>> Struts is not calling getField().setTest() its not changing "test" in
>>>> "field" at all.
>>>>
>>>> When I add to my action
>>>>
>>>>           public DifferentComplexType getTest(){
>>>>                   return this.field.getTest();
>>>>           }
>>>>
>>>>           public void setTest(DifferentComplexType test){
>>>>                   this.field.setTest(test);
>>>>           }
>>>>
>>>> and change the <s:select> to use key="test" it works like a charm.
>>>>
>>>> Is that how its supposed to be? If so, why?
>>>>
>>>> Thank you for explaining!
>>>>
>>>> Best
>>>> Fabian
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>
>> --
>> media transfer AG
>>
>> Fabian Richter, M.Sc.
>> Softwareentwickler
>>
>> Mail:    frichter@mtg.de
>> Telefon: +49 6151 8193-24
>> Telefax: +49 6151 8193-43
>> Web:     http://www.mtg.de
>>
>> Firmensitz: Dolivostraße 11, 64293 Darmstadt
>> Registergericht: Amtsgericht Darmstadt, HRB 8901
>> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
>> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

-- 
media transfer AG

Fabian Richter, M.Sc.
Softwareentwickler

Mail:    frichter@mtg.de
Telefon: +49 6151 8193-24
Telefax: +49 6151 8193-43
Web:     http://www.mtg.de

Firmensitz: Dolivostraße 11, 64293 Darmstadt
Registergericht: Amtsgericht Darmstadt, HRB 8901
Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
Aufsichtsratsvorsitzender: Dr. Thomas Milde


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Lukasz Lenart <lu...@apache.org>.
You mean in EnumTypeConverter? Or in DefaultTypeConverter?

2014-04-04 8:47 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> Yeah, I was having Converters for both types, AND DifferentComplexType is an
> enum.
>
> The problem was, in the converters convertFromString method the
> enum.valueOf() should have thrown an IllegalArgumentException when calling
> it with an emtpy String "" but instead, just the conversion silently failed
> and the value didnt get set.
>
> Not sure this is "as designed" thats up to you guys, but I solved it by
> handling "" explicitly.
>
> Thanks for your support!
>
> Am 04.04.2014 07:16, schrieb Lukasz Lenart:
>>
>> Do you have converters for ComplexType and DifferentComplexType
>> registered?
>>
>> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>>>
>>> Hey,
>>>
>>> not sure this is a Bug or a Feature, but I ran into the following
>>> troubles,
>>> someone might be able to explain:
>>>
>>> class ComplexType {
>>>          private DifferentComplexType test;
>>>
>>>          public void setTest(DifferentComplexType test){
>>>                  this.test = test;
>>>          }
>>>          public DifferentComplexType getTest(){
>>>                  return this.test;
>>>          }
>>> }
>>>
>>> In an action class I have
>>>
>>>          private ComplexType field;
>>>
>>>          public ComplexType getField(){
>>>                  return this.field;
>>>          }
>>>
>>>          public void setField(ComplexType field){
>>>                  this.field = field;
>>>          }
>>>
>>> Now in this Action, I am setting "test" with a <s:select list="..."
>>> key="field.test" headerKey="" headerValue="Undefined" />
>>>
>>> But when I want to null it, by selecting the header entry "Undefined",
>>> Struts is not calling getField().setTest() its not changing "test" in
>>> "field" at all.
>>>
>>> When I add to my action
>>>
>>>          public DifferentComplexType getTest(){
>>>                  return this.field.getTest();
>>>          }
>>>
>>>          public void setTest(DifferentComplexType test){
>>>                  this.field.setTest(test);
>>>          }
>>>
>>> and change the <s:select> to use key="test" it works like a charm.
>>>
>>> Is that how its supposed to be? If so, why?
>>>
>>> Thank you for explaining!
>>>
>>> Best
>>> Fabian
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> --
> media transfer AG
>
> Fabian Richter, M.Sc.
> Softwareentwickler
>
> Mail:    frichter@mtg.de
> Telefon: +49 6151 8193-24
> Telefax: +49 6151 8193-43
> Web:     http://www.mtg.de
>
> Firmensitz: Dolivostraße 11, 64293 Darmstadt
> Registergericht: Amtsgericht Darmstadt, HRB 8901
> Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
> Aufsichtsratsvorsitzender: Dr. Thomas Milde
>

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


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Fabian Richter <fr...@mtg.de>.
Yeah, I was having Converters for both types, AND DifferentComplexType 
is an enum.

The problem was, in the converters convertFromString method the 
enum.valueOf() should have thrown an IllegalArgumentException when 
calling it with an emtpy String "" but instead, just the conversion 
silently failed and the value didnt get set.

Not sure this is "as designed" thats up to you guys, but I solved it by 
handling "" explicitly.

Thanks for your support!

Am 04.04.2014 07:16, schrieb Lukasz Lenart:
> Do you have converters for ComplexType and DifferentComplexType registered?
>
> 2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
>> Hey,
>>
>> not sure this is a Bug or a Feature, but I ran into the following troubles,
>> someone might be able to explain:
>>
>> class ComplexType {
>>          private DifferentComplexType test;
>>
>>          public void setTest(DifferentComplexType test){
>>                  this.test = test;
>>          }
>>          public DifferentComplexType getTest(){
>>                  return this.test;
>>          }
>> }
>>
>> In an action class I have
>>
>>          private ComplexType field;
>>
>>          public ComplexType getField(){
>>                  return this.field;
>>          }
>>
>>          public void setField(ComplexType field){
>>                  this.field = field;
>>          }
>>
>> Now in this Action, I am setting "test" with a <s:select list="..."
>> key="field.test" headerKey="" headerValue="Undefined" />
>>
>> But when I want to null it, by selecting the header entry "Undefined",
>> Struts is not calling getField().setTest() its not changing "test" in
>> "field" at all.
>>
>> When I add to my action
>>
>>          public DifferentComplexType getTest(){
>>                  return this.field.getTest();
>>          }
>>
>>          public void setTest(DifferentComplexType test){
>>                  this.field.setTest(test);
>>          }
>>
>> and change the <s:select> to use key="test" it works like a charm.
>>
>> Is that how its supposed to be? If so, why?
>>
>> Thank you for explaining!
>>
>> Best
>> Fabian
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

-- 
media transfer AG

Fabian Richter, M.Sc.
Softwareentwickler

Mail:    frichter@mtg.de
Telefon: +49 6151 8193-24
Telefax: +49 6151 8193-43
Web:     http://www.mtg.de

Firmensitz: Dolivostraße 11, 64293 Darmstadt
Registergericht: Amtsgericht Darmstadt, HRB 8901
Vorstand: Jürgen Ruf (Vors.), Tamer Kemeröz
Aufsichtsratsvorsitzender: Dr. Thomas Milde


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Lukasz Lenart <lu...@apache.org>.
Do you have converters for ComplexType and DifferentComplexType registered?

2014-04-03 11:19 GMT+02:00 Fabian Richter <fr...@mtg.de>:
> Hey,
>
> not sure this is a Bug or a Feature, but I ran into the following troubles,
> someone might be able to explain:
>
> class ComplexType {
>         private DifferentComplexType test;
>
>         public void setTest(DifferentComplexType test){
>                 this.test = test;
>         }
>         public DifferentComplexType getTest(){
>                 return this.test;
>         }
> }
>
> In an action class I have
>
>         private ComplexType field;
>
>         public ComplexType getField(){
>                 return this.field;
>         }
>
>         public void setField(ComplexType field){
>                 this.field = field;
>         }
>
> Now in this Action, I am setting "test" with a <s:select list="..."
> key="field.test" headerKey="" headerValue="Undefined" />
>
> But when I want to null it, by selecting the header entry "Undefined",
> Struts is not calling getField().setTest() its not changing "test" in
> "field" at all.
>
> When I add to my action
>
>         public DifferentComplexType getTest(){
>                 return this.field.getTest();
>         }
>
>         public void setTest(DifferentComplexType test){
>                 this.field.setTest(test);
>         }
>
> and change the <s:select> to use key="test" it works like a charm.
>
> Is that how its supposed to be? If so, why?
>
> Thank you for explaining!
>
> Best
> Fabian
>

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


Re: Not calling setters when callchaining into fields and using complex type, bug or feature?

Posted by Gaurav Daga <to...@gmail.com>.
What is the type of Different Complex Type, is it Enum? Struts usually
provides mapping for String and primitive type.

If its not Enum, you should try mapping the value of Select which is
string, to a class attribute which is of type String.

If its Enum, you may need to write a custom handler for mapping Enum type,
from String.


*Thanks & Regards/ **सादर**,*
*Gaurav Daga*
*togauravdaga@gmail.com <to...@gmail.com> | +1.201.308.3242 | Web
Presence <http://goo.gl/lW0nh>  *
Do not follow where the path may lead. Go instead where there is no path
and leave a trail. - Harold R. McAlindon


On Thu, Apr 3, 2014 at 2:19 AM, Fabian Richter <fr...@mtg.de> wrote:

> Hey,
>
> not sure this is a Bug or a Feature, but I ran into the following
> troubles, someone might be able to explain:
>
> class ComplexType {
>         private DifferentComplexType test;
>
>         public void setTest(DifferentComplexType test){
>                 this.test = test;
>         }
>         public DifferentComplexType getTest(){
>                 return this.test;
>         }
> }
>
> In an action class I have
>
>         private ComplexType field;
>
>         public ComplexType getField(){
>                 return this.field;
>         }
>
>         public void setField(ComplexType field){
>                 this.field = field;
>         }
>
> Now in this Action, I am setting "test" with a <s:select list="..."
> key="field.test" headerKey="" headerValue="Undefined" />
>
> But when I want to null it, by selecting the header entry "Undefined",
> Struts is not calling getField().setTest() its not changing "test" in
> "field" at all.
>
> When I add to my action
>
>         public DifferentComplexType getTest(){
>                 return this.field.getTest();
>         }
>
>         public void setTest(DifferentComplexType test){
>                 this.field.setTest(test);
>         }
>
> and change the <s:select> to use key="test" it works like a charm.
>
> Is that how its supposed to be? If so, why?
>
> Thank you for explaining!
>
> Best
> Fabian
>
>