• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

having trouble converting values on my jsp

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there!!Guys, i dont know if im going to sound dumb with this question but im trying to convert a high value like 1.000 which im getting from a bean to 1,000 on my jsp page so it can be used by another app but i cant find a way to make this work.Do i have to do something on my bean or is there a way to do this on a higher layer ?



Thanks !


 
Thiago Balducci
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah ! theres another thing thats troubling me, is there a way to format an element's title without using anything related to javascript ?



thanks !
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked out the <fmt> JSTL tags?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thiago Balducci wrote:Ah ! theres another thing thats troubling me, is there a way to format an element's title without using anything related to javascript ?


I don't know what you mean by "format a title". And, it's best to start new questions in new topics rather than piling multiple questions into one topic.
 
Thiago Balducci
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Thiago Balducci wrote:Ah ! theres another thing thats troubling me, is there a way to format an element's title without using anything related to javascript ?


I don't know what you mean by "format a title". And, it's best to start new questions in new topics rather than piling multiple questions into one topic.



By formatting i mean format a something inside an element's title x_x

Sorry for asking another question in the same topic but i thought it would be wrong to create another topic to ask something related to the question in this one .

thanks !
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thiago Balducci wrote:By formatting i mean format a something inside an element's title x_x


Doesn't help. What formatting is required? A title attribute is just a text string. Without further information, we're just swinging in the wind.
 
Thiago Balducci
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Thiago Balducci wrote:By formatting i mean format a something inside an element's title x_x


Doesn't help. What formatting is required? A title attribute is just a text string. Without further information, we're just swinging in the wind.




Hmm, it has something to do with my first question, sorry about not being very clear, im getting a value from a bean, a high number lets say 1000000000.00, this number is being placed in a link's title on my JSP, i need to format this to a currency format like 1.000.000.000,00, is it possible to do this from within my jsp, without having to do something inside my bean ?


 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, check out the <fmt> class of tags of the JSTL. Hint: fmt stands for format.
 
Thiago Balducci
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the problem is that im not allowed to use JSTL on this project...thats why im trying to find a way-around for this x_x
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not?
 
Thiago Balducci
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i dont know for sure, i've been given several custom made components to work, there are other basic libraries which i can work with but they are limiting JSTL use a ton... that being the main library of jsp i dont think i can ask for help on this here -.- ( didnt know i couldnt use JSTL until now, ugh )



but thanks a ton anyway !
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tell whoever made that decision that I said they're an idiot.

Then, you can write a custom tag or EL function to format the values for yourself using the services of java.text.NumberFormat.

Then tell the idiot how much time you had to waste re-inventing the wheel.
reply
    Bookmark Topic Watch Topic
  • New Topic