No problem -- I have learnt plenty from others too.
Cheers
Chris M.
-Original Message-
From: ryangr
To: user@struts.apache.org
Sent: Fri, 20 Mar 2009 5:12 am
Subject: Re: Type conversion exceptions
Well I'll be damned...it's working! It looks like the solution was to
??
> ???
> name='settings[].title'
> ????value='' type="hidden" />
>
> '>
> :
> ???
> ???
> name='settings[].value'
> value='' />
> ??
> ?
> ?
> ?
> ?
> ?
s.newSetting = newSetting;
?};
}
JSP:
?
??
???
'>
:
???
???
??
?
?
?
?
?
Cheers
Chris M
-Original Message-
From: ryangr
To: user@struts.apache.org
Sent: Wed, 18 Mar 2009 10:55 pm
Subject: Re: Type conversion exceptions
Here is the converter code: http://pastie.org/41970
te:
>
> I have downloaded your code and will study it so that I don't
> misunderstand. Can you also post the converter?
> If I see it I might?suggestions that fit what you are doing better.
> Chris
>
--
View this message in context:
http://www.nabble.com/Type-conversi
10 pm
Subject: Re: Type conversion exceptions
2009/3/18 :
> But then how do you plan to write a converter to convert a String[] to a
SettingList?
It's already done, just to the configuration has to be adjusted
> Also why is aggregation a bad design?
It isn't but exposing di
2009/3/18 :
> But then how do you plan to write a converter to convert a String[] to a
> SettingList?
It's already done, just to the configuration has to be adjusted
> Also why is aggregation a bad design?
It isn't but exposing directly internal field (ArrayList) it is.
Regards
--
Lukasz
ht
But then how do you plan to write a converter to convert a String[] to a
SettingList? Also why is aggregation a bad design?
Regards
Chris M
-Original Message-
From: Lukasz Lenart
To: Struts Users Mailing List
Sent: Wed, 18 Mar 2009 5:50 pm
Subject: Re: Type conversion exceptions
2009/3/18 :
> My bad -- I didn't realize SettingList extends ArrayList. Suggestion: make it
> aggregation so that SettingList has a property of type ArrayList and
> your type conversion problems will go away.
In such case SettingList is useless, it will be bad design
Regards
--
Lukasz
http:/
2009 6:59 am
Subject: Re: Type conversion exceptions
Okay, I'm officially very confused as to what should and shouldn't be used
since apparently the documentation example is not correct.
Let me level set with what each of my files contains again:
[xwork-conversion.properties]
E
2009/3/17 ryangr :
> [xwork-conversion.properties]
> Element_settings=com.rjssoft.webdocs.setting.Setting
That's ok but your SettingList is not full List implementation and you
have to specified how to convert array to SettingList that's why you
have to specified also converter for SettingList abo
rs
Chris M?
>
>> com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter
>
-Original Message-
From: ryangr
To: user@struts.apache.org
Sent: Wed, 18 Mar 2009 6:59 am
Subject: Re: Type conversion exceptions
Okay, I'm officially very confused as to what s
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
2009/3/17 ryangr :
> com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.setting.Setting
What this is for?
> com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter
This tells Xwork which converter to call if it will need to convert
Array to SettingList
g
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View t
2009/3/17 ryangr :
> Element_settings=com.rjssoft.webdocs.setting.Setting
But you should put there
com.rjssoft.webdocs.setting.SettingList = com.rjssoft.webdocs.setting.Setting
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View this message in con
2009/3/16 ryangr :
> com.opensymphony.xwork2.util.XWorkConverter - processing conversion file
> [com/rjssoft/webdocs/admin/SettingAction-conversion.properties] [class=class
> com.rjssoft.webdocs.admin.SettingAction]
As I see you have only SettingAction-conversion.properties, could you
try to use
verter - toClass: class
com.rjssoft.webdocs.setting.SettingList
--
View this message in context:
http://www.nabble.com/Type-conversion-exceptions-tp22497261p22548129.html
Sent from the Struts - User mailing list archive at Nabb
ubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Type-conversion-exceptions-tp22497261p22547311.html
Sent from the Struts - User mailing list archive at Nabble.com.
---
2009/3/16 ryangr :
>
> Yes, I have it listed in the xwork-conversion.properties file as such:
>
> com.rjssoft.webdocs.setting.SettingList=com.rjssoft.webdocs.converter.SettingListConverter
And the file is in the root of your classpath (WEB-INF/classes)?
Regards
--
Lukasz
http://www.lenart.org.p
; --
> Lukasz
> http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Type-conversion-exceptions-tp224
2009/3/16 ryangr :
> It appears both values objects (value and o, respectively) are completely
> empty...
It's strange but anyway you should be able to use Struts2 / XWork2
convertion mechanism, did you setup xwork-conversion.properties file
as mentioned in documentation [1]?
[1]
http://struts.a
SettingList, did you try to
>> prepare converter for it?
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@stru
2009/3/16 ryangr :
> That makes sense...I've added a converter for it similar to others that
> already exist in the app, but it doesn't appear to be calling
> convertFromString which the others use. Instead, it seems to be calling
> convertValue(Map, Object, Member, String, Object, Class) which I d
: user-h...@struts.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Type-conversion-exceptions-tp22497261p22540930.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsub
2009/3/16 ryangr :
> settings is a SettingList which is just an extended ArrayList.
That can be a problem, generics are erased during compilation and Ognl
doesn't know how to convert array to SettingList, did you try to
prepare converter for it?
Regards
--
Lukasz
http://www.lenart.org.pl/
-
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Type-conversion-exceptions-tp22497261p22540046.html
Sent from
2009/3/16 ryangr :
> ERROR com.opensymphony.xwork2.util.InstantiatingNullHandler - Could not
> create and/or set value back on to object
> ognl.OgnlException: settings [java.lang.IllegalArgumentException: argument
> type mismatch]
> ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor
>> "
>> name="settings().value" value="> value="value" />" />
>>
>>
>>
>>
>> The values that come through are:
>> Setting params settings(D176A8AA-1636
FF-9C71-16A21DFCEDA7).value => [ 192.168.1.1 ]
> settings(D176A8AA-1636-4AFF-9C71-16A21DFCEDA7).title => [ SMTP Server
> Address ]
>
> My SettingAction-conversion.properties has(Setting is just a custom bean
> object with all id, title, and value along with all getters/
176A8AA-1636-4AFF-9C71-16A21DFCEDA7).title => [ SMTP Server
Address ]
My SettingAction-conversion.properties has(Setting is just a custom bean
object with all id, title, and value along with all getters/setters):
KeyProperty_settings=id
Element_settings=Setting
I followed the example
31 matches
Mail list logo