Re: Mapping multiple enums to a nested object

2007-09-25 Thread Guillaume Bilodeau
of selectedNutrients[] must be mapped using >>>> EnumTypeConverter >>>> >>>> >>>> cilquirm wrote: >>>>> >>>>> Are enums type-converted automatically now? >>>>> >>>>> I recall early on I h

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
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]

Re: Mapping multiple enums to a nested object

2007-09-25 Thread Dave Newton
--- 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,

Re: Mapping multiple enums to a nested object

2007-09-25 Thread Guillaume Bilodeau
t;> >>> Have you tried specifying that? >>> >>> with >>> >>> Element_selectedNutrients = >>> com.opensymphony.xwork2.util.EnumTypeConverter >>> >> >> > > -- View this message in context: http://www.nabble.co

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
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

Re: Mapping multiple enums to a nested object

2007-09-25 Thread Guillaume Bilodeau
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

Re: Mapping multiple enums to a nested object

2007-09-25 Thread cilquirm
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

Re: Mapping multiple enums to a nested object

2007-09-25 Thread Guillaume Bilodeau
u can't). >> >> *sigh* Gonna be one of those Mondays. >> >> Does the "group" converter work properly? >> >> d. >> >> >>

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Guillaume Bilodeau
--- > 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]

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Dave Newton
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

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Guillaume Bilodeau
--- > 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]

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Dave Newton
--- 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

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Guillaume Bilodeau
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]

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Dave Newton
--- 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

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Guillaume Bilodeau
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.

Re: Mapping multiple enums to a nested object

2007-09-24 Thread Adam Hardy
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

Re: Mapping multiple enums to a nested object

2007-09-23 Thread Guillaume Bilodeau
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" /]

Mapping multiple enums to a nested object

2007-09-23 Thread Guillaume Bilodeau
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.