Re: value truncated

2009-02-26 Thread Adam Lister
This might not help you, but the simplest answer might be to avoid doing escaping, replacing, etc... and just make the value of your options be whatever unique identifier you have for that record in the db. Then when the user posts this value, you can look it up again in your action. If you d

Re: application entry point

2009-01-16 Thread Adam Lister
You can use default action mappings and wildcard mappings to go to a specific action by default. Easiest way seems to be something like: In your struts.xml. It's detailed here: http://struts.apache.org/2.0.14/docs/action-configuration.html#ActionConfiguration-ActionDefault Andy wrote:

Re: Highlighting a field with a validation error in struts 2

2008-11-12 Thread Adam Lister
t; either... does anyone recall which theme provides this? Thanks, -Adam Dave Newton wrote: --- On Wed, 11/12/08, Adam Lister <[EMAIL PROTECTED]> wrote: I'm trying to figure out how apply a class or some kind of style to a input field when there is a validation error in struts

Highlighting a field with a validation error in struts 2

2008-11-12 Thread Adam Lister
seem to be supported with the canned struts2 themes. Am I missing something, or would I have to override the themes myself to achieve this kind of functionality? Is there some other way I am missing? Thanks. -Adam Lister - To unsu

Re: Strus2, Freemarker and getting request.getContextPath()

2008-10-17 Thread Adam Lister
Sorry, should have read the original question more carefully! Because he provided JSP syntax (more accurate the OGNL syntax inside an S2 "property" tag in either JSP or FreeMarker). A plain %{expression} inside FreeMarker, IIRC, would be meaningless. -

Re: Struts2+YUI

2008-10-17 Thread Adam Lister
I am not a YUI guy, but I'm assuming YUI is expecting a javascript array of string. What does your struts.xml look like? What have you defined for the SUCCESS result? Is it a jsp? If it is a jsp, you should make the jsp write out the array as YUI is expecting it. The jsp will have access to

Re: Strus2, Freemarker and getting request.getContextPath()

2008-10-17 Thread Adam Lister
%{#request} That should get you the request context, as stated in: http://struts.apache.org/2.x/docs/ognl.html doahh wrote: Thanks for the reply, I am sure I am being dumb but I haven't had any luck in getting them working. I have tried: ${req} ${#req} %{req} %{#req} can you give an example o

Re: trimming request parameters in struts 2

2008-10-17 Thread Adam Lister
commonly want to do. I just wanted to check first to make sure that there was no way to do it via configuration of struts 2. Thanks, -Adam Torsten Krah wrote: Am Freitag, 17. Oktober 2008 15:22:43 schrieb Adam Lister: Am I missing something? Write your own one which does that and

trimming request parameters in struts 2

2008-10-17 Thread Adam Lister
Hi, I would like to set up struts 2 so that all request parameters are trimmed (leading and trailing whitespace removed) when the parameters are bound to the action. I sort of expected this to be the default behavior, but I'm finding it is not (struts 2.0.11). I looked around to see if may

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Adam Lister
his in the past: This assumes a "point" would be some kind of convertable type, like String, boolean, whatever. If not you'd add ".whateverProperty" to the end of the name. Torsten Krah wrote: Am Donnerstag, 9. Oktober 2008 18:46:45 schri

Re: ParametersInterceptor - How to save value taken from a Map or List with ParametersInterceptor

2008-10-09 Thread Adam Lister
Though not suitable for all situations, I've solved this problem in the past by mapping type conversion to the bean rather than to the action. Check out: http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-ApplyingaTypeConvertertoabeanormodel So in MyBean-conversion.properti