on 05-18-2010 9:20 AM
i want to access data in a view to comp controller with out using UI element in View . how can i achive that sample code please
Hey!
Good solutions already provided above. I'll try to summarize what you can do there:
- Use context mapping from view controller to component controller (for required node) - mostly appreciated scenario. So, in code you will have ability to refer to this data using view controller's wdContext object.
wdContext
- Directly refer to component controller's context using component usage
wdThis.wdGet<controller_name>().wdGetContext();
- Use some "getters" controller's methods if you don't want to deal with context
wdThis.wdGet<controller_name>().<getter_method>();
Also, we can provide more information if you add more details regarding the problem.
Thanks, Mikhail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
1.I think u have write a method in the Component controller lets say A()
2.Lets write a bean class (contans getter and setter method )in the src folder of Navigator exlorer.
3.In the view create a object of that bean class and trying to call in view controller
syntax:wdthis.wdget<urcontrillername>.A();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaya,
Can you provide the more details of the problem or the scenario?
Regards,
Sukalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u want to access the data from a view from the controller, try doing a context binding between the view and controller. The value flows from view - controller and vice versa,
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if I want to chang useid.
public void wdDoInit()
{
//@@begin wdDoInit()
String usrid = "BEN.CHEN";
String werks = "";
Zben_Demo_Rfc_Input rfc = new Zben_Demo_Rfc_Input();
Zben_Demo_Rfc_Output back = new Zben_Demo_Rfc_Output();
back.setR_Matnr("1100");
rfc.setP_Matnr(usrid);
wdContext.nodeZben_Demo_Rfc_Input().bind(rfc);
try{
wdContext.nodeZben_Demo_Rfc_Input().currentZben_Demo_Rfc_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
werks = wdContext.nodeOutput().currentOutputElement().getR_Matnr();
werks = werks + "abc";
back.setR_Matnr(werks);
wdContext.nodeOutput().bind(back);
} catch (WDDynamicRFCExecuteException e) {
wdComponentAPI.getMessageManager().reportException("Error"+e.getMessage(),false);
}
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.