File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes value in text field when empty displays [] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "value in text field when empty displays []" Watch "value in text field when empty displays []" New topic
Author

value in text field when empty displays []

Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Oct 21, 2008
Posts: 51
thank you i got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: value in text field when empty displays []