cancel
Showing results for 
Search instead for 
Did you mean: 

wdDoModifyView is not called before first action is fired

Former Member
0 Kudos

Hi,

recently all works fine, but now wdDoModifyView is not called before first action is fired (tested in debugging mode). I have a parameter mapping in wdDoModifyView, so I get a problem in the event that uses the mapped parameter. If I first fire another event, wdDoModifyView is called and the then the other event is working too.

Any ideas?

Regards

Roman

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Maybe there occurs some exception that causes the phase model to skip modify view phase?

Armin

Former Member
0 Kudos

I can not find any exceptions that could stop the phase model.

The appliction should go productive on friday. I urgently need a workaround, what can I do? Can I access com.sap.tc.webdynpro.progmodel.api.IWDView view from outside wdDoModifyView?

Former Member
0 Kudos

Hi,

The hook method wdDoModifyView() will be called only when

an event raised in View. wdDoInit() method will be called once

for a View and the first one also .. So, put your parameter mapping and event raising in wdDoInit() method.

Regards

LakshmiNarayana

Former Member
0 Kudos

The hook method wdDoModifyView() will be called only when

an event raised in View. wdDoInit() method will be called once

for a View and the first one also .. So, put your parameter mapping and event raising in wdDoInit() method.

for parameter mapping I have to access the view, so I can only do it in wdDoModifyView...

furthermore, recently it works...

Edited by: Roman Götte on May 9, 2008 10:56 AM

Former Member
0 Kudos

That's nonsense. Parameter mapping statements can only be placed in wdDoModifyView() or static methods called from there.

Armin

Former Member
0 Kudos

Hi,

It seems that you are some how violationg the phase model.

Can you post the code?

Regards

Ayyapparaj

Former Member
0 Kudos

  public static void wdDoModifyView(IPrivateDateNaviView wdThis, IPrivateDateNaviView.IContextNode
wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView
	if (firstTime) {
		// Parameter-Mapping für dayselect im DateNavigator
		IWDDateNavigator dateNavi = (IWDDateNavigator) view.getElement("DateNavigator");
		dateNavi.mappingOfOnDaySelect().addSourceMapping("day", "datum");
	}
    //@@end
  }

Event that uses the mapped parameter:


public void onActionDaySelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.sql.Date datum )
  {
    //@@begin onActionDaySelect(ServerEvent)
...
//@@end
  }

Edited by: Roman Götte on May 9, 2008 10:57 AM

Former Member
0 Kudos

Hi,,

it looks strange, was their any patches/updates to your WAS?

Regards

Ayyapparaj

Former Member
0 Kudos

it looks strange, was their any patches/updates to your WAS?

not to my knowledge.

Do you have any workarounds?

I tried to call an empty action in wdDoInit(), but that doesn´t help.

Former Member
0 Kudos

Hi,

Just to make sure the wdModify is getting called or not , pl try to create a ui element and add this to the root container.

Regards

Ayyapparaj

Former Member
0 Kudos

I tried the following:


public static void wdDoModifyView(IPrivateDateNaviView wdThis, IPrivateDateNaviView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
  {
    //@@begin wdDoModifyView
	if (firstTime) {
		// Parameter-Mapping für dayselect im DateNavigator
		IWDDateNavigator dateNavi = (IWDDateNavigator) view.getElement("DateNavigator");
		dateNavi.mappingOfOnDaySelect().addSourceMapping("day", "datum");
		
		IWDTransparentContainer tCont = (IWDTransparentContainer)view.getRootElement();
		IWDTextView textView2 = (IWDTextView)view.createElement(IWDTextView.class, "2312dsasfd");
		textView2.setDesign(WDTextViewDesign.EMPHASIZED);
		textView2.setEnabled(true);
		textView2.setText("test");
		tCont.addChild(textView2);
	}
    //@@end
  }

same result:

The textview "test" is not displayed before first event is fired.

Former Member
0 Kudos

The ID of the text view is invalid, it starts with a digit. Better use the debugger to find out if code is executed properly.

Armin

Former Member
0 Kudos

I used the debugger and wdDoModifyView is not executed berfore first action is fired...

Former Member
0 Kudos

Sounds strange. What is the lifecycle of the view (when visible, framework-controlled)? Is the view part of the view assembly at all?

Armin

Former Member
0 Kudos

The view is embedded in a viewContainerUIElement that is part of another view. Lifespan is framework-controlled and it is always visible.

I didn´t change the structure of the view assembly and as aforementioned recently it works as it should.

As I can see in debug mode none of the wdDoModifyView methods of any view controller is called at first load. All other wdDoModifyView methods are empty, so that is no further problem. Where should I search for problems? I can not find the error.

Edited by: Roman Götte on May 16, 2008 8:33 AM

Edited by: Roman Götte on May 16, 2008 8:40 AM

Former Member
0 Kudos

Open an OSS message (BC-WD-JAV-RUN).

Armin