cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Supply function

Former Member
0 Kudos

Hi all,

I am having two views. I the first i am having StudentID , if i select the ID in the first view based on the selection corresponding details will be passed to second view as supply function.

But it is displaying the first value for all the ID's i am selection.Will the supply function called every time i am changing the selection or only for the first time....

Thanks and regards,

karthik

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi all ,

Thanks for all ur replies.

Finally i got the answer.

To call the supply function again and again, Set the "Life Span" property of a view to 'When-Visible'. This will end the view every time when u leave and create a new view session when returning.

Once again Thanks for all.

Thanks&Regards,

karthik.

Former Member
0 Kudos

Hi,

This method is called when the node is invalid and the collection is

requested. This may occur during any phase, even at the beginning to

initialize the node. The method is expected to fill the node

collection using IWDNode.bind(Collection) or

IWDNode.addElement(IWDNodeElement).

@param node the node that is to be filled

@param parentElement The element that this node is a child of. May be

null if there is none.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Karthi,

The supply function would be called everytime you make selection. Copy your supply function code if possible.

Warm Regards,

Murtuza

Former Member
0 Kudos

hi,

This is my code..

IPublicstudent.IStuNode modelNode = wdContext.nodeStu();

int size = modelNode.size();

for (int i = 0; i < size; i++)

{

IPublicstudent.IStuElement modelElement = modelNode.getStuElementAt (i);

String stuID = modelElement.getstudentid();

IWDNodeElement newElement = node.createElement();

newElement.setAttributeValue("StuID", Stuid);

node.addElement(newElement);

}

cardinality-->0..n

selection-->0..1

singleton-->true

Regards,

karthik.

Message was edited by:

karthi keyan

Former Member
0 Kudos

Hi Karthi,

Write this same code in the wdDoInit() method of the second view and see the output.

You are looping through the complete node so the current selection for the supply function doesn't make sense in your code that you have written down.

Warm Regards,

Murtuza

Former Member
0 Kudos

Hi Karthik,

Instead of looping thru the node, take the parent element,which will be available in supply function as parameter.get the Requisitionid from there directly.

regards

Sumit

Former Member
0 Kudos

Hi murtuza,

In my second view that UI element is inside a Tabstripe. I gave the coding inside that particular Tabstripes WdInit(), but it doesn't work.... Wher to give the code for Supply function.

Thanks & Regards,

Karthik.

Former Member
0 Kudos

Hi Karthi,

Now you can try one thing.

Create a button in the same first view and bind it to an action and then write the same code in that action and see what output does it give.

Warm Regards,

Murtuza

Former Member
0 Kudos

Hi,

WdContextException(line:709):Supplyfunction called redursively.

This is the error i am getting....

Regards,

karthik.

Former Member
0 Kudos

Hi Karthi,

For the time being remove that supply function and follow the procedure mentioned in the reply above. Also, let me know the output.

Regards,

Murtuza