wood burning stoves 2.0*
The moose likes JSP and the fly likes having trouble converting values on my jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "having trouble converting values on my jsp" Watch "having trouble converting values on my jsp" New topic
Author

having trouble converting values on my jsp

Thiago Balducci
Greenhorn

Joined: Mar 22, 2010
Posts: 11
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

Joined: Mar 22, 2010
Posts: 11
Ah ! theres another thing thats troubling me, is there a way to format an element's title without using anything related to javascript ?



thanks !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Have you checked out the <fmt> JSTL tags?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

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

Joined: Mar 22, 2010
Posts: 11
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

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

Joined: Mar 22, 2010
Posts: 11
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Again, check out the <fmt> class of tags of the JSTL. Hint: fmt stands for format.
Thiago Balducci
Greenhorn

Joined: Mar 22, 2010
Posts: 11
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Why not?
Thiago Balducci
Greenhorn

Joined: Mar 22, 2010
Posts: 11
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
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: having trouble converting values on my jsp