Try the Concatenate function .. while it also casts to String it is being evil
and catching all errors and checking for null.
StringBuffer text = new StringBuffer();
for (Expression expression : (List<Expression>) getParameters()) {
try {
String str = (String) expression.evaluate(feature,
String.class);
if (str != null) {
text.append(str);
}
} catch (Exception couldNotCompute) {
// log me please
}
}
Example: Concatenate('BT',objectid)
--
Jody Garnett
On Friday, 15 March 2013 at 7:09 AM, christy@azgs wrote:
> We have achieved schema resolution! That is, as long as we use the getId()
> idExpression. However, because we'd like to use our integer field
> 'objectid', we need to figure out how to concatenate an integer with that
> field OR make that read as a string. We tried the following, but we get that
> "java.lang.IllegalArgumentException: Filter Function problem for function
> strConcat argument #1 - expected type String" error:
>
> <idExpression>
>
> <OCQL>strConcat('BT', objectid)</OCQL>
> </idExpression>
>
> And we also tried:
> <idExpression>
>
> <OCQL>strConcat('BT', strTrim(objectid))</OCQL>
> </idExpression>
>
> Resulting in the same error. Thanks to anyone with ideas.
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.n6.nabble.com/Re-App-Schema-Resolution-tp5040030p5040472.html
> Sent from the GeoServer - User mailing list archive at Nabble.com
> (http://Nabble.com).
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> (mailto:Geoserver-users@lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users