3 Replies Latest reply: Nov 15, 2012 11:09 AM by Sascha Herrmann RSS

    casting ViewObject to CustomViewObjectImpl

    959890
      Hello everybody,
      11.1.2.3

      I created DeviceViewImpl via wizard from DeviceView.xml and I want to utilize. (I need to insert some new rows in it).
      I wrote this code into managed bean:
              Object obj = BeanHelper.getBindings().get("DeviceView1");
              JUCtrlListBinding julb = (JUCtrlListBinding) obj;
              ViewObject vo = julb.getViewObject();
              DeviceViewImpl dvi = (DeviceViewImpl) vo;
      But last line throws ClassCastException and I am not sure why. I can probably achieve my goal with instance of general ViewObject, but I guess it is not very typesafe solution..
      All advices appreciated. thanks

      Edited by: adekcz on 14.11.2012 7:41