Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NumberConverter  RSS feed

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Im trying to use NumberConverter class inside my custom converter. Im using some third party components and for some certain scenarios i can't make use of <f:convertnumber inside my jsp.

getAsString(FacesContext context, UIComponent comp, String value)

is it possible to apply NumberConverter directly to the value , so that the value will be formatted. I tried creating an instance of the NumberConverter class and adding the converter to comp, but it doesnt seems to be working.

Any new ideas or suggestions ?

Thanks,
Rajeev
 
Ravisekhar Kopparthi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Rajeev,

How are u doing? I see you became JSF guru answering tons of questions..


I think you need to check the ViewMIApplication.jsp in IUS?

I have used the number formatting the way you wanted.

Thanks
Ravi
 
Ravisekhar Kopparthi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgot to mention:

Paste the answer in this forum (as I remember doing it in that file but dont exactly remember now) so that others can also find it.

You are really doing a good job man by answering so many questions..

Thanks
Ravi
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi,

Thanks for your reply and comments. I was trying to include NumberConverter in my custom converter because Otrix Tab wasn't working if i click on the next button instead of navigating through tabs.

The numberconverter used in JSP is as follows



anyway I didnt have to go with custom converter since the issue got resolved by changing prmitive datatype to object in managedbean, i.e from double to Double.

Thanks,
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!