Igor Vlasov wrote:
Hello

I want to add a user defined HTML attribute to <s:textfield.

Example of rendered HTML control: <input type="text" userDefinedAttribute="true"/>.

How can I do this?

if i write <s:textfield name="customer.cus_surname" size="20" userDefinedAttribute="true" />

I recieve an error.

You can't arbitrarily add attributes to a tag if the tag doesn't know about them... If you just need to statically include the same attribute/value every time, you can tweak the tag's template by customizing the theme [1]; otherwise, you would need to create a new tag based on s:textfield that knows how to handle your custom attribute(s).

L.

1 http://struts.apache.org/2.x/docs/themes-and-templates.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to