[ 
https://issues.apache.org/jira/browse/ISIS-2749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Keir Haywood updated ISIS-2749:
--------------------------------------
    Description: 
For example, if enter 'abc' into a BigDecimal' then the error message returned 
is effectively hardcoded because in IsisWicketApplication we just use Wicket's 
default ConverterLocator (fine tuned with a couple of extra types to convert).  
That means we get:

!image-2021-06-17-12-50-57-240.png|width=582,height=120!

We also have a bit of technical debt, because there is an IsisConverterLocator 
that _doesn't_ implement Wicket's IConvertLocator, and is just called from one 
place, statically, to render an object as a string.

So we should perhaps:
 * provide our own impl of IConveterLocator, probably subclassed from Wicket's
 * make it a Spring Bean
 * get rid of IsisConverterLocator (roll it into aforementioned 
IConverterLocator)
 * decide on a way to allow new/replacement converters to be registered.

We might also want to look at the ValueTypeRegistry we have, just in case 
there's overlap.

 

 

  was:
For example, if enter 'abc' into a BigDecimal' then the error message returned 
is effectively hardcoded because IsisConverterLocator is called statically and 
hardcodes Wicket's BigDecimalConverter to do the processing.

!image-2021-06-17-12-50-57-240.png|width=582,height=120!

Making IsisConverterLocator into a domain service is easy, but we would a 
mechanism to allow convertors to register themselves into it (eg with the 
current as fallbacks).

Perhaps that would be reinventing the wheel.  Does Wicket already provide a way 
to make this pluggable in the context of Spring.

 


> Convert IsisConverterLocator into a domain service and allow Wicket 
> Converters to be substituted in.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-2749
>                 URL: https://issues.apache.org/jira/browse/ISIS-2749
>             Project: Isis
>          Issue Type: Improvement
>          Components: Isis Core
>    Affects Versions: 2.0.0-M5
>            Reporter: Daniel Keir Haywood
>            Priority: Minor
>             Fix For: 2.0.0-M6
>
>         Attachments: image-2021-06-17-12-50-57-240.png
>
>
> For example, if enter 'abc' into a BigDecimal' then the error message 
> returned is effectively hardcoded because in IsisWicketApplication we just 
> use Wicket's default ConverterLocator (fine tuned with a couple of extra 
> types to convert).  That means we get:
> !image-2021-06-17-12-50-57-240.png|width=582,height=120!
> We also have a bit of technical debt, because there is an 
> IsisConverterLocator that _doesn't_ implement Wicket's IConvertLocator, and 
> is just called from one place, statically, to render an object as a string.
> So we should perhaps:
>  * provide our own impl of IConveterLocator, probably subclassed from Wicket's
>  * make it a Spring Bean
>  * get rid of IsisConverterLocator (roll it into aforementioned 
> IConverterLocator)
>  * decide on a way to allow new/replacement converters to be registered.
> We might also want to look at the ValueTypeRegistry we have, just in case 
> there's overlap.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to