Thanks for your reply Andras.
I've been able to get it to exclude other simple properties when
configured in the result, e.g.
<action name="ListNames"
class="gov.noaa.ngdc.mgg.scufn.action.ListNamesAction">
<result type="json">
<param name="excludeProperties">
user,featureDAO
</param>
<param name="excludeNullProperties">true</param>
</result>
</action>
As an aside, I'd like to configure exclusions common to all actions w/in
the package in the interceptor, but haven't figured out how to combine
this w/ a custom interceptor definition yet:
<package name="json" namespace="/secure/json" extends="json-default">
<interceptors>
<interceptor name="authenticationInterceptor"
class="gov.noaa.ngdc.mgg.scufn.utils.AuthenticationInterceptor" />
<interceptor-stack name="secureStack">
<interceptor-ref name="authenticationInterceptor" />
<interceptor-ref name="defaultStack" />
<!-- this is not working, not sure why -->
<interceptor-ref name="json">
<param name="excludeProperties">
user,featureDAO
</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="secureStack" />
</package>
--john
Andras Balogh wrote:
Hi,
I have used the json-plugin also and as I understood it will read the
excludeProperties from the interceptor-ref and not from the result:
Example:
<interceptor-ref name="json" >
<param name="enableSMD">true</param>
<param name="excludeProperties">
.*Collection
</param>
</interceptor-ref>
I don't know if this is the case only when enableSMD is set to "true".
BR,
Andras.
John Cartwright wrote:
Hello All,
I'm using the (very nice!) jsonplugin version 0.31 and have a
question re: excluding properties. If my action exposes a List of
class instances and each of these
instances contains a "name" property, what is the proper syntax for
excluding that name property?
I expected something like:
<result type="json">
<param name="excludeProperties">
authorities.*\.name
</param>
</result>
but this doesn't seem to work. Can someone clarify for me?
Also, is there no way to mark fields w/in the action to be excluded
via Annotations?
Thanks for the help!
--john
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org