On 2/6/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
>
> I want to write a subclass of TextArea component that can allow a user to
> embed various annotations around what they type like [link][/link] for
> rendering a link, [email][/email] for rendering an email, [list] for
> numberings etc. Using contribs editors like TinyMCE or dojo seems kind of
> heavy at times on a situation like Forum Comment needs.
>
> Does anyone know any form of regex String java library that handles this
> commonly used annotations that one can simply send your Model String Dump to
> and then converts those annotations to thier HTML equiv.?

Don't know. But it shouldn't be too hard to write this yourself neither.

> I feel wicket extension needs a component like this

Maybe not 'needs', but it would be a nice addition for sure.

> Now am no Certified Wicket Engineer but Am a Wicket Programmer/User and the
> only thing in my head is to go thru model onSetObject (translate to HTML)
> and onGetObject (translate back to annotations based).?
>
>  I thought of IConverter but realized its only used to Data Type Conversion
>
> any recommendations?

You touch a much debated area here, where amongst Wicket developers we
have two camps :)

1) Fix a model on the component and wrap any model the component get's
provided. The model's primary task would be filtering in/ out.

2) Use a special converter. I'm in this camp (though I don't really
have much against the first option either) as I believe converters
should handle input/ output conversion which is a broader concept than
just type conversion. In 2.0, the converters mechanism is improvement
(simplified) so that it is easier to write converters like this. If
you want to follow this route, you could extend SimpleConverterAdapter
to make your own converter; see the phoneNumberUS field in the
forminput example in wicket-examples. It is quite awkward to do in
1.2/1.3 as you can't use CharSequence classes for it. In 2.0 this
works fine.

Eelco

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to