Balwant Kumar Singh
Balwant Kumar Singh

Reputation: 1178

Why getText() doesn't work to format a double value in Struts 2

The code given below doesn't work for me to format a double value coming from a DTO via struts Action class:

<s:textfield key="xyz.value" value="%{getText('format.number',{xyz.value})}" theme = "simple"/>

I've gone through this link . But this code is not working for me. I've not done any changes in my action class for this. In propety file I've assigned value for format.number only. i.e format.number = {0,number,#0.0##}

Upvotes: 0

Views: 993

Answers (1)

Roman C
Roman C

Reputation: 1

Your action should extend ActionSupport without it getText is not available.

Upvotes: 1

Related Questions