i am trying to disable a text field:
<html:text property="firstName" style="width: 100px;">
<%=isDisabled%>
</html:text>
String isDisabled = "";
if (x == null || x.equals("")) {
isDisabled = "disabled='true'";
But the text field is not getting disabled.. Any idea??
This is quite easy to do. First you determine if the textbox will be disabled or not (this must be a string with true/false value, not disabled='true' as you were trying to do):
And then you disable the field:
See here for more documentation.
I don't remember exactly but I think you can also use a boolean directly: