cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro Questions

former_member445996
Participant
0 Kudos

Hi All,

I'll be bothering you experts for a while since I just started learning Web Dynpro for Java. Here are couple of questions I have:

1). When the BAPI is executed and data is extracted from R/3, is it automatically placed in the the component controller's context that is bound to it or we have to write code to do it. Also, what about the View Controller Context, does it automatically get the data from the component controller's context that is bound to it or we have to write code for that also. What if we execute the BAPI again, does the data get refreshed in the View context or code is needed for that.

2). I have an input field which is bound to an model attribute in a model node in View context which is bound to a component context which in turn is bound to a model. When I deploy the application, the input field is greyed out. I looked at the properties and the field is not set to Read Only. Any Ideas?

3). An resource that has a lot of coding examples?

Thanks for you input and suggestions.

Accepted Solutions (0)

Answers (3)

Answers (3)

ashutosh_rastogi
Active Contributor
0 Kudos

Hi Anurag,

1). When the BAPI is executed and data is extracted from R/3, is it automatically placed in the the component controller's context that is bound to it or we have to write code to do it.

Ans: If the component controller is bound with the model, all the model data is fetched automatically in the context. And if you map view Controller to some Component Controller's Context attributes/nodes. Then it actually is a kind of pointer to that attribute/node. So again, there is no need for coding.

But yes, if you want your own structure and wants to feed data to that structure from the model . Then you can do this by simple coding.

2). I have an input field which is bound to an model attribute in a model node in View context which is bound to a component context which in turn is bound to a model. When I deploy the application, the input field is greyed out. I looked at the properties and the field is not set to Read Only. Any Ideas?

Ans: See, what you make in context is just definition of nodes. Actual elements should exist at runtime to have data. So my guess here is that your model node elements do not exist at runtime or simply you have not executed the model yet so that it has something in response that you want to show.

3). An resource that has a lot of coding examples?

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/web%20dynpro%20sample%20applications%20and%20tutorials.htm">WebDynpro Tutorial Page</a>

Also, I would recommend you to read this PDF, very good for WebDynpro Concepts

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a048387a-0901-0010-13ac-87f9eb649381">Structural Concepts of WebDynpro</a>

Hope this Helps,

Ashutosh

Former Member
0 Kudos

Hi Aurang,

<b>2)I have an input field which is bound to an model attribute in a model node in View context which is bound to a component context which in turn is bound to a model. When I deploy the application, the input field is greyed out. I looked at the properties and the field is not set to Read Only. Any Ideas?</b>

Please make sure that you have instantiated the model class in component controller and bound the class to the model node in wdDoInit().

Instantiating:

<model class name>Input mod_Input=new <model class name>Input();

Binding in wdDoInit()

wdContext.node<model node name>().bind(mod_Input);

Hope this will help

Regards,

Shabeer

Former Member
0 Kudos

1). When the BAPI is executed and data is extracted from R/3, is it automatically placed in the the component controller's context that is bound to it or we have to write code to do it. Also, what about the View Controller Context, does it automatically get the data from the component controller's context that is bound to it or we have to write code for that also. What if we execute the BAPI again, does the data get refreshed in the View context or code is needed for that.

Ans: No need to write the code once again. after the execute mehod there is invalidate method that flush the old date only new data to be stored over there.

2). I have an input field which is bound to an model attribute in a model node in View context which is bound to a component context which in turn is bound to a model. When I deploy the application, the input field is greyed out. I looked at the properties and the field is not set to Read Only. Any Ideas?

Ans: check with binding property once again is it correctly bounded or not?

3). An resource that has a lot of coding examples?

Ans: This will provides all code examples .

https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-d...

Thanks

Lohi.