on 09-11-2007 6:43 AM
can anybody explain use of suppy functions and their implementation process.
thanks
Hi Reena..
<u><b>Supply Function</b></u>
Supply functions are the mechanism to repopulate child nodes when the lead selection in the parent node changes. When a singleton child node is declared, you must also write an accompanying supply function. The Web Dynpro Framework will then automatically call your supply function when the Lead selection in the parent node changes.
<u><b>Use of Supply function:</b></u>
Supplies values to child node, according to the leadselected parent element.(For which you have to code).
For Example,
1.Consider a Parent Node <b>Details</b> having Child Node <b>PersonalDetails</b>
2.In this, You have to pass Values from PersonalDetails node to the Details node at run time.
3.So you have to Write Supply Function in the PersonalDetails node.
4.In the Preperty of PersonalDetails Node, you have to Select,
Supply Function and have to Give Name..
5.After you have to write the Function as per your coding, in the Supply Function.
4. Suppose, u have to select and display the details of a particular Value at run time from a table, u need to write the follwing..
<u><b>First Declare in doinit()</b></u>
<i>doInit()
{
String name[]={"SathishKumar GS","Praveen","Satish SV"};
for(int i=0;i<10;i++)
{
IPrivateView1.IDetailsElement ele=wdContext.nodeDetails().createDetailsElement();
ele.setName(name<i>);
wdContext.nodeDetails().addElement(ele);
}</i>
<u><b>In Supply Function u have to write</b></u>
SupplyFunction()
{
if(parentElement.getName().equalsIgnoreCase("SathishKumar GS"))
{
IPrivateView1.IPersonalDetailsElement ele=wdContext.nodePersonalDetails().createPersonalDetailsElement();
ele.setAge("23");
ele.setNO("10059");
wdContext.nodePersonalDetails().addElement(ele);
}
else if(parentElement.getName().equalsIgnoreCase("Satish SV"))
{
IPrivateView1.IPersonalDetailsElement ele=wdContext.nodePersonalDetails().createPersonalDetailsElement();
ele.setAge("24");
ele.setNO("10056");
wdContext.nodePersonalDetails().addElement(ele);
}
else if(parentElement.getName().equalsIgnoreCase("Praveen"))
{
IPrivateView1.IPersonalDetailsElement ele=wdContext.nodePersonalDetails().createPersonalDetailsElement();
ele.setAge("24");
ele.setNO("10063");
wdContext.nodePersonalDetails().addElement(ele);
}
By using this , You can select the particular instance by using one instance at a time. This will be reducing the memory.
Refer <b>JA310 Java WebDynpro Basics Document</b>, Page 120. For explanation with example.
Hope this will helpful for u.,.
Regards,
GS
Message was edited by:
Sathishkumar GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Reena
http://help.sap.com/saphelp_nw04/helpdata/en/03/96384162316532e10000000a1550b0/frameset.htm
/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
'Supply Functions' are used to supply vales to the child node, whose parent node's singleton property is set to 'true'.
A singleton child node can have only one instance at run time, the supply function provides the vale to that child node, according to parents leadselection.
The supply function will be called whenever the parent's leadselection changes.
regards,
Prabhakar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<i>Lead Selection:</i>A nodes element collection can be accessed using a zero based index value. It is possible to flag multiple elements as being selected (controlled by the selection cardinality property), but only one of the selected elements can be processed at any one time. The element being processed is referred to as the lead selected element.
<i>Supply Function:</i>Supply functions are the mechanism to repopulate child nodes when the lead selection in the parent node changes. When a singleton child node is declared, you must also write an accompanying supply function. The Web Dynpro Framework will then automatically call your supply function when the lead selection in the parent node changes.
<i>Relation Between singleton and supply function:</i>The supply function will be called even if singleton is true or false.
The state of singleton property doesn't affect calling of supply function.
Use of Singleton=true :
When singleton is true, there will be only one child node instance for whole parent node. Hence, saving memory.
<i>Use of Supply function:</i>Supplies values to child node, according to the leadselected parent element.(For which you have to code).
Refer JA310 Java WebDynpro Basics Document, Page 120. For explanation with example.
Also Check the following links
http://help.sap.com/saphelp_nw04/helpdata/en/03/96384162316532e10000000a1550b0/frameset.htm
/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro
Regards
Abhijith YS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The supply function can be used to fill values for a context node only when they are actually needed. For example, instead of creating a collection with values and binding it to the node, the programmer specifies the collection by describing the function to be called by the Web Dynpro runtime environment
http://help.sap.com/saphelp_nw04/helpdata/en/03/96384162316532e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/86/7fcf3d4f902d10e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d6/078aa26b73fb47b43d9330f1a207cf/frameset.htm
/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro
Kanwalpreet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.