File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

value in text field when empty displays []

 
Rachel Kumar
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have given value using the %{}, but when textfield is empty it just displays [] as default and when a value is populated it shows as [xyz], how do i trim out the brackets?


<s:textfield name="contract" id="contract"
theme="simple" value = "%{contract}"/>


please help!!!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no need to the "value" attribute. All you need is the "name" attribute; the value will be filled in by the framework.
 
Rachel Kumar
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you i got it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic