on 12-19-2005 4:22 AM
Hi,
Does anyone know of a way to display preformatted HTML via web dynpro, can any of the standard UI elements do this?
Thanks in advance,
Simon
Hi,
can you explain what do you mean by HTML string? is it binary data that you have?
if it is a binary data i.e. in bytes then you can do this way also..
Store the binary data in a context varaible named Data and to store the url to be generated, create another context variable Url;
String formattedStr = wdContext.currentContextElement()
.getData();
try
{
IWDCachedWebResource resource = WDWebResource.getWebResource
(
formattedStr.getBytes("UTF-8"),
WDWebResourceType.HTML
);
resource.setResourceName("<Give a filename>");
resource.setAttachement( false );
resource.setReadOnce( false );
wdContext.currentContextElement().setUrl
(
resource.getAbsoluteURL()
);
}
catch (Exception ex)
{
wdComponentAPI.getMessageManager()
.reportException( ex.getMessage, false );
}
Set source of the Iframe as context variable Url.
regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Simon,
Please check my weblog entry dedicated to this issue:
/people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both for your answers.
I think this will solve the problem until a more suitable control is available.
Valery, can you tell me how long the resource object (of type IWDCachedWebResource) you create persists for and if it only exists in memory during runtime or if it persists longer?
BRgds,
Simon
Simon,
The life-time of such resources definitely does not exceed application life time (you may test this with sample in blog). Probably, even shorter -- something like life time of controller, that declare Resource attribute in context.
Also it seems that resources are stored in secondary file system cache and do not "eat" much memory
Sorry, statements above are just a guess work, API docs lacking exact description of behavior.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.