This discussion is archived
3 Replies Latest reply: Nov 15, 2012 9:09 AM by Sascha Herrmann RSS

casting ViewObject to CustomViewObjectImpl

959890 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points