Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Layout Controller: problem with 'NeutralControl' class

hi All,

am new to portal.

I am trying to develop a new LIST layout controller.

i have seen the LayoutController code snippet in SDN link: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/Knowledge%20Management%20and%20Collaboration%20Developers%20Guide.html

public class TestLayoutController extends AbstractLayoutController {

	public ILayoutController getNewInstance() {
		return (new TestLayoutController());
	}

	public Control[] getControls() {
		if (this.controls == null) this.createControls();
		return this.controls;
	  }

	public Component render() throws WdfException {
		GridLayout result = new GridLayout();
		result.setHeightPercentage(100);
		result.addComponent(1, 1, this.controls[0].render());
		result.setWidth("100%");
		return result;
	  }
	  private void createControls() {
		  this.controls = new Control[1];
		  NeutralControl control = new NeutralControl(this.getProxy(),IFlavorConst.FLAVOR_LIST.toString());
 		  this.controls[0] = control;
	  }

}

If i use

NeutralControl control = new NeutralControl(this.getProxy(),IFlavorConst.FLAVOR_LIST.toString());

i getting a <b>NoClassDefFoundError</b>.

In the above code, what should i instead of NeutralControl?? or where is the code for MyControl class (according to the codesnippet in SDN link)???

help me..

regards,

K

Former Member
Not what you were looking for? View more on this topic or Ask a question