se | 5 May 14:39
Picon

wildcards for include/exclude parameters in converters

Hello DWR Gurus!

I find the "include" and "exclude" parameters of the BeanConverter very useful.

Is it possible to use wildcards in include/exclude definitions?

I would like to do something like:

        <convert converter="bean" match="MyClass">
            <param name="exclude" value="str*"/>
        </convert>

and expect DWR to exclude all member variables of MyClass that start with "str".

Thanks,
Gabor
Lance Java | 6 May 10:32

Re: wildcards for include/exclude parameters in converters

Simple answer: no

Complex answer: You could implement your own access control (extending DefaultAccessControl perhaps) and plug it in via a servlet init param. Note that an exclude param in dwr.xml results in addExcludeRule(String scriptName, String methodName) being called.

<init-param>
   <name>org.directwebremoting.extend.AccessControl</name>
   <value>foo.bar.MyAccessControl</value>
</init-param>

Cheers,
Lance.



2008/5/5 se <pamaneg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
Hello DWR Gurus!

I find the "include" and "exclude" parameters of the BeanConverter very useful.

Is it possible to use wildcards in include/exclude definitions?

I would like to do something like:

       <convert converter="bean" match="MyClass">
           <param name="exclude" value="str*"/>
       </convert>

and expect DWR to exclude all member variables of MyClass that start with "str".

Thanks,
Gabor

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe-EyPigyGktj4FDOXUYO6UHQ@public.gmane.org
For additional commands, e-mail: users-help-EyPigyGktj4FDOXUYO6UHQ@public.gmane.org



Gmane