Skip to Content
0
Former Member
Dec 03, 2008 at 03:09 PM

What is the better way to pass input parameters between components?

20 Views

Hi all,

I had a dispute with a colleague about passing data between different WDP Development Components. The situation is like this:

Colleague has a SearchWDP (parent) und I have a BrowseWDP (child). After searching for some objects and clicking a hit in the SearchWDP, the corresponding details should be shown in BrowseWDP, via passing a bunch of parameters such as selected item's id, etc.

Now which of the following is the better practice:

- Defining a node in BrowseWDP (child) with isInputParameter set to TRUE, creating a similar node from the same type (simply via ModelBinding, both WDPs are using the same model) in SearchWDP, and defining a mapping between them so that SearchWDP fills the input nodes. From BrowserWDPs perspective, I'd call this Pull method.

or...

- Defining a node in BrowseWDP (child) with isInputParameter set to FALSE, creating a setter method in BrowseWDP Interface Controller for the collection (to be passed as parameters) and calling a wdContext.nodeBlaBla().bind(pInputParameterFromModelType). From BrowserWDPs perspective, I'd call this Push method.

The colleague's argumentation in favor of Push has not convinced me at all and I'd like to ask your opinions. Is there a best practice or recommendation for this scenario? TIA

ps: Any answer will be rewarded.