on 05-09-2008 9:45 AM
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
Maybe there occurs some exception that causes the phase model to skip modify view phase?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi,
It seems that you are some how violationg the phase model.
Can you post the code?
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.