struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: HttpParametersAware
Date Wed, 12 Oct 2016 09:37:01 GMT
You can try setting

<constant name="struts.ognl.logMissingProperties" value="false"/>

2016-10-12 10:03 GMT+02:00 Greg Huber <gregh3269@gmail.com>:
> I have tested this and looks OK.
>
> .....I have an action that implements HttpParametersAware so I can use the
> properties from the request eg:
>
>     public void setParameters(HttpParameters parameters) {
>         this.params = parameters.toMap();
>     }
>     private String getParameter(String key) {
>         String[] p = (String[]) this.params.get(key);
>         if (p != null && p.length > 0) {
>             return p[0];
>         }
>         return null;
>     }
>
> In my db, I have a properties file with key=site.description, value='
> My Site Description.'
>
> On my config form, I have a field with the name of site.description which
> is a key and is a string (ie not getSite().getDescription()) eg:
>
> <input id="config_site_description" type="text" value="My Site Description."
>  size="35" name="site.description">
>
> When I submit the form com.opensymphony.xwork2.util.ValueStack#setValue(..)
> tries to evaluate it to the bean.property rather than the string and throws
> an exception.  In DEV mode I get messages like:
>
> Error setting expression 'site.description' with value 'My Site Description.
> '
>
> I get a whole load of these as its my main config page, one for every
> config value.
>
> I guess there is no way to suppress these messages in dev mode?
>
> Cheers

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message