Display HTML in Web DynPro Java View

Hi,
I have a data in HTML code. It is a full HTML code with the body, head, html.... Now in my Web DynPro i have a section whereby it displayed the message that store in the database table. In that column store all the HTML code. So now in my Web DynPro im using a TextEdit to display the message. It will showed all the HTML code in the TextEdit.
For example
<html>
<head>
</head>
<body>
<p>Testing</p>
</body>
</html>
Is it possible in Web DynPro to display the HTML just like a webpage? As it will convert the HTML code to a readable format.
Thanks.

Hi Adrian,
In case you have formatted text that you wish to be rendered on a Web Dynpro view (but not shown as is) then you should use the FormattedTextView UI element.
Follow these steps:
1. Insert a FormattedTextView element in your view.
2. To define the content of the FormattedTextView, select the text property of your FormattedTextView element and bind the text property to the context attribute which has your HTML content
When the application is run,  the HTML will be shown as a web page.
Event onAction is triggered when the user clicks on a link (<a> tag) inside the FormattedTextView. The parameter contains the href attribute of the triggered link.
The TextEdit UI element will not serve your pupose. Hope this helps.
Best Regards,
Supriya

Similar Messages

  • UWL : Web Dynpro (Java) View

    Hi All,
    I'm new in development/configuration of UWL. Some requirements I already could realize. But now I'm I need to implement a totally new inputfield to the task creation and some business logic behind some actions e.g. an already filled out assignment to a portal group if a task type is selected.
    The only way I see is to re-create and customize the development components from the server node. Please, could you give me some hints to solve this issue in an easier way?
    Thank you !!!!!
    Laslo

    Hello Saar,
    Thanks for reply.
    I have already referred & seen these links and they doesn't suit to my problem.
    Below link from your suggestion talks about custom UWL Connectors, which is not the case with me. I have a SAP Standard AlertConnector.
    And code extract I mentioned in my question is already working fine and able to retrieve workitems from other connectors, except this AlertConnector and that's the problem.
    http://help.sap.com/javadocs/nwce/ce71/uw/uwl%20custom%20connector%20api.pdf
    Also, I couldn't get clear idea from javadocs about how to read workitems from "AlertConnector".
    Issue:
    I have created a Web Dynpro Java DC that renders custom view for Portal UWL.
    I am using UWL API to read workitems from various connectors. This is working fine so far.
    Now I created a AlertConnector and alerts are appearing in SAP standard UWL view under "Alerts" tab, but they don't appear in my custom UWL application.
    Is there any special way to read "alerts" from UWL API?
    Following is code extract that I use currently: -
    UWLView uwlView = uwlService.getViewManager(uwlContext).getView("DefaultView", uwlContext);
    IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
    QueryResult queryResult = itemManager.getItemsForView(uwlContext, uwlView, null, mycompoundExpression);
    ItemCollection results = queryResult.getItems();

  • Display sapscript form in Web Dynpro Java

    Hi,
    Is it possible to print an existing sapscript form i.e. PO from ECC to my Web Dynpro application? I have successfully created a Web Dynpro Java application to create POs but now have a requirement to display or print the PO?
    Can someone provide me with a sample code? I'm hoping to be able to do this without using Adobe.
    Again, thanks for all your help.
    Best regards,
    Jaypee

    Hi mark,
    Without Adobe also u can display PO order.
    Below is the code to open a HTML window from WDJava, with data from WDJava...
    Inside DoInit()
    IWDAttributeInfo attr1 =
    wdContext.getNodeInfo().getAttribute("htmlfile");
    ISimpleTypeModifiable mtype1 = attr1.getModifiableSimpleType();
    IWDModifiableBinaryType btype1 = (IWDModifiableBinaryType) mtype1;
    btype.setFileName(attr.getName() + ".html");
    btype.setMimeType(WDWebResourceType.HTML);
    _contentType = mtype;
    Where htmlfile is a context attribute of type binary... and do a global declaration like this
    ISimpleTypeModifiable _contentType = null; (This declaration can be done at the end of your view's coding between Begin Others and End Others)
    Now,
    inside on action print
    public void onActionPrintData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String videoName )
    //@@begin onActiondisplayVideo(ServerEvent)
    byte[] content = new byte4028;
    try {
    content = this.displayPrint().getBytes("UTF-8");
    wdContext.currentContextElement().setHtmlfile(content);
    wdContext.currentPrintElement().setAttrUrl(
    _contentType.format(content));
    //Where content is loaded with data from displayPrint() method, which is holding the HTML *page to be displayed to the user *
    IWDWindow win =
    wdThis
    .wdGetAPI()
    .getComponent()
    .getWindowManager()
    .createNonModalExternalWindow(WDWebResource
    .getWebResource(content, WDWebResourceType.HTML)
    .getURL(),"ShowVideo");
    win.setWindowSize(445,460);
    win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    win.removeWindowFeature(WDWindowFeature.MENU_BAR);
    //win.open();
    win.show();
    // wdComponentAPI.getMessageManager().reportSuccess("444444444444");
    } catch (Exception e) {
    wdComponentAPI.getMessageManager().reportException ("Unable to open window"+e,false);
    //@@end
    Now finally, design your HTML Page inside the method displayPrint() like this
    public java.lang.String displayPrint( java.lang.String strVideoName )
    //@@begin displayPrint()
    String htmlcontent=null;
    htmlcontent="content what you want to show in print window";
    use script inside the html content to do a print... like window.print();
    return htmlcontent;
    //@@end
    Regards,
    Sunaina Reddy T

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • How to display smartform as PDF in web dynpro java

    Hi,
    Where can I find sample program to display smartform as PDF in web dynpro java.
    Thanks.
    Regards,
    Henry

    1. Create a smart form in the R/3 side
    2. Now create a function module with the corresponding export parameter:
    3. Make sure that the function module is marked remote enabled. 
    4. In NWDS  create an Adaptive RFC model which points to the FM created in R/3 under the webdynpro application
    5. Now create an application and view inside it to display the PDF and Insert a frame inside the view
    6. Create a  value node and an attribute say url of type string inside that node and bind it to the source
    7. In the doInit() method place the following code
    >    ZTest_Pdf_1_Input input = new ZTest_Pdf_Input();
    >    wdContext.nodeZTest_Pdf_Input().bind(input);      
    >    try {                       
    >            wdContext.currentZTest_Pdf_InputElement().modelObject().execute();
    >            }
    >  catch (Exception e) {
    >                        e.printStackTrace();
    >            }          
    >  wdContext.currentInternalElement().setUrl(convert(wdContext.currentOutputElement().getBin_File()));       
    Inside that view create a method to convert the string to url so that it can be passed as a string to the setUrl method of the currentContextElement() , say convet(byte[] doc_content) which return a string.
    Inside that methos write the following code,
    >         String url = "";
    >           WDWebResourceType webResType = WDWebResourceType.PDF;
    >            IWDWebResource webResource = WDWebResource.getWebResource(doc_content, webResType);
    >            try {
    >                        url = webResource.getURL();
    >            }
    >  catch (Exception e) {
    >                        e.printStackTrace();
    >            }          
    >            return url;
    Hope It will be helpful
    Regards,
    Sam Charles J.

  • Display Pre-Formatted HTML via Web Dynpro

    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

  • Web Dynpro List Viewer for JAVA ?

    Is the Web Dynpro List Viewer available for Web Dynpro for JAVA?
    The Release Notes of SAP NetWeaver 2004s about this topic are not totally clear for me.
    It is always talked about Web Dynpro List Viewer for Web Dynpro in general. For more information there is only a link to the topic ALV Integration into the Web Dynpro ABAP.
    I suppose, it is only available for ABAP. Am I right?

    Hi Gayathri,
    I just have that scenario in my mind, and certainly it's the purpose that i need to implement. However i'm tried to use only standard applications, but maybe this case  it's a exceptional case
    Best Regards,
    Luís Bento
    PS: I give you some points for your answer

  • InteractiveForm UI Element in Web Dynpro Java - Image not displayed on form

    Hello Experts,
    Using: NetWeaver Developer Studio 7.0.1_06; Adobe Livecycle Designer 8.1.
    I have an image "image.png" in my src/mimes/components/com.mm.InteractiveFormComp folder within my web dynpro java project.
    I load the image into my context in wdDoInit method in the comp controller:
    wdContext.currentContextElement().setImage("image.png");
    In the interactiveform I have an ImageField on the form and have set its properties as follows:
    Field - URL = http:[host]:[port]/webdynpro/dispatcher/InteractiveFormComp/src/mimes/components/com.mm.InteractiveFormComp/image.png
    Field - Embed Image Data = "checked"
    Binding - Default Binding = Image
    However, no image ever shows up on the form. I have also been through many threads in the forums but havent found a solution. Can anyone please assist me?
    Regards,
    MM.

    Hello,
    I tried using jpg and bmp. Didn't work.
    Any other suggestions?
    Regards,
    MM
    Solved it!
    Edited by: Marshall Mathers on Mar 9, 2011 9:53 PM

  • Search help in web dynpro Java i-view

    Hi experts!!
    I am new to EP so i need some help..
    I am trying to implement some web dynpro i-views and i would like to know if there is any way to have F4 search help for  fields in form template that correspond to R/3 fields. In other words i want to take the search help values from the R/3.
    Should i create a model  to call a BAPI for search help??? Or is there any other way?????
    Thanx in advance...!!!
    PS: will reward points to usefull answers.

    Hi You can create Value Help in Webdynpro to show F4 Help values.
    Follow this link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2833ce90-0201-0010-f1af-d3cfe1155b16
    Reward Points if Helpful
    Edited by: Praveen Kommineni on May 7, 2008 8:05 PM

  • Including Html Pages in Web Dynpro java

    hello Experts,
    _i want to include html page in webDynpro java view so i need to know_
    1)where we need to include the html file
    2)should i creat it externally and then include
    3)or is there any specific place in project to include the HTML code.
    4)also can u tell how to include a vidio in html page i got some tutorial but with that its not working fine saying check specified path....
    <div style ="height:1500;width:1500 align=right">
    <video width="320" height="240" controls="controls">
    <source src="movie1.avi" type="video/avi" />
    <object data="movie1.avi">
    <embed src ="movie1.avi">
    </embed>
    </object>
    </video>
    Please HELP

    hi Prajakta Khobaragade,
       I was trying to include the html file in WDJ application which is developed in NWDS 7.1.but its show error,Kindly see the screen shot.

  • ALV table in Web dynpro java

    Hello Experts,
    I have a task to migrate the usage of UI element IWDtable to ALV Table in my application for some features like Sorting and filtering supported in ALV table.
    I searched in Google and SDN about the ALV table, could not find any document about ALV table in Java (Found docs only with ABAP).
    Is ALV table supported in Web dynpro java ? If yes, please pass me the URL for the basics of ALV table.
    Thanks in Advance,
    Regards,
    Harish

    Hello,
    I understand from previous posts in this thread, that the ALV is not yet available for use within WebDynpro. Although it is already documented in the NWDS documentation under:
    SAP NetWeaver CE Developer Studio Documentation > Developer's Guide > Developing and Composing Applications > Developing User Interfaces with Web Dynpro for Java > Reference > UI Element Guide > Tables and Lists > Displaying Lists with SAP List Viewer > Integrating SAP List Viewer into Applications
    Since it is listed under "Developing User Interfaces with Web Dynpro for Java" I would assume that is should be possible. We are on NW CE 7.1 SP5.
    I tried to get a test application running based on the documentation, but the documentation is too thin and I run into an Null-Pointer exception in a SAP class called:
    at com.sap.ip.bi.alv.rendering.ALVGraphicsRenderer.init(ALVGraphicsRenderer.java:117)
    If it is not yet released for use then I wonder why it is already part of the documentation ?
    Take care
       Ingo

  • Execute BI Query in Web Dynpro Java

    Dear All,
    I have a requirement where i have to display of traffic light that sets its color based on the outcome of a SAP BEx query using Web Dynpro Java.
    Please explain me the steps how to retrieve and execute the SAP BEx query  using WDJ.
    Thanks & Regards
    Rajeev

    Hi Rajeev
    You can refer to the following links :
    [How to execute a BI query/view from a web dynpro application?]
    [How to send query parameters using BIApplicationFrame]
    Regards,
    Sayan Ghosh

  • Create a Table Dynamically in WEB Dynpro Java with diferent type of column

    Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)
    Thank you everyone
    Atte Israel

    Hello,Israel.
    Yes , it is possible through dynamic programming in wdModify of the View.
    You can do this ,for example, using cell variants.
    IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");               
    IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i); 
    cellV.setVariantKey("NotEditableVariant");
    cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
    IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i);  // -- here you control the type of the object that is displayed in the cell
    textViewi.bindText(dayAttrib);
    cellV.setEditor(textViewi);          
    tabColumn.addCellVariant(cellV);
    tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());     
    Using this code you can control even specific cells in the table and not only columns.
    Hope this helps you,
    Constantine

  • Date Column not getting sorted in a table in web Dynpro Java

    Hi All,
    I am facing an issue while sorting the date column in a table in my web dynpro java application.
    When the date is displayed in the sql format in tha table, I am able to sort the date column successfully but when we convert the date field from sql format to util format in our table and then sort it does not work.
    Kindly let us know the steps to be followed in this case to sort the date column of a table in Simple Date format as we do not want date in the sql format to be displayed.
    Thanks & Regards,
    Anurag

    Hi,
    You might want to check whether both your browser's language settings are identical. The browser language could also determine the date format.
    As a workaround, you could add an extra attribute to your context, and set the calculated property to 'true'.
    In your table, add a new column and bind to this new attribute, and hide your original date column
    If you sort using the date column that's hidden now, you could use the calculated field to fixed-format your date the way you prefer (by using the SimpleDateFormatter class for instance)
    Cheers,
    Robin

  • Web Dynpro Java - Light Portal Desktop

    Hi Guys... I have a web dynpro java application that I want to display on a Light Portal Desktop, but when I display the iview... it gets cut. I mean I can see only part of my application and there is also a right scroll bar... It looks like the height size of the iview is set to "FIXED" but it's not. I Actually  modifed all values for size even on the Light Framework Page used...to FULL_SCREEN. I don't know what's wrong. If I display the same iview using a Default Framework Page it looks fine... I'm using SAP EP 7.00 SP 16.
    Is there any restriction for using Web Dynpro iviews for Light Porta Desktops?
    Thank you.
    David

    David,
    Webdynpro content is considered heavy and I dont think we can use it in LPD.
    Update:
    Note 916545 - Central Note for External-Facing Portal (NW 7.0)
    Check under application.
    Regards,
    Sandeep Tudumu
    Edited by: Sandeep Tudumu on Sep 17, 2008 8:56 PM

Maybe you are looking for