Simple example of Struts plugin, extending TextField

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Simple example of Struts plugin, extending TextField

mlists@x76.eu
Hi,
I'm looking for a simple example on how to extend the textfield tag to
only allow for certain input and display the value in a certain form
when the field is initially displayed.

So the plugin handles the input validation via a specified attribute,
and the output formatting according to another attribute.
E.g.

  <s:mytextfield name="userName" input="^(?:AFX-)?[a-zA-Z]+$"
output="%(name)"  />

If you have or know where to find such and example, please let me know.

Thanks :)



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Simple example of Struts plugin, extending TextField

Yasser Zamani-2


On 4/16/2018 9:10 AM, [hidden email] wrote:

> Hi,
> I'm looking for a simple example on how to extend the textfield tag to
> only allow for certain input and display the value in a certain form
> when the field is initially displayed.
>
> So the plugin handles the input validation via a specified attribute,
> and the output formatting according to another attribute.
> E.g.
>
>   <s:mytextfield name="userName" input="^(?:AFX-)?[a-zA-Z]+$"
> output="%(name)"  />
>
> If you have or know where to find such and example, please let me know.

It seems you don't need to extend Struts textfiled as Struts already
supports both validations and formats. Just search "Struts regex
validation" and "Struts textfield format" :)

Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]