This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSF and the fly likes ABS() in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ABS() in JSF" Watch "ABS() in JSF" New topic

ABS() in JSF

jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
Hi ranchers,

I have couple of questions in JSF

1. How to call Math.ABS() while displaying a number value in JSF? i am using Myfaces with trinidad.

2. how to align text when using <trutputlabel> (text-align:right or left). I tried the inlinestyle but it is working.

Any help in this is highly appreciated.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
You could define a TLD file "myFunctions.tld" containing this:

<function-signature>double abs (double)</function-signature>

and then write this in your JSP:

<%@ taglib prefix="math" uri="/WEB-INF/myFunctions.tld" %>


jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
thank you Ulf Dittmer.
I am using JSF. Will this solution ork for me... Any way i will try and let you know..
I agree. Here's the link:
subject: ABS() in JSF
It's not a secret anymore!