Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-220

InsertText should accept java.io.Reader in addition to String

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.1
    • 4.2
    • Framework
    • None

    Description

      In order to display a relatively big text file from a database its entire content has to be stored in a String before it can be passed to the InsertText component. This is a waste of time and memory.

      To solve this problem the InsertText component should accept a java.io.Reader in addition to a String. Then all the user has to do is create an InputStreamReader and pass it to the component directly.

      I have applied a patch for Tapestry 3.0.1. It changes to type of the parameter value from String to Object and performs a runtime test to see if it is a String or a Reader. Of course an additional parameter could be used if this is not desired.

      Attachments

        1. inserttext.patch
          3 kB
          Markus Wiederkehr

        Activity

          People

            Unassigned Unassigned
            wmax Markus Wiederkehr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: