File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 42965
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..
subject: ABS() in JSF
It's not a secret anymore!