Thanks Abdullah, I took the JSP 2.0 approach. Didn't realize that was possible. The <c:if> kind of worked but I wasn't able to put the <bean:define> inside it (it printed out static text though so it was obviously working).
Thanks again, Kent -----Original Message----- From: Abdullah Jibaly [mailto:[EMAIL PROTECTED] Sent: Friday, 8 July 2005 11:53 PM To: Struts Users Mailing List Subject: RE: Using the form bean Don't know if this is the reason but you probably want focus="${focus}" Try using c:if instead of logic:equal, but the cleanest way if you are using jsp 2.0: focus="${form.edit ? 'password' : 'userName'}" Regards, Abdullah -----Original Message----- From: Kent Boogaart [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 7:59 AM To: 'Struts Users Mailing List' Subject: Using the form bean Hello, I'm trying to set focus on the first enabled field in my form. The first field is disabled if the data is being edited. I thought this would work: <bean:define id="form" name="configuration.user"/> <bean:define id="focus" value="userName"/> <logic:equal name="form" property="edit" scope="request" value="true"> <bean:define id="focus" value="password"/> </logic:equal> <html:form action="/configuration/user_save" focus=${focus}"> But this complains about "No bean found under attribute key form". The weird thing is, I use that same bean further down the page without any problem: <html:text property="userName" readonly="${form.edit}" disabled="${form.edit"/> If I take out the <logic:equal> code then it works (but doesn't set focus to the password field when required). What am I doing wrong here? Thanks, Kent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]