cancel
Showing results for 
Search instead for 
Did you mean: 

wdmodify view

Former Member
0 Kudos

Hi

can u please expalin me the use of wdmodify view method, in which scenarios we write code in this method

thanks

kishore

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kishore,

As per method calling in WebDynpro always Doinit() calls for first time so all the initial setting need to done in this method, but if you want to do setting after an action on your page/view you need to code at the wdModify().

Coz on each and every action on view,WdModify method called every time.

for example suppose you want to set visibility of an UI e.g. two buttons and first time 1st button is enable but 2nd is disable and after action of first button you want to enable the 2nd one at that time you need to write code at the Wdmodify for the 2nd button.

Note:- for each and every action in you view,wdmodify will call every time.

Hope that may help you.

Regards,

Deepak

Edited by: Deepak Arora on Jun 18, 2008 7:55 AM

Answers (8)

Answers (8)

Former Member
0 Kudos

closed

Former Member
0 Kudos

Before asking such general questions: please read the available documentation, e-learning etc.

Armin

Former Member
0 Kudos

ok armin

Former Member
0 Kudos

Kishore,

wdmodifyview is having some special features over other methods,

  • The method is called each time, after an event triggers; using the variable, firsttime of type boolean its possible to find that that method is called first time or many times.

  • Main purpose; using this its possible to create/access UI elements, create/handle Events and contexts in WebDynpro; also possible to get and set the properties.

  • Since Dynamic programming is the base of WebDynpro, its important that dynamic programming can be only done inside wdmodifyview .

Regards

Vinod V

srinivas_sistu
Active Contributor
0 Kudos

Hi Kishore,

In WDJava, hope the method names are self explanatory.

Like your wdDoInIt().... saying it is a WebDynpro(WD) method which will be called at the time of IniTilization (InIt()).....

Similarly

WdDoModifyView().... saying it is a WebDynpro(WD) method, which will be called when ever a Modification(Modify) has occured in the View....

This modification can be of any time, like an action performed, an event occured, when your view is called, view is initilized(first DoInIt() and then DoModify() will be called)....

The best way to know which method is called when and in what order is to place a timestmap in your methods.

i.e., write a

MessageManager.ReportSuccess("From Method Name called at>>>"+System.CurrentTimeMillis());

This will give you a clear Idead. Just try this......

Regards,

Srinivas.

Former Member
0 Kudos

HI Kishore,

Best use of wdModifyView() is to dynamically handle data,events and UI elements.

Venkat.

Former Member
0 Kudos

Hi,

WdModify is called when ever some modification (action or events) happen on the iview . This is generaly useful for the dynamic generation of UIs and UI data .

Thanks,

Tony.

Former Member
0 Kudos

Hi,

WdModify method will be called evevry time when the view is called in the application.Genaerally code for

1)Clearing the context data

2)Refreshing the view

will be written in that method

Regards

Padma N

Former Member
0 Kudos

Hi,

wdmodifyview() method would always be called when u perform

any action in ur screen(button clicking row select etc).

During screen initialisation it would be called after init() method.

Lets say u have some code in ur init() method which u want

should always be executed when ur screen loads.This works

fine when ur application contains only one screen.But when ur

application contains multiple screen then when u navigate from

a screen and then comes back to the same screen at this

time ur init() wont be called for the current screen and u wont

be able to see effect of code written in init().In this case u must

write ur code in wdDoModifyView with some proper flag values

It is the only method in which the programmer is allowed direct

access to the UI element objects themselves.


public static void wdDoModifyView(IPrivate{nv} wdThis,
IPrivate{nv}.IContextNode wdContext,
IWDView view,
boolean firstTime) {
//@@begin wdDoModifyView
//@@end
}

The firstTime parameter is a boolean value that lets you know

if the screen is being rendered for the very first time, or re-

rendered in response to an Action event.

Regards

Surender Dahiya