[
https://issues.apache.org/jira/browse/WICKET-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796190#action_12796190
]
Ricardo Mayerhofer commented on WICKET-2658:
--------------------------------------------
Perhaps I wasn't clear, I will try to explain it better.
When wicket is unable find a specific converter for a given class it calls
DefaultConverter (private class of ConverterLocator.java).
DefaultConverter handles the default converting strategy, usually handling
primitives. I would like to append as a default converting strategy to try to
instantiate the given class through constructor. I'm attaching how it looks
like.
This could be easily achieved if overide getDefaultConvert (or a similar
method) in ConverterLocator.java were possible, and optimized if to extend
DefaultConverter were possible (by extracting it to a separate class).
> Allow to overide DefaultConverter
> ---------------------------------
>
> Key: WICKET-2658
> URL: https://issues.apache.org/jira/browse/WICKET-2658
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Ricardo Mayerhofer
> Assignee: Johan Compagner
> Priority: Minor
> Attachments: ValueObjectConverter.java
>
>
> In a application with many value objects (from P of EAA) is useful as a
> conversion last resource to instantiate the target class passing the reveived
> parameter to class constructor. This can be achieved overiding
> ConverterLocator's default converter .
> One way this could be done is:
> - Remove final from getConverterLocator() in Application.java, so one can
> implement its own converter locator.
> - ConverterLocator have a getDefaultLocator that could be overiden.
> I don't know if this is the best way, but it requires few changes in wicket.
> Thanks for considering.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.