cancel
Showing results for 
Search instead for 
Did you mean: 

how to bind context to a table?

Former Member
0 Kudos

I have a method which fills the context with data (only a recnr), and I want to show it in a table.

If I call this method from wdDoInit the table is filled properly, but if I call that very same method it from a button-click the table remains empty...

What am i missing?

public void VulLijst( )

{

//@@begin VulLijst()

IPrivateEenLijstView.ILijstDataElement aRecord;

for (int i = 1; i < 500000; i++) {

aRecord = wdContext.createLijstDataElement();

aRecord.setId(i);

wdContext.nodeLijstData().addElement(aRecord);

}

//@@end

}

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jan,

Please check whether you have assigned the correct action in Button UI element.And inside that action you have called VulLijst( )

Regards,

Rajeev Ranjan

Former Member
0 Kudos

right.... I mixed up my actions...:(

BTW, is there any PDF containing a WebDynpro reference with all objects/methods and a description of them?

Former Member
0 Kudos

I think NO.

The best way to learn is to use "Code Completion" feature ( when you put a "." and press CTRL+SPACEBAR) in the implementation.

If u want reference, click here

http://help.sap.com/saphelp_nw04/helpdata/en/5c/1b76bc3da0504e8b535cf3e154eaa7/content.htm

Regards

Ananda

Former Member
0 Kudos

There is the Help portal help.sap.com, the Javadoc, SDN, the book "Inside Web Dynpro for Java" etc.

Armin

Former Member
0 Kudos

>>BTW, is there any PDF containing a WebDynpro reference with all objects/methods and a description of them?

you can use API documentation

https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html

Former Member
0 Kudos

Please post the code inside your action handler. Have you assigned the action to the Button.onAction event?

Invalidate() is not needed here.

Armin

Former Member
0 Kudos

But...

if I do this:

ILijstDataNode lijst = wdContext.nodeLijstData();

int n = lijst.size();

for (int i = n-1; i>=0; i--) {

lijst.removeElement(lijst.getElementAt(i));

}

nothing happens...

SORRY, Again wrong. This works perfect! Posted to early..

Message was edited by: Jan van Veldhuizen

Message was edited by: Jan van Veldhuizen

Former Member
0 Kudos

Hi Jan

Add

wdContext.nodeLijstData().invalidate();

in a separate method and call that method also after VulLijst( ) - which does the refresh of the node.

Hope this helps

Post if not solved

Regards

Ananda