cancel
Showing results for 
Search instead for 
Did you mean: 

Model Binding

Former Member
0 Kudos

I am trying to put the code into a custom controller to initiate a model:

WSModel model = new WSModel Model();

wdContext.nodeRequest_getData().bind(new Request_getData(model));

Every thing looks fine except for this part: bind(new Request_getData(model)); I get a message Request_getData cannot be resolved or is not a type.

It is defined in both the Model and the Controller so what have I forgotten to do?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

i am assuming that u have a bapi/rfc Request_getData() in a model WSModel.

have you mapped the custom controller to the model ( i mean are you having the node Request_getData() in the context of your custom controller?

if so, i did not understand why you want to have a model instance created in the custom

controller?

correct me if my assumption is wrong

Regards,

Satya

Former Member
0 Kudos

According to your code WSModel seems to be name of model name.

After creating an instance for model you need to bind this to node in context of component controller.

Try it this way


WSModel model = new WSModel Model();
wdContext.nodeRequest_getData().bind( model ( new WSModel() ));
// where Request _getData() is node in component controller to bind WSModel Data.

Mandeep Virk

Former Member
0 Kudos

Hi,

are u writing this code in the wdDoInit() method of the custom controller?

i did not understand this in your code

WSModel model = new WSModel();

i have tried to work out what u r trying to do but could not find WSModel any where.

but u can apply a service controller template to the custom controller which will automatically do the job for u .

can u tell what exactly ur requirement is what u r trying to do?

Regards,

Satya.