Skip to Content
0
Former Member
May 27, 2013 at 07:49 PM

Deprecated methods of IPortalComponentProfile leading to ClassCastException

37 Views

IPortalComponentProfile profile = ((IPortalComponentRequest) getRequest()).getComponentContext().getProfile();

Object o = profile.getProperty("myBean");

if (o == null || !(o instanceof SortBean) || myBean == null) {

myBean = new SortBean();

profile.setProperty("myBean", myBean.toString());

//profile.putValue("myBean", myBean);

} else {

myBean = (SortBean) o;

}

------------

This code worked fine in EO 7.01. But when we migrated to EP 7.3 then I am getting ClassCastException. Came to know that getValue and putValue of IPortalComponentProfile are deprecated. I suspect this is causing the issue. Can anyone tell me what I can use instead and give me the code if you have.