Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:57:28+00:00 2026-05-27T09:57:28+00:00

i am Using DisplayTag table library to render my tables, which gives the option

  • 0

i am Using DisplayTag table library to render my tables, which gives the option to specify messageFormat patterns for the data. i am having some hard time in finding the correct format’s
following are the formats i am trying to write

  1. given a double print its currency representation without decimal points e.g 25.25 as $25 

  2. if a negative double is given it must print -$25 currently its printing ($25)
  3. if double is 0.00 the it should not be printed
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:57:29+00:00Added an answer on May 27, 2026 at 9:57 am

    The pattern "\u00A4#;-\u00A4#" satisfies your first two requirements. The third one, AFAIK, can’t be satisfied with a simple pattern.

    You could use a simple amount.tag file doing the following:

    <c:if test="${value != 0}>
        <fmt:formatNumber value="${value}" pattern="\u00A4#;-\u00A4#"/>
    </c:if>
    

    Note that not displaying anything for 0 is a bit strange, since any value between 0 and 0.5 will display as $0 due to rounding anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am displaying the database table values using data tables. I am doing this
I'm using displaytag to build tables with data from my db. This works well
I'm in the midst of converting some tables that are using DisplayTag over to
I using display tag for my application. to render the table in some format
i am using diaply tags library for displaying my tables.But i cant use the
I'm displaying user messages through templates using RequestContext in Django, which gives access to
I am currently using displaytag for tabular data, but would like to create a
I recently started using the DisplayTag library and I've run into a problem. I'm
I want to export the table which is displayed using display tag on the
Below given is my layout which is I am using for displaying a table,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.