global.put(bean.name, global, bean.bean);
}
else {
// Must wrap non-scriptable objects before presenting to Rhino
WrapFactory wf = new WrapFactory();
Scriptable wrapped = wf.wrapAsJavaObject(Context.enter(), global, bean.bean, bean.type);
// Scriptable wrapped = Context.toObject(bean.bean, global);
global.put(bean.name, global, wrapped);
}
}