Re: How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-17 Thread Zahid Rahman
>> I've spent the better part of a day in the debugger, but ultimately figured it out. you're bill-able. Put it on the time sheet. :) zahid https://www.backbutton.org ¯\_(ツ)_/¯ ♡۶♡۶ ♡۶ On Fri, 13 Aug 2021, 12:15 Martin Gainty, wrote: > Assuming you can locate Struts version which

Re: How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-13 Thread Martin Gainty
Assuming you can locate Struts version which supports CollectionConverter and implementor DefaultTypeConverter codebase You will of course need to code at least one testcase to make sure MyStringToCollectionConverter works Once testcase is coded and works can you submit

Re: How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-12 Thread Burton Rhodes
Thanks Zahid - I've spent the better part of a day in the debugger, but ultimately figured it out. Essentially, I first needed to use the DefaultTypeConverter to parse the individual elements, then use the CollectionConverter to place the elements into the final Collection needed for the Action.

Re: How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-11 Thread Zahid Rahman
> I have a html form input that submits a string value that needs to be converted to a java Collection. To find the bug in logic I would hard code a string which is expected from html input form. Using an IDE . Set a break point there to go into debug mode. Step through the code one step

Re: How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-11 Thread Burton Rhodes
I also attempted to extend the DefaultTypeConverter (instead of the StrutsTypeConverter) and override one of the convertValue() methods to try to reuse existing Struts code. Although the code below gives no errors, ultimately, the target object (viewTasksFilter.taskStatuses) is not set (it

How to implement custom StrutsTypeConverter to convert String to Collection?

2021-08-11 Thread Burton Rhodes
I have a html form input that submits a string value that needs to be converted to a java Collection (a Set object in this case). Specifically the input key/value is: viewTasksFilter.taskStatuses="[OPEN,COMPLETE]". In the "viewTaskFilter" object, "taskStatuses" is defined as a Set with enum