Re: [s2] Question about Advanced Type Conversion/Collection and Map Support

2008-03-12 Thread Nandana Mihindukulasooriya
Hi Jeromy,

Thanks a lot for your guidance. I was able to get it working with your
information. And the that demo site you send was very helpful too.

thanks,
/nandana

On Tue, Mar 11, 2008 at 7:01 PM, Jeromy Evans
<[EMAIL PROTECTED]> wrote:
> Nandana Mihindukulasooriya wrote:
>  > Hi,
>  >I want to use type conversion  feature to convert set of values to
>  > a list in my action as mentioned in the type conversion documentation
>  > (Advanced Type Conversion/Collection and Map Support) [1]. I followed
>  > the steps but still no luck. I have few questions. (please excuse if
>  > these questions are too naive , I am new to Structs 2).
>  >
>  > i)   Where should I put MyBeanAction-conversion.properties file ?
>  >
>
>  In the same directory as MyBeanAction.java
>
>
>  > ii)  Using the debug mode, can I check whether the
>  > ObjectTypeDeterminer picked it ?
>  >
>
>  Yes, download the source code for Struts and XWork and you can trace
>  through it.  I don't recall it displaying any useful debug messages in
>  the log.
>
>  I find this type "advanced" conversion very frustrating every time I
>  attempt to use it.  Just try to keep it simple.
>  I always either use:
>   a Map, and reference each entry by its key (which is a string).  eg
>  field['a'].value; or
>   a List, and reference each try by its index eg. field[0].value; and
>   make each entry a simple bean that doesn't require non-standard conversion
>
>  Finally ensure you have getters for the collections so OGNL can get it
>  before writing to it, and ensure it's a non-abstract type or instantiate
>  it yourself before the entries are set on it.
>
>  Also turn on devMode for your application.
>
>  Hope that helps.
>
>  Examples: http://www.planetstruts.org/struts2-showcase/conversion/index.jsp
>
>  >
>  >
>  >
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[s2] Question about Advanced Type Conversion/Collection and Map Support

2008-03-11 Thread Nandana Mihindukulasooriya
Hi,
   I want to use type conversion  feature to convert set of values to
a list in my action as mentioned in the type conversion documentation
(Advanced Type Conversion/Collection and Map Support) [1]. I followed
the steps but still no luck. I have few questions. (please excuse if
these questions are too naive , I am new to Structs 2).

i)   Where should I put MyBeanAction-conversion.properties file ?
ii)  Using the debug mode, can I check whether the
ObjectTypeDeterminer picked it ?
iii) Can I find sample application which which uses this feature
somewhere online ?

thanks,
nandana

[1] - http://struts.apache.org/2.x/docs/type-conversion.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]