Prev | Current Page 163 | Next

Frank Zammetti

"Practical DWR 2 Projects"

Therefore, clients are not allowed to remote any
classes that you do not specify it being OK to remote, nor will they convert any object that you
do not specify it being OK to convert. So, you will have to enable this converter, if you wish to
use it, in the section like so:





Now, DWR will be able to marshal the MyBean instance into a suitable JavaScript object,
and vice versa. The match attribute specifies the class the converter will function on. You can
also specify a package here, which will cover all classes in the package. You also could specify a
match value of ???*???, which would allow conversion of all javabeans throughout your application.
This is clearly something you want to be careful doing though because it opens up the
possibility that you expose a method that can return a particular type of object you??™d rather
not allow a client access to. Imagine, for instance, some method that probably should be private,
but mistakenly isn??™t, that returns some internal data structure that contains sensitive
information.


Pages:
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175