cancel
Showing results for 
Search instead for 
Did you mean: 

UI Element mapped to Model Context is ReadOnly

Former Member
0 Kudos

Hi,

I have a webservice mapped to a model, that performs read/ write operation on an excel sheet.

Problem Statement :

1) I have binded the model to a particular component in my webdynpro application

2) I have a view that takes value in the input field - and this is mapped to a model function insert.

The problem lies here : The input field is not accessible - I am not able to insert any value, it's deactive.

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_bose
Active Contributor
0 Kudos

there is two solutions:

1) you have to specify input for all the parameters in the input field of the model.

or

2) create value attribute and accept user input in the value attribute, then assign those values to the model parameters before executing the model

the second way is good.

regards,

nikhil

Answers (3)

Answers (3)

vivekananthan_sellavel
Active Participant
0 Kudos

hi Sameer khan

I faced that problem

1.just right click component controller in open data modler

2.Apply template

3.in component you can see function updated

4.then you can call that function to view

i did this got the answer . try this

Former Member
0 Kudos

Hi Friends,

Thanks for the reply. Context problem is solved but now i am getting NullPointerException, Anyone please help.

nikhil_bose
Active Contributor
0 Kudos

now, you are trying to access a context object that is not available at runtime.

When you are invalidating the model object to reflect new values, at run-time there won't be any instance for the model ( since the cardinality is 0 to n).

creating new instance of the model class will solve your problem

regards,

nikhil

Former Member
0 Kudos

hi sameer,

Please keep the two context separate ie bind a context to the input field and at the time of enter or submit set this context to the webservice model context by writing code.I think this will work

Warm regards

Shanto Aloor