app-schema - ClientProperty - would like to display attribute only if it has a value

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

app-schema - ClientProperty - would like to display attribute only if it has a value

Florent gravin-2
Hi,

i'm using app-schema with WFS 2.0

the behavior i would like to have is (remolve nilReason attribute if null):

if toto (column in my table) is specified then i would get
<au:technicalStatus>toto</au:technicalStatus>

if toto is null or empty :
<au:technicalStatus nilReason="unknown" />

I was just able to do this :

                <AttributeMapping>
                    <targetAttribute>au:technicalStatus</targetAttribute>
                    <sourceExpression>
                        <OCQL>technicalstatus</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>nilReason</name>
                        <value>if_then_else(isNull(technicalstatus), 'unknown', '')</value>
                    </ClientProperty>
                </AttributeMapping>

thats gives me :
<au:technicalStatus nilReason="">toto</au:technicalStatus>
or <au:technicalStatus nilReason=""/>

do you know a way to do it ?

thks


--
Florent Gravin
CampToCamp - Chambéry
0479444492


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users