Skip to Content
avatar image
Former Member

Wrapping long blocks of text causes text to repeat

I have a Java WebDynpro form which has multiple text fields that can be quite long. The containing sub-form and text fields have been set to expand to fit vertically. As well, the text field has been configured to allow multiple lines.

However, when the text field contains a large amount of text that causes the content to wrap over to the next page, the beginning of the field contents are presented again, and the end of the content is truncated.

Perhaps an example will better illustrate my problem. Imagine a text field with the following content:

1. This is a line

2. This is a line

...

64. This is a line.

So, 64 lines of text in total.

When the form is printed, the first page prints the following lines (since the output starts over 1/2 way down the page):

1. This is a line

2. This is a line

...

18. This is a line.

The end of page is reached, with the text field continuing as follows:

1. This is a line

2. This is a line

..

48. This is a line.

And then the document continues with the next section. This occurs with each text field that has a large amount of text in it, which destroys the printed document due to the repetition and absence of content.

Is this a bug, or a side effect of the way the document is created?

We're on NW 7.0 SP17.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 30, 2010 at 12:33 AM

    This is not an issue. It is working fine for me.

    Can you check the "Allow page break with in the content" for the text field and test it?

    Thanks,

    Chandra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 03, 2010 at 04:11 PM

    Solution found. You need to add this to wdModifyView in the view which owns the form:

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

    IWDPDFDocumentInteractiveFormHandler iFormHandler = WDPDFDocumentFactory.getDocumentHandler(wdThis.wdGetAPI(), iForm.getId());

    IWDPDFDocumentInteractiveFormContext iFormContext = iFormHandler.getDocumentContext();

    iFormContext.setDynamic(true); // This is the magic incantation that solves the problem

    Of course, substitute your form id for "InteractiveForm".

    Note that unlike modifying view elements only the first time the view is loaded, this must be done each time there's a cilent/server round trip. So, do not do this:

    if( firstTime ) {

    // insert code above

    }

    This will literally only work the first time the view is loaded. So don't do it 😊

    Add comment
    10|10000 characters needed characters exceeded