This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2: Disable textfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2: Disable textfield" Watch "Struts2: Disable textfield" New topic
Author

Struts2: Disable textfield

Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
Hi,

Struts2 version: 2.1.6
I need to disable a textfield but its not working. Here is what I have until now:


I pass the tiles attribute like this:


This is not disabling the textfield. What I am doing wrong? I tried %{#isDisabled} also and it does not work. Please help.


Nick
Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
oops I forgot that readonly attribute does the trick. Resolved now.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts2: Disable textfield
 
Similar Threads
Struts2 - if tag - OR condition
Struts2 test condition in s:if not working
Struts2 checkboxes returning values in Action class
<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>
conditional tags not working - struts2