on 02-04-2009 2:01 PM
Hi ,
I have created a model. and did bind its attributes to the UI elements. RFC is working fine.
But in the runtime all UI elements are disabled bydefault when i bind these to the model attributes but to the same UI element if i bind it to the local attribute its working fine...
I have tried reimpor and recreating model , and also changing the cardinality but not working...
Would not it be possible to bind UI elements to model attributes ? By using model attributes how the UI elements can be enabled ?
Please help me out...
Regards
Sireesha.
Hi,
If you bind UI Elements to model attributes, you will need to initialize them to see the fields enabled i.e. you will need to create an instance of the model object in wdDoInit() method of the view controller.
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Sireesha,
Please cross check these steps.
1.Right click on comp and choose Open data modeler
2.Check the data link between model and compcontroller.
3.Right click on datalink and say edit,drag and drop your elements(from model to controller).
4.Go to compcontroller and check whether model attributes are avilable or not?
5.In the view context create the attributes->right click and select edit context binding(from comp).
5.In view->Layout tab->set the text/value property for your UI elelments.
6.Finally bind the modelobject and then execute.
wdContext.nodemodel().bind(new Model());
wdContext.currentModelElement().modelObject().execute();
Regards,
Lavanya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
this occurs becoz u would have bound the i/p element to a model attibute whose value is null.
to solve dis,
1)create a context attribute in ur view
2)bind the i/p elements to that context attr
3)while executing the rfc , get the value of this context attr and set it to the model attr.
for example if u have a model attr 'name_mo ' which u have to bind to the i/p field element
create a context attr -
name_vn
bind name_vn to the i/p field element
while executind ur rfc,
Test_Input ip = new Test_Input();
ip.setName_mo(wdContext.currentContextElement().getName_vn());
Test_Input is the name of the model node that is bound from model to the view via comp.ctller
Regards
Jayapriya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayapriya,
I think its not bcoz of the model attributes is null...
Once you key-in some value in the Ui element then model attribute holds the value. No where we r binding it to the null value as per my analysis...
Finally it got worked after creating the model. I am getting this UI elements disabled when i reimport the model.
I have tried creating the new model all UI elements are enabled after this...
Its working now...
Regards
Sireesha.
Hi,
Did you execute the model from webdynpro?
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.