Hi Chris,

One avenue you can explore is to use the formatType= attribute. Formatters
can optionally accept different formatTypes and/or formatPatterns. In your
case, you could use <s:text name="bar.foo" formatType="name"/>, and adapt
your Formatter to take the formatType into consideration. The default could
be the ID, so that the rest of your code won't change, and you can use the
name instead where appropriate.

Hope that helps, let us know how it works out.

Cheers,
Freddy

- I know I can create a new Formatter that operates on all Foo objects to use
- the "name" property instead of the "id" property and eliminate this problem,
- but I'd rather avoid that if at all possible, since I'd like all my URLs to
- be consistent (all use numbers, rather than some use numbers and others use
- names). Other ways I thought of tackling this are to just use HTML input
- fields instead of the Stripes tags and populate the value myself, although
- that means I won't get nice Stripes error messages for that field anymore.
- I suppose I could also use a stripes:hidden field with the id of the Foo, use
- an HTML input control to get and display the name, and have some JavaScript
- pass information back and forth, though that seems a tad baroque, un-Stripey,
- and broken without JavaScript.

- Is there any other way to accomplish this, or am I horribly abusing Stripes
- here?  Thanks for any tips or suggestions.

- Chris



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to