cancel
Showing results for 
Search instead for 
Did you mean: 

Still i have a problem with sending data to backend through inputfiled

Former Member
0 Kudos

Hi all,

I have still problem with Input Field. Context and model binding and backend every thing is fine. I created action in view to execute the model. And also created method in Controller. Every thing seems ok. Why this input field is grade off, can not enter data in view. any idea?

I tried all my possible ways. Any idea?

Thankx

Regards

Ravi.Golla

Accepted Solutions (1)

Accepted Solutions (1)

abhijeet_mukkawar
Active Contributor
0 Kudos

hi,

create element of model classes, and bind them to UI field,

put code for creating elements in init().

regards

Answers (7)

Answers (7)

Former Member
0 Kudos

I found the problem, it is problem in backend table. Here we are using structure instead of attribute.

Former Member
0 Kudos

Hi,

Check your bindign withe that input field that would be the problem.

dont need to set the cardinality when you are using model node.

Thanks,

Lohi.

Former Member
0 Kudos

Hi ravi,

Assume the below layout to be your context layout

NodeA

... Attribute1

Suppose Attribute1 is the context element that is bind to your inputField in the view.

In wDoInit() method of the component/custom controller

//create a instance of your model

SampleModel model = new SampleModel();

NodeA Req = new NodeA(model);

wdContext.nodeNodeA.bind(req);

This should enable the inputfield.

Former Member
0 Kudos

In the custom controller wdDoInit() method , you have to create and bind your model object instance into the corresponding node

for ex:

Bapi_Salesorder_Getlist_Input inp = new Bapi_Salesorder_Getlist_Input();

wdContext.nodeBAPI_SALESORDER_GETLIST_INPUT().bind(inp);

thanks

Kanthiah.G

former_member189631
Active Contributor
0 Kudos

Hi Ravi,

  • Please check Your Binding and Mappings

  • Try to set the value for that Context Attribute.

  • Consider that you have a InputField . U have bound a context(Val) attribute with that Input field. write the code to set the value,

wdcontext.getContext.currentContextElement.setVal(""); //Empty value

(or)

<You model node>.setVal(" ");

(or)

<You model node>.setVal(Object);

Regards,

Ram.

Former Member
0 Kudos

hi

Instantiate your model class and bind it to your model node bound to the i/p field in your init of the controller. it will work. Thanks.

reg

vln

Former Member
0 Kudos

Hi Ravi,

I think because of cardinality of the model node, input field is blank.

If the cardinality is 0..n, then by default input field will be blank as there is no instance of the node.

If u change it to 1..n, by default webdynpro creates an instance of this node. If u can't change the property then u need to manually create an instance and bind that object to the node.

Thanks.

Best Regards,

Shiva