It should be as simple as adding the Extension.Packages init-param to
StripesFilter with the name of your type converter's package as its value.

http://www.stripesframework.org/display/stripes/Configuration+Reference

But as for your type converter, I don't see how it would work. All it does
is create a new role and set the role's ID. An entity type converter would
normally take the parameter value, convert it to the appropriate type
(usually Long) and then call EntityManager.find(..) to look up the entity.

Seriously, Stripersist does all that out of the box. You really should look
at it if you're using Stripes + JPA.

-Ben

On Tue, May 25, 2010 at 10:15 AM, daniel cioriia <danielcior...@yahoo.com>wrote:

> Hello,
>
> I have written a convertor that turns a Role ID into a Role instance, but I
> don'd know where to call it (how to make stripes call this convertor).I
> compiled the project, redeployed the application in JBOSS 5.0.1, put a
> breakpoint in convert method, but the breakpoint was not reached.
> Can you help me?
> The convertor looks like this:
>
> public class RoleConverter implements TypeConverter<Role>{
>
>     public Role convert(String input, Class<? extends Role> targetType,
> Collection<ValidationError> errors) {
>                 Role role = new Role();
>                 role.setId(Long.decode(input));
>                 return role;
>             }
>
>     public void setLocale(Locale locale) {
>
>     }
> }
>
>
------------------------------------------------------------------------------

_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to