Wicket FloatConverter setNumberFormat -


in wicket 6 floatconverter class had setnumberformat method.

in wicket 7 no longer available.

i use modify default limit of 3 decimals text field. there different way this?

use abstractdecimalconverter#newnumberformat(locale) this. can override , configure specifics.

public class myfloatconverter extends floatconverter {   @override protected numberformat newnumberformat(final locale locale)     {         numberformat nf = numberformat.getinstance(locale);         nf.setxyz(); // <<- customize numberformat here          return nf;     } } 

the can setup converter default 1 in yourapplication.java:

  @override protected converterlocator newconverterlocator()   {         converterlocator cl = super.newconverterlocator();         cl.set(float.class, new myfloatconverter());         return cl;     } } 

or in specific component overriding #getconverter(class) method;


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -