cancel
Showing results for 
Search instead for 
Did you mean: 

ADOBE Form Using Table with dynamic number of rows

Former Member
0 Kudos

Hi All

First some information about our infrastructure:

- AdobeDesigner 7.1 in the Developerstudio

- SAP-Portal 7.0 SP15

I have a View with tabstrips and behind the tabs i have defined an event. On one Tab I included a ADOBE-Form with Table. The Data for the PDF sould only filled in the context for the Form when i jump to this Tab. I created the Form by using this documentation [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669].

To fill the tablecontext I use the following Code:

IPrivateAnlegenBANFView.IPositionenElement position = null;

IPrivateAnlegenBANFView.IPositionenNode posNode = wdContext.nodePositionen();

int NUM_5_TIMES = 5;

for (int i = 0; i < NUM_5_TIMES; i) {

IPrivateAnlegenBANFView.IPositionenElement posElement = wdContext.createPositionenElement();

+posElement.setMaterial("" + i);+

+posElement.setKurztext("Test" + i);+

+posElement.setWarengruppe("Warengr" + i);+

posNode.addElement(posElement);

}

If i put this code in the wdDoInit method it works fine and shows me 5 Rows. But if I put the code in the Action of the tabstrip it shows me only one row. I checked the entries of the context and there are 5 entries (showed them in a WD-Table).

Can someone tell me what im doing wrong?

Thanks for a answer and kind regards

Pascal

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi All

finally i found the solution for the problem.

When you define the interactive Form in the view do not define the property "dataSource" of UI-Element Interactive Form it seems, that the binding is static and not dynamic.

Add the following source to the viewCotroller

Global Part of the Source:

private static IWDInteractiveForm form = null;

Method wdDoModify:

if (firstTime) {

form = (IWDInteractiveForm) view.getElement("InteractiveForm");

}

When you have an Event where you fill your Contextnode which you want to display in the table of an Adobe Form Use this code:

Action:

public void onActionFillTab(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent ){

//@@begin onActionFillTab(ServerEvent)

/**

* Code to fill the Node for AdobeForm Table

*/

form.bindDataSource(wdContext.nodeTabelle().getNodeInfo());

//@@end

If you want to clear your table and show it directly use in the action the following code:

wdContext.nodeTabelle().invalidate();

form.bindDataSource(wdContext.nodeTabelle().getNodeInfo());

Kind regards

pascal

Former Member
0 Kudos

HI Reema

Of course it has. what I mean. Here I have the same effect. if i fill the date at firsttime, then it works, and if I want to fill the data as you have wirtten, it displays only one row.

kind regards

pascal

Former Member
0 Kudos

HI Reema

I have the same effect. if i put the cod in the wdModifyView.

coud it be, that the source that you showed me is ABAP? If yes can it be that in Java (my WD is written in Java) works different then in ABAP?

kind regards

pascal

former_member189058
Active Contributor
0 Kudos

doesn't wd java do modify have an input parameter for first_time. I guess it does.

basically what I mean is to call the data retreival code, only when you click on the tab.

I have an app in WD4A with a tabstrip There are two tabs containing adobe forms. One in a view containe and the other directly in the tab content.

Both are working fine.

Reema

Former Member
0 Kudos

Hi Ashutosh

I changed it but it makes no diffrence.

kind regards

pascal

Former Member
0 Kudos

Hi Ashutosh

The Datasource is bound like in the excample of the Document I included in the message. Is there something wrong?

kind regards

pascal

former_member185029
Active Contributor
0 Kudos

Hi,

Sorry I mis-interpretated the question.

Just a question, what is the displayType for the ADOBE form?

Please check that it is set to native.

-Ashutosh

former_member189058
Active Contributor
0 Kudos

Hi Pascal,

Create a View Container and embedd that in the tab that has you adobe form.

Create another view and embed the interactive Form UI element in the new view, say adobe_view.

Create Context etc on adobe_view.

Write the code to retrieve data on the WDDOMODIFYVIEW of the adobe_view

if first_time = false.

retrieve data for adobe

endif.

Alternately, keep the form as it is...

create a context attribute 'SHOW_ADOBE' of type wdy_boolean.

when you click on the adobe form tab, set SHOW_ADOBE to true.

In the WDDOMODIFYVIEW,

if first_time = false and show_adobe = true.

retrieve data for adobe

endif.

Regards,

Reema.

Hope this helps you solve your problem.

Do post back!!!

Edited by: Reema Shahbazkar on Sep 19, 2008 8:30 PM

former_member185029
Active Contributor
0 Kudos

Hi Pascal,

Looks like the datasource for the table UI is not set properly.

Can you please check it and revert?

-Ashutosh