on 02-08-2007 9:57 AM
Hello I'm creating the following HorizontalGutter dinamicly and I have
the exception: ( java.lang.ClassCastException )
IWDHorizontalGutter gut =
(IWDHorizontalGutter) view.createElement(
IWDHorizontalGutter.class,
"Gutter1" + index);
Does anybody know what is left?
Thanks in advance!
//@@begin javadoc:createUIeleOrg()
/** Declared method. */
//@@end
public void createUIeleOrg( int index, com.sap.tc.webdynpro.progmodel.api.IWDView view, comp.diageo.sims.wdp.IPrivateSearchPage.IOrganisationElement ele )
{
//@@begin createUIeleOrg()
IWDTransparentContainer org =
(IWDTransparentContainer) view.createElement(
IWDTransparentContainer.class,
SimsConstants.c_torg + index);
org.createLayout(IWDGridLayout.class);
IWDLinkToAction lto =
(IWDLinkToAction) view.createElement(
IWDLinkToAction.class,
SimsConstants.c_lto + index);
IWDAction linkAction =
wdThis.wdCreateAction(
IPrivateSearchPage.WDActionEventHandler.TO_ORG_DETAILS,
c_blank);
lto.setOnAction(linkAction);
lto.mappingOfOnAction().addParameter(
SimsConstants.c_orgid,
ele.getOrgID());
IWDCaption lab =
(IWDCaption) view.createElement(
IWDLabel.class,
SimsConstants.c_lb1 + index);
IWDCaption lab2 =
(IWDCaption) view.createElement(
IWDCaption.class,
SimsConstants.c_lb2 + index);
IWDCaption lab3 =
(IWDCaption) view.createElement(
IWDCaption.class,
SimsConstants.c_lb3 + index);
IWDHorizontalGutter gut =
(IWDHorizontalGutter) view.createElement(
IWDHorizontalGutter.class,
SimsConstants.c_gut + index);
lto.setText(SimsConstants.c_title + ele.getOrgName());
lab.setText(SimsConstants.c_address + ele.getOrgAddress());
lab2.setText(SimsConstants.c_showner + ele.getOrgOwner());
lab3.setText(SimsConstants.c_comment + ele.getOrgNotes());
org.addChild(lto);
org.addChild(lab);
org.addChild(lab2);
org.addChild(lab3);
org.addChild(gut);
IWDTransparentContainer tc =
(IWDTransparentContainer) view.getElement(SimsConstants.c_transorg);
tc.addChild(org, index);
//@@end
}
The code before insert the Gutter part was working, only after insert the part corresponding to the gutter, an exception is raised.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code looks correct (perhaps you might pass NULL as ID).
Please post complete stacktrace.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.