cancel
Showing results for 
Search instead for 
Did you mean: 

Difference b/w WdInit() and WdModify()

Former Member
0 Kudos

Hi all,

what is the exact difference between WdInit() and WdModify() method.

Which method will be called first and when these methods will get called???

Where i have to bind the model object to the node???

What will happen if there are 2 users working on the same application simultaneously from differrent systems,how would the scenario work if i place my code in WdInit() method?

What if i bind the model object to the node in WdInit() method what would be the impact.

Please clarify the doubts so that i can implement in my application effectively.

Thanks and regards,

Chandrashekar.

Accepted Solutions (0)

Answers (5)

Answers (5)

nikhil_bose
Active Contributor
0 Kudos

what is the exact difference between WdInit() and WdModify() method.

wdInit()

- used to initialize objects

wdDoModifyView()

- static method

- used to Modify the current view during run-time

Which method will be called first and when these methods will get called???

- wdInit()

Where i have to bind the model object to the node???

- depends on business logic ( e.g: as invalidate(), refresh are needed )

What if i bind the model object to the node in WdInit() method what would be the impact.

- depends on logic ( it works first time for sure)

nikhiL

Former Member
0 Kudos

(1) difference between WDinit and WDmodify

When a view is displayed, WDinit is the first method that executes and mainly used to initiaize variables; we can set its property according to the view properties such as when-visible and framework-controlled

WDModify invokes every time, and through which we can get the UI elements and its properties used in the view.

WDinit is called at first.

You can bind the model object at WDInit, but you have to bind the nodes to view controller before that.

Regards

Vinod V

Former Member
0 Kudos

hi,

wdDoInit() and wdDoModify() both are hook methods.

wdDoInit() is called right at the beginning. This method is mainly used for initialisation purposes. It is called only once .

wdDoModify() method is only present in the view controller. This is called every time some changes are made in the view (say during dynamic programming). This method is called in reponse to events or actions.

To understand all the methods , wdDoInit(), wdDoModify , wdDoExit() better, refer to the following link

[http://help.sap.com/saphelp_nw70/helpdata/EN/45/c87f413e70010de10000000a1550b0/frameset.htm]

regards,

pinki

Former Member
0 Kudos

Hi,

what is the exact difference between WdInit() and WdModify() method.

WdInit and wdmodify are hook methods provided by wd framework. init is similar to a constructor and wdModify as similar to your service, that means init will be called only once and modify will be invoked in every round trip.

Which method will be called first and when these methods will get called???

Init will be called first and the rest is explained above.

Where i have to bind the model object to the node???

it depends on your business logic,ideally its good to have it once in the init.

What will happen if there are 2 users working on the same application simultaneously from differrent systems,how would the scenario work if i place my code in WdInit() method?

Hope you know the concept of sessions and the same is applied here too...

What if i bind the model object to the node in WdInit() method what would be the impact.

Their will not be any impact as such.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Is it that session managent is handles by the frame work or the developer has to handle it??

How to implement the sessions concept in webdynppro-java??

What is the differnecr between Framework_Controlled and When_Visible features of a view??

What will happen in the above 2 cases??/

Regards

ChandraShekar

Former Member
0 Kudos

Hi,

Is it that session managent is handles by the frame work or the developer has to handle it??

Controlled by the framework

How to implement the sessions concept in webdynppro-java??

No cookies, you can handle a bit using url

Regards

Ayyapparaj

Former Member
0 Kudos

HI

The difference between Framework_Controlled and When_Visible features of a view

Framework_Controlled is the life span of controller. The data in view will last up to the life of controller, no matter we may navigate how many views. Data will remain as it is.

When_Visible is the life span of view controller. The data will be displayed up to view is being displayed, Once you navigated to another view and come back, data will vanish.

Regards

Mandeep Virk

0 Kudos

hi,

init method will be called only once when screen is rendered first time and wdmodify will be called if any event is fired on the screen