This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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 []
 
Similar Threads
use AJAX to save data
commandLink actionListener
JSP parameter displays null String instead of empty string
setting http Header using urlconnection
hml:link