cancel
Showing results for 
Search instead for 
Did you mean: 

What is the sequence of flow of control in Webdynpro java

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Sumith,

i wrote wdContext.nodeZ_Plants().modelObject().execute() in wdDoinit() method od the customController.But it is not getting executed

Can u plz tell me y??

Regards

Padma

Former Member
0 Kudos

Hi Padma,

Are u getting any exception??if yes send me the stack trace..if no then send the code please what u r writing in wdDoInit() method.

regards

Sumit

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Padma,

I don't see any problem in the code...what's the size it printing??

regards

Sumit

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Padma,

Please check the below links for the detailed explanation of your query.

Programming UI and Navigation

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec3...

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