import java.lang.reflect.Field;
import java.lang.reflect.Method;
Código Javascript:
Ver original
try { Field stateCB = window.getClass().getDeclaredField("frontSelectCB"); stateCB.setAccessible(true); state = stateCB.getBoolean(window); ... } ....
El error con getBoolean:
Cita:
En fin, no se puede reflejar un checkbox? at sun.reflect.UnsafeFieldAccessorImpl.newGetBooleanI llegalArgumentException(Unknown Source)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at sun.reflect.UnsafeObjectFieldAccessorImpl.getBoole an(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at java.lang.reflect.Field.getBoolean(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)