cancel
Showing results for 
Search instead for 
Did you mean: 

mapping inputfields to model bound context attributes

Former Member
0 Kudos

Hi,

I think I am having the same problem with the blank input fields as in this post:

Additionally, when I try to set some default values in the fields, I get a nullpointer exception.

Then I tried mapping the controller context attributes directly into the view context (in the root). Now I get this exception message:

com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(CreateView): cannot modify Matnr because it is mapped and there is no active NodeElement to take the value

However, in the doInit of the custom controller I bind the model already:

// Create a new element in the node Z_Crm_Set_Matnr_Input

Z_Crm_Set_Matnr_Input inputSet = new Z_Crm_Set_Matnr_Input();

wdContext.nodeZ_Crm_Set_Matnr_Input().bind(inputSet);

This has always been sufficient before in previous web dynpros, but the difference is this. beforehand, it works when the function module imports were parameters, now it is a structure.

I tried Noufal's suggestion, but this line didn't work.

inputSet.setIs_Matnr(new Is_Matnr());

because it cannot be resolved or is not a type.

my controller context looks like this:

Z_Crm_Set_Matnr_Input

|

|-- Is_Matnr

| |--...

| |--...

|

|-- Output

Thanks for any suggestions.

regards,

faB

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Since you already replied twice in the topic you mentioned yourself, can we close this topic and put our answers in there?

Answers (0)