Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what to do re appending field value to document  RSS feed

 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i wish to create a class which uses a method that appends the value of a fieldname as the document title when it retrieves a document.

has anyone done something similar that they can give me some coding examples or point me to this ?

cheers

chris
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of document?
 
Chris Davies
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

Its a document within a document managment system. there is an existing method which exists in a BlobBean class within the custom built j2ee front end - getBlobURL - which returns the Blob (its a word document with a doc extension)

but it adds the records primary key as the filename, heres an excert from the applications javadoc on the getBlobURL method

getBlobURL
public java.lang.String getBlobURL()
throws java.sql.SQLException
Returns an URL to download the blob (the physical text portion of the text stream) for the current record. This URL will have an extra path info element added after the action. This extra element will serve as the download filename. The record's primary key will be used as the filename, with unsafe characters removed, unless there are no characters left after removing the unsafe ones, in which case the name "download" will be used. If the view has a field named MIMETYPE, or if the view has a field with usage MIMETYPE, or if the Webtop configuration file has an entry for default-download-ext which applies to the current view, in the preceding order, an extension will be added to the filename. In the first two cases, the mime.types file will be used to look up a file extension for the mimetype. In the last case, the configured extension will be used.
The result set should be positioned on a record before calling this method.

Returns:
an URL to download the BLOB for the current record
Throws:
java.sql.SQLException - if a database error occurs
See Also:
Blob


what i wish to do is have each record append the surname of the individual rather than the primary key, which to me involves retrieving the value of the surname field but i'm a bit perplexed as to how to achive this.

cheers

chris

[ edited to change code block to quote block and break really long line -ds ]
[ August 06, 2004: Message edited by: Dirk Schreckmann ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!