It's been a while since I've used Struts 1.x but did you try using <c:set> to set a variable and them dump it in cssStyle using ${} syntax? If not that, you could always add the CSS class to the input field using JavaScript.
Zarar On 9/28/07, prem_gadgetquest <[EMAIL PROTECTED]> wrote: > > I have lots of control (textbox, combobox n all.....) in my page..what I want > is....... when user logs in he shud be able to see contorls in editable > format or noneditable format depending upon his role. > > Now in non struts ie. simple jsp page i wud hav done this way > > String jsEdit=""; > if(sCurrentUserRoleName.equalsIgnoreCase("Admin") > { > jsEdit="class='nonedit' " //nonedit is defined by me! > } > else > { > jsEdit="class='edit' " > } > <input type="text" name="title" value="<%=jsTitle%>" size="30" maxlength="5" > <%=jsEdit%>/> > > if same thing i wanna do it in struts then ....... > > <html:text property="txtTitle" size="30" maxlength="5" <%=jsEdit%>/> //yes > incase of struts i m using styleClass and not class attribute of the > html:text field > above snippet flashes error mark ..saying unterminated html:text tag...m > sure its not reg. terminating html tag...but there's some way to display > this control with variable ...please guide me best way.. > > > Thanks.:working: > -- > View this message in context: > http://www.nabble.com/style-display-for-html%3Atext-or-any-control-tf4535191.html#a12942693 > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]