>> 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
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
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.
> 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
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
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
6 matches
Mail list logo