on 08-27-2007 10:18 AM
Hi all,
Can any one tell me what is the flow of control.
For EX-I have a view and a customcontroller.
If i run the projectt after deploying what will be displayed(i dont have any actins and buttons)
Is it possible to execute model in wdDoInit() od wdModifyView of either view or controller
Regards
padma
Hi Padma,
What exactly is ur requirement?? i didn't get the meaning of 'If i run the projectt after deploying what will be displayed" ..can u please elaborate??
U can execute the model in wdDoInit() method,it will work.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
This is the code in wdDoinit() method of customController
My contextStructure in both view and customcontroller is
Z_Plant_F4_Help_Input (MainNode)
Output(SubNode)
I_T001W(SubNode)---Werks,Name1(Attributes of I_T001W)
public void wdDoInit()
{
//@@begin wdDoInit()
Z_Plant_F4_Help_Input input=new Z_Plant_F4_Help_Input();
wdContext.nodeZ_Plant_F4_Help_Input().bind(input);
//Code for EVS
IWDAttributeInfo attInfo=wdContext.nodeI_T001W().getNodeInfo().getAttribute(IPrivateEvsView.II_T001WElement.WERKS);
ISimpleTypeModifiable WerksType = attInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = WerksType.getSVServices().getModifiableSimpleValueSet();
try
{
wdContext.currentZ_Plant_F4_Help_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
int n=wdContext.nodeI_T001W().size() ;
wdComponentAPI .getMessageManager().reportSuccess("size"+n);
for(int i=0;i<n;i++)
{
valueSet.put(wdContext.nodeI_T001W().getI_T001WElementAt(i).getName1(),
wdContext.nodeI_T001W().getI_T001WElementAt(i).getWerks());
}
Regards
Padma
Hi! Padma,
your code looks fine but since you are it's not giving you any output.i think you should try to Debug your code by putting some print statement inside your code and check the flow of your code.you can use following code for printing :--
MessageManager msgMgr = (MessageManager) wdThis.wdGetAPI).getComponent).getMessageManager();
msgMgr.reportWarning("your message");
enjoy,
sahu
Hi,
The custom controller in this case has not been instantiated. Add the custom controller as a required controller for the component controller. Then write this code in the wdDoInit() of the component controller.
IPublic<Custom Controller name>.IContextNode node = (IPublic<Custom Controller name>.IContextNode)wdThis.wdGet<Custom Controller name>().wdGetAPI().getContext().getRootNode();
Regards,
Satyajit.
Hi Padma,
Please check the below links for the detailed explanation of your query.
Programming UI and Navigation
Webdynpro for Java
http://help.sap.com/saphelp_nw2004s/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm
Hope that will help.
thanks and regards
Anil
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
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.