of selectedNutrients[] must be mapped using
>>>> EnumTypeConverter
>>>>
>>>>
>>>> cilquirm wrote:
>>>>>
>>>>> Are enums type-converted automatically now?
>>>>>
>>>>> I recall early on I h
2-core/apidocs/com/opensymphony/xwork2/util/EnumTypeConverter.html
>>>>
>>>> Have you tried specifying that?
>>>>
>>>> with
>>>>
>>>> Element_selectedNutrients =
>>>> com.opensymphony.xwork2.util.EnumTypeConverter
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12885920
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- Guillaume Bilodeau <[EMAIL PROTECTED]> wrote:
> So you're saying that the showcase EnumTypeConverter
> isn't the same as the one provided in XWork2?
The showcase converter specifically handles
conversions to/from Lists; the XWork converter
converts to/from Strings. It is poorly named, perhaps,
t;>
>>> Have you tried specifying that?
>>>
>>> with
>>>
>>> Element_selectedNutrients =
>>> com.opensymphony.xwork2.util.EnumTypeConverter
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.co
util/EnumTypeConverter.html
>>
>> Have you tried specifying that?
>>
>> with
>>
>> Element_selectedNutrients =
>> com.opensymphony.xwork2.util.EnumTypeConverter
>>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-mu
umTypeConverter
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12885091
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-ma
ot; /]
> [s:submit key="nutrition.foods.simpleFoods.create.submit" /]
> [/s:form]
>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12884986
Sent from the Struts - User mailing list
u can't).
>>
>> *sigh* Gonna be one of those Mondays.
>>
>> Does the "group" converter work properly?
>>
>> d.
>>
>>
>>
---
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12860466
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Whoops!
Guillaume Bilodeau wrote:
> 1- I'm using "food.name" as the text field key - not
> as its name - so a localized label will be shown
next
> to it.
You're right; I didn't even see that.
> 2- I thought the action itself was pushed on the
> value stack and that one could reference and bind
---
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12860163
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- Guillaume Bilodeau <[EMAIL PROTECTED]> wrote:
> Yes it was deliberate. I'm not sure I see the
> advantages of flattening my action *and* my request
> object, for now I'd rather keep this nested as it
> currently is. Of course I'll change my mind if
> given the right counter-arguments :)
The
al commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12859800
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- Guillaume Bilodeau <[EMAIL PROTECTED]> wrote:
> The action has a SimpleFoodCreationRequest
getModel()
> method which should expose the request object to
> the JSP.
The Action code you posted does not implement
ModelDriven; was that a deliberate omission?
> Action:
> public class CreateSimpleF
turn Collections.unmodifiableSet(nutrients);
>> }
>> }
>>
>>
>> CreateSimpleFoodAction-conversion.properties:
>>
>>
>> model.group=com.opensymphony.xwork2.util.EnumTypeConverter
>> model.selectedNutrients=com.opensymphony.xwork2.util.EnumTypeConverter
>> Element_model.selectedNutrients=com.gb1.healthcheck.domain.nutrition.Nutrient
>>
>>
>> When I submit this form, the selected checkbox list items are not mapped
>> to
>> my SimpleFoodCreationRequest object. The console shows the standard
>> message
>> "error setting 'model.selectedNutrients' with..."
>>
>> Any ideas?
>>
>> Thanks!
>> GB
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12859530
Sent from the Struts - User mailing list archive at Nabble.com.
Guillaume,
I don't see a Food getter and setter on your action.
Guillaume Bilodeau on 23/09/07 18:48, wrote:
Hi all,
I'm quite new to Struts2 and so far I love what I see. Currently I'm having
a problem trying to map a checkboxlist based on a set of enums to a model
object nested in my action
y="food.group" name="model.group"
list="availableGroups" /]
[s:checkboxlist key="food.nutrients"
name="model.selectedNutrients"
list="availableNutrients" /]
[s:submit key="nutrition.foods.simpleFoods.create.submit" /]
tandard message
"error setting 'model.selectedNutrients' with..."
Any ideas?
Thanks!
GB
--
View this message in context:
http://www.nabble.com/Mapping-multiple-enums-to-a-nested-object-tf4505238.html#a12848740
Sent from the Struts - User mailing list archive at Nabble.com.
18 matches
Mail list logo