How to display hourglass until request is finished

I want to display an hourglass (or alike) when a user clicks a button and has to wait several seconds until request is finished.
How can I do this?
Where can i find some simple examples?
Where can I find other 'objects' to be used instead of an hourglass?

package wait;
* WaitCursorDemo.java
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.SwingWorker;
import test.*;
public class WaitCursorDemo extends JFrame {
    private SwingWorker worker ;
    private JButton btStart;
    private JLabel lb;
    public WaitCursorDemo() {
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setSize(400,300);
        setLocationRelativeTo(null);
        btStart = new JButton("Start");
        add(btStart, BorderLayout.NORTH);
        lb = new JLabel();
        add(lb);
        btStart.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
                start();
    private void start(){
        worker = new SwingWorker() {
            protected Object doInBackground() throws Exception {
                setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                lb.setText("Please wait...");
                try{Thread.sleep(3000);}catch(InterruptedException ex){}
                setCursor(Cursor.getDefaultCursor());
                lb.setText("Done");
                return null;
        worker.execute();
    public static void main(final String args[]) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                new WaitCursorDemo().setVisible(true);
     If you don't have JDK6, you need to download and compile the "SwingWorker" source code
     to be able to use it. Here it is:
     http://java.sun.com/products/jfc/tsc/articles/threads/src/SwingWorker.java
     The API is a little different:
        worker = new SwingWorker() {
            public Object construct() {
                setCursor(new Cursor(Cursor.WAIT_CURSOR));
                lb.setText("Please wait...");
                try{Thread.sleep(3000);}catch(InterruptedException ex){}
                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                lb.setText("Done");
                return null;
        worker.start();
}Message was edited by:
Andre_Uhres
Message was edited by:
Andre_Uhres

Similar Messages

  • How to display hourglass while ADF view link is retrieving rows in a swing.

    I posted this yesterday but did not get a solution, here is my posting again:
    Hi All,
    I have an ADF panel which includes several interdependent ADF View Objects and View Links. The query of the top view object might return several rows, then once user navigates from 1st to second row and so on, the dependent (child) view links display corresponding data. This is a swing app and not a web or jsf app.
    Sometimes it might take 8 to 12 seconds for the corresponding data from child view links to be retrieved, during this time window the ADF Panel might appear to be frozen to the user.
    So my question is what do I have to do so the ADF Panel would display hourglass while it is retrieving the rows for the corresponding child view links. If I have to manually update the java generated by Jdev, then what java line and where would I introduce it?
    Your inputs are most appreciated.
    Thanks.

    Check af:progressIndicator , af:statusIndicator
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/progressIndicator.html
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_statusIndicator.html

  • How to display hourglass while ADF view link is retrieving rows.

    Hi All,
    I have an ADF panel which includes several interdependent ADF View Objects and View Links. The query of the top view object might return several rows, then once user navigates from 1st to second row and so on, the dependent (child) view links display corresponding data.
    Sometimes it might take 8 to 12 seconds for the corresponding data from child view links to be retrieved, during this time window the ADF Panel might appear to be frozen to the user.
    So my question is what do I have to do so the ADF Panel would display hourglass while it is retrieving the rows for the corresponding child view links. If I have to manually update the java generated by Jdev, then what java line and where would I introduce it?
    Your inputs are most appreciated.
    Thanks.

    from the component palatte drag n drop this component into your jsf page.
    more info:
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e12419/tagdoc/af_statusIndicator.html
    Using javascript you can change the mouse cursor to an hourglass. Try using clientListener within commandButton and use javascript.
    document.body.style.cursor = "wait";
    document.body.style.cursor = "default";
    Edited by: Puthanampatti on Jan 12, 2010 1:56 PM

  • How to display jpeg until user click play?

    I am new to Flash 8 and am trying to get up to speed. I have
    a flash video (inside a swf) on a website that displays a blank
    screen until the view presses play. Instead of the blan screen, how
    could I display a jpeg on the screen (via URL) until the user
    presses play, at which point the jpeg dissappears and the movie
    starts.
    I would appreciate anyone who could point me to an example of
    how to do this. Thanks!

    I am new to Flash 8 and am trying to get up to speed. I have
    a flash video (inside a swf) on a website that displays a blank
    screen until the view presses play. Instead of the blan screen, how
    could I display a jpeg on the screen (via URL) until the user
    presses play, at which point the jpeg dissappears and the movie
    starts.
    I would appreciate anyone who could point me to an example of
    how to do this. Thanks!

  • How to display soap ws request header?

    Hello,
    I am in the troubleshooting of some web service probs. I would need to see the full request that is send to an external web service after I added a header via abap. Could someone tell me if there is a possibility to get the sent header? We are not using XI/PI.
    It would be possible to do this with a proxy but this is much work and I would like to see an easier way.
    Thanks, Vanessa
    Edited by: Vanessa Martinez on Dec 29, 2011 3:53 PM

    Okay, you can see it in the soamanager... thx

  • Disabling user interface until  http request is finished

    We are using JDeveloper 11 TP2 and we have fallowing problem. In our jspx pages (ADF Faces) in case when user clicks command button after it has been already clicked and before that first request is finished then action listener is triggered twice. We want to prevent that multiple action listener execution. How we can do that? Is there any way to maybe disable user interface until the request is finished.
    Thanks in advance

    We have solved our problem. Our solution is not general but in our case is good enough.
    I have done it like this:
    In jspx page we put javascript method.
    function setToolbarButtonDisabled(ev){   
    ev.getSource().setDisabled(true);
    On button that should be disabled after click put Client Listener.
    <af:commandToolbarButton text="#{ui_labels.newPartners}"
    icon="/images/new_ena.png"
    id="createPartnersBtn"
    binding="#{partnersBacking.createPartnersBtn}"
    actionListener="#{partnersBacking.createNewPartners}">
    <af:clientListener method="setToolbarButtonDisabled"
    type="click"/>
    </af:commandToolbarButton>
    With this after first click button is unabled .
    Later when we need to enable button we do it with method
    public void enableBtn(RichCommandToolbarButton btn){
    btn.setDisabled(false);
    AdfFacesContext.getCurrentInstance().addPartialTarget(btn);
    This method is in backing been for that page and it is called in action listener for action (click on some third button ) that should enable disabled button.

  • How to display the request date in query

    Hi,
    I want to display the No. of request ID and request date in the query, but how could I get the  request date?
    Can anyone give me some suggestion?
    Thanks
    Huaiyuan

    Hi,
    By "request date" you mean the loading process "request date" ?
    If so, as Diogo said, add an infoObject in your data provider for this, but you won't be able to collapse anything if that's a cube.
    Thanks
    Matthieu

  • How to set jButton to display hourglass while executing.

    Hi All,
    How to set jButton to display hourglass while executing.
    Here is my code:
        private JButton jButton5 = new JButton();
        jButton5.setText("Refresh");
        jButton5.setBounds(new Rectangle(805, 35, 145, 25));
        jButton5.setBackground(Color.green);
        jButton5.setFont(new Font("Tahoma", 1, 15));
        jButton5.setForeground(Color.blue);
        jButton5.setSize(new Dimension(145, 25));
        jButton5.setModel((ButtonModel)panelBinding.bindUIControl("Execute",jButton5));Thanks.

    user38000 wrote:
    I do not have much experience with Java, my background is database admin, could you please spell out syntax and where introduce hourglass behavior based on the code I posted.While bobear may post his code, my recommendation in this situation is that you are always better to use the advice given, the API and the tutorials to first try to do this yourself and see what happens. Then if it fails, come back with your code attempt.
    One concern of mine, and my main reason for posting is that it seems like your JButton will initialize a task that may take a bit of time to perform (hence the need for the hour-glass). I just want to make sure that you call this task in a background thread such as within a SwingWorker's doInBackground() method. For more on this, please google the Sun tutorial on Concurrency in Swing.
    Much luck!

  • How to make a VI wait to execute until another one finishes

    Hi all,
    I have been reading the labview help for the sync functions, but I am still confused about how to perform this simple task. I have a labview program that connects to a DSP via serial (RS232). I use VISA Read and VISA Write to read to and write from the device. My goal is to first write, wait until writing is finished, then wait for, say, 100 ms (so that it is ensured that all the data has been sent correctly), and then perform the read operation.
    At the moment I have VISA Write connected to VISA Read via the error out-to-error in wire. However, I am not sure that they perform one after the other correctly, so I would like to implement a more robust synchronisation.
    Thank you very much in advance
    Solved!
    Go to Solution.

    There is also another issue with the synchronous mode on VISA calls. As far as LabVIEW is concerned it is done once the data has been handed to the OS or lower level drivers. For instance, if you use the synchronous call for a VISA write on a TCP connection it will virtually always return immediately even though a trace (using something like Wireshark) clearly shows the data being delaying, buffered and sent out well after the call to the write complete. Given this is NI's position on how this call should work I imagine you could run into the same thing with other interfaces. Their position is that once they have handed the data to the lower level for delivery the call is complete, regardless of whether the data transfer actually was completed.
    Even so, if you know what the data you expect back looks like you can simply use the read timeout to effectively give you the delay. Putting arbitrary delays in such as the wait 100 ms may work now but not work in the future. You are far better off to use your actual data streams to control your synchronization. This is especially true in a command/response type of protocol.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to costrain leveling so that a resource is never assigned to another task until its current one is finished (stick resources to a single task until it is finished) ?

    Hello,
    I am really puzzled with the resource assignments and auto-leveling feature.
    If I assign a resource to 2 tasks which are not linked together (i.e. they do start at the same day), when levelling project (professional 2013) tipically levels the resource so that it works 5 hours on the first task and the remaining 3 on the second one.
    As you know you can't move someone from a task to another every day, thus what I want to achieve is that, due to the assignment, the resource is never split between the two tasks, but rather that one of the task is delayed until the resource finishes the
    other task.
    I want project to consider a resource "sticky" to a task until the task is completed.
    How can I achieve this?
    Thanks in advance

    Set the priority of the task more than default 500, (say set to 700 or so)which you want to be completed first by the resource. Now when you level, project will consider the priority of that task to shift the low priority task to later date.
    http://office.microsoft.com/en-in/project-help/set-task-priorities-for-resource-leveling-HA102840083.aspx
    http://office.microsoft.com/en-in/project-help/about-resource-leveling-HP001041939.aspx
    Sapna Shukla

  • How to display response of http request as a web page in ABAP?

    Hi all,
    In ABAP, we can use class <b>cl_http_client</b> to send a http requst and then got the response data as a XSTRING variable. Usually, the response data is the html source of a web page. How to display this web page within dynpro?
    I found we can use class <b>cl_gui_html_viewer</b> to display the web page of a URL or data in SAP web respository. Is there any way of using it to load response data in cl_http_client and display that web page?
    Thanks a lot.

    Welcome to SDN.
    1. use http_client->response->get_cdata( ).
    to get the response data in string format instead of xstring format.
    2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
    3. use method
    data: l_doc_url(255) type c.
          call method html_control->load_data
                      exporting
                         type         = 'text'
                         subtype      = 'html'
                      importing
                         assigned_url = l_doc_url
                      changing
                         data_table   = html_table.
    call method html_control->show_data
                      exporting
                         url       = l_doc_url.
    to load the html content and show it in cl_gui_html_viewer
    Regards
    Raja

  • How to display the contents of servlet request using the swing component.

    I am trying using the servlet to receive the request of the J2ME client. When the request will be there, this should be automatically displayed by the swing User Interface. Again, that component should display the previous requests made alongwith this request.

    Shriprasad wrote:
    I am trying using the servlet to receive the request of the J2ME client. When the request will be there, this should be automatically displayed by the swing User Interface. Again, that component should display the previous requests made alongwith this request.This makes no sense. Either there's a lot you're leaving out (maybe you're receiving requests on a server, then storing data, and you want to expose the data later via a console of some kind implemented in Swing?), or you don't understand what you're talking about.

  • How to display the contents of an array list to a listview?

    Hi. How do I display the contents of an arraylist to a listview?
    Here is my current code:
    var c: Control= new Control();
    var simpleList: ArrayList = c.ListResult; //ListResult is an ArrayList containing strings
    var simpleListView : ListView = ListView {
            translateX: 0
            translateY: 0
            layoutX: 20
            layoutY: 80
            height: 130
            width: 200
            items: bind simpleList;
    Stage {
        title: "Trial app"
        width: 240
        height: 320
        style: StageStyle.TRANSPARENT
        scene: Scene {
            content: [ simpleListView
    } [http://img341.imageshack.us/img341/133/listview.jpg]
    My code generates the result in this screenshot above. It shows that all the contents on the arraylist is displayed in one row/item.
    It should be displayed as (see bottom image) ...
    [http://img707.imageshack.us/img707/3745/listview1.jpg]
    Do you guys have any idea on this? Thank you very much for your replies

    For your listbox data to bind the listbox requires a Sequence. This is something that you can sort out at the entrypoint of your code.
    In the example below I have used an ArrayList to simmulate the data you have entering your FX code, but then I put that list into a Sequence, in your case instead of having an ArrayList in your FX code, you simple supply the list on entry, as I have marked in the following code.
    * Main.fx
    * Created on 12-Feb-2010, 10:24:46
    package uselists;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import java.util.ArrayList;
    import javafx.scene.control.ListView;
    import javafx.animation.Timeline;
    import javafx.animation.KeyFrame;
    * @author robert
    //Simmulate your data with an ArrayList
    var simpleList: ArrayList = new ArrayList;
    simpleList.add("Hello");
    simpleList.add("World");
    // *** This is what your entry point would become, just load the simpleList.toArray() into your sequence ***
    var simpleSequence = [];
    simpleSequence = simpleList.toArray();
    //after some time add some items, to show that our binding is working
    Timeline {
        repeatCount: 1
        keyFrames: [
            KeyFrame {
                time: 5s
                canSkip: true
                action: function () {
                    //you can work on the Sequence to add or remove
                    insert "Another item" into simpleSequence;
                    //if you at some point want to have your array reflect the changes
                    //then perform your changes on that too
                    simpleList.add("Another item");
                    //remember depending on your app
                    //you may keep the update of simpleList
                    //until you are finished with this view and do it in a single update
            KeyFrame {
                time: 10s
                action: function () {
                    //Alternatly, to keep your ArrayList correct at all times
                    //add items to it and then update your Sequence
                    simpleList.add("Added to array");
                    simpleSequence = simpleList.toArray();
    }.play();
    Stage {
        title: "Application title"
        scene: Scene {
            width: 250
            height: 80
            content: [
                ListView {
                    items: bind simpleSequence
    }You can bind to a function rather than the data, which I am sure would be needed some cases, for example if the listBox data was a named part of a hash value for example, all that is required is that your function returns a sequence.

  • How to display URL images and URL link (html) from Smartforms?

    Hi Gurus,
    I'm having difficulty on how to display targeted URL images and URL link from the smartforms, after i sending it out as html mail. The mail i sent just can be preview as a plain text, which can't execute the html code that i put inside the smartforms itself. I follow a few step from this very useful blog.. Hopefully, you guys can give me some solutions or ideas on this.
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp -thanks to Pavan for his useful blog.
    My code is like this..
    <--- Start Code.
    FORM call_smartforms.
      DATA : lv_subject TYPE so_obj_des,
             lc_true(1) VALUE 'X',
             lw_control_parameters TYPE ssfctrlop,
             lw_output_options TYPE ssfcompop,
             lc_graphics(8) VALUE 'GRAPHICS',
             lw_xsfparam_line TYPE ssfxsfp,
             lc_extract(7) VALUE 'EXTRACT',
             lc_graphics_directory(18) VALUE 'GRAPHICS-DIRECTORY',
             lc_mygraphics(11) VALUE 'mygraphics/',
             lc_content_id(10) VALUE 'CONTENT-ID',
             lc_enable(6) VALUE 'ENABLE',
             lw_job_output_info TYPE ssfcrescl,
             lw_html_data TYPE trfresult,
             lw_graphics TYPE ssf_xsf_gr,
             lt_graphics TYPE tsf_xsf_gr,
             lv_html_xstr TYPE xstring,
             lw_html_raw LIKE LINE OF lw_html_data-content,
             lv_incode TYPE tcp00-cpcodepage VALUE '4110',
             lv_html_str TYPE string,
             lv_html_len TYPE i,
             lc_utf8(5) VALUE 'utf-8',
             lc_latin1(6) VALUE 'latin1',
             lv_offset TYPE i,
             lv_length TYPE i,
             lv_diff TYPE i,
             lt_soli TYPE soli_tab,
             lw_soli TYPE soli,
             lc_mime_helper TYPE REF TO cl_gbt_multirelated_service,
             lv_name TYPE mime_text VALUE 'sapwebform.htm',
             lv_xstr TYPE xstring,
             lw_raw TYPE bapiconten,
             lt_solix TYPE solix_tab,
             lw_solix TYPE solix,
             lv_filename TYPE string,
             lv_content_id TYPE string,
             lv_content_type TYPE w3conttype,
             lv_obj_len TYPE so_obj_len,
             lv_bmp TYPE so_fileext VALUE 'BMP',
             lv_description TYPE so_obj_des VALUE 'Graphic in BMP format',
             lc_doc_bcs TYPE REF TO cl_document_bcs,
             lc_bcs TYPE REF TO cl_bcs,
             lc_send_exception TYPE REF TO cx_root,
             lw_adsmtp TYPE lty_adsmtp,
             lv_mail_address TYPE ad_smtpadr,
             lc_recipient TYPE REF TO if_recipient_bcs,
             lc_send_request TYPE REF TO cl_bcs,
             lv_sent_to_all TYPE os_boolean.
      DATA : v_language TYPE sflangu VALUE 'E',
             v_e_devtype TYPE rspoptype.
      v_form_name = 'ZTEST_EMAIL'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = v_form_name
        IMPORTING
          fm_name            = v_namef
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    starting here. ***
    Set title for the output
      lv_subject = 'Smartforms.'.
    Set control parameters to "no dialog"
      lw_control_parameters-no_dialog = lc_true.
    IF lw_service_subject-code = lc_fm1.
    *--- To get output device type
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          i_language    = v_language
          i_application = 'SAPDEFAULT'
        IMPORTING
          e_devtype     = v_e_devtype.
      lw_output_options-tdprinter = v_e_devtype.
      lw_control_parameters-getotf = 'X'.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    Set output options
      lw_output_options-xsf        = lc_true.
      lw_output_options-xsfcmode   = lc_true.
      lw_output_options-xsfoutmode = 'A'.
      lw_output_options-xsfoutdev  = space.
      lw_output_options-xsfformat  = lc_true.
      lw_xsfparam_line-name  = lc_graphics.
      lw_xsfparam_line-value = lc_extract.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_graphics_directory.
      lw_xsfparam_line-value = lc_mygraphics.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_content_id.
      lw_xsfparam_line-value = lc_enable.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
    Get the smartform content
      CALL FUNCTION v_namef
        EXPORTING
          control_parameters   = lw_control_parameters
          output_options       = lw_output_options
    *pass other application specific parameters (eg order number, items ).
      IMPORTING
          job_output_info    = lw_job_output_info
      TABLES
          tt_tabh              = tt_tabh
          tt_tabb              = tt_tabb
          tt_tabf              = tt_tabf
      EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 4
          OTHERS           = 5.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
      lw_html_data  = lw_job_output_info-xmloutput-trfresult.
      lt_graphics[] = lw_job_output_info-xmloutput-xsfgr[].
      CLEAR lv_html_xstr.
      LOOP AT lw_html_data-content INTO lw_html_raw.
        CONCATENATE lv_html_xstr lw_html_raw INTO lv_html_xstr IN BYTE MODE.
      ENDLOOP.
      lv_html_xstr = lv_html_xstr(lw_html_data-length).
      CALL FUNCTION 'SCP_TRANSLATE_CHARS'
        EXPORTING
          inbuff       = lv_html_xstr
          incode       = lv_incode
          csubst       = lc_true
          substc_space = lc_true
        IMPORTING
          outbuff      = lv_html_str
          outused      = lv_html_len
        EXCEPTIONS
          OTHERS       = 1.
    *HACK THE HTML CODE GENERATED BY SMARTFORM TO MAKE THE
    *EXTERNAL IMAGES APPEAR AS <IMG> TAG IN HTML
      REPLACE ALL OCCURRENCES OF '<IMG' IN lv_html_str WITH '<IMG' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '/>' IN lv_html_str WITH '/>' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '</A>' IN lv_html_str WITH '' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '<' IN lv_html_str WITH '<' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '>' IN lv_html_str WITH '>' IGNORING CASE.
    CALL METHOD html_control - >load_mime_object
       EXPORTING
         object_id  = 'ZWN'
         object_url = 'ZWN.GIF'
       EXCEPTIONS
         OTHERS     = 1.
      REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH lc_latin1.
    REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH 'iso-8859-1'.
       break mhusin.
      lv_html_len = STRLEN( lv_html_str ).
      lv_offset = 0.
      lv_length = 255.
      WHILE lv_offset < lv_html_len.
        lv_diff = lv_html_len - lv_offset.
        IF lv_diff > lv_length.
          lw_soli-line = lv_html_str+lv_offset(lv_length).
        ELSE.
          lw_soli-line = lv_html_str+lv_offset(lv_diff).
        ENDIF.
        APPEND lw_soli TO lt_soli.
        ADD lv_length TO lv_offset.
      ENDWHILE.
      CREATE OBJECT lc_mime_helper.
      CALL METHOD lc_mime_helper->set_main_html
        EXPORTING
          content     = lt_soli
          filename    = lv_name
          description = lv_subject.
      LOOP AT lt_graphics INTO lw_graphics.
        CLEAR lv_xstr.
        LOOP AT lw_graphics-content INTO lw_raw.
          CONCATENATE lv_xstr lw_raw-line INTO lv_xstr IN BYTE MODE.
        ENDLOOP.
        lv_xstr = lv_xstr(lw_graphics-length).
        lv_offset = 0.
        lv_length = 255.
        CLEAR lt_solix[].
        WHILE lv_offset < lw_graphics-length.
          lv_diff = lw_graphics-length - lv_offset.
          IF lv_diff > lv_length.
            lw_solix-line = lv_xstr+lv_offset(lv_length).
          ELSE.
            lw_solix-line = lv_xstr+lv_offset(lv_diff).
          ENDIF.
          APPEND lw_solix TO lt_solix.
          ADD lv_length TO lv_offset.
        ENDWHILE.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_filename.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_content_id.
        lv_content_type = lw_graphics-httptype.
        lv_obj_len      = lw_graphics-length.
    *Add images to the email
        CALL METHOD lc_mime_helper->add_binary_part
          EXPORTING
            content      = lt_solix
            filename     = lv_filename
            extension    = lv_bmp
            description  = lv_description
            content_type = lv_content_type
            length       = lv_obj_len
            content_id   = lv_content_id.
      ENDLOOP.
      TRY.
          lv_subject = lv_subject.
          lc_doc_bcs = cl_document_bcs=>create_from_multirelated(
                   i_subject          = lv_subject
                   i_multirel_service = lc_mime_helper ).
        CATCH cx_document_bcs INTO lc_send_exception.
        CATCH cx_bcom_mime INTO lc_send_exception.
        CATCH cx_gbt_mime INTO lc_send_exception.
      ENDTRY.
    Create send request
      TRY.
          lc_bcs = cl_bcs=>create_persistent( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->set_document( i_document = lc_doc_bcs ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Set-up email receiver
      lv_mail_address = '[email protected]'.
    TRANSLATE lv_mail_address TO UPPER CASE.
      TRY.
          lc_recipient = cl_cam_address_bcs=>create_internet_address(
              i_address_string = lv_mail_address ).
        CATCH cx_address_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->add_recipient( i_recipient = lc_recipient ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Send smartforms as HTML email
      TRY.
          lc_bcs->send( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      COMMIT WORK.
      WRITE:/ 'Mail sent'.
    ENDFORM.                    "call_smartforms
    End Code --->
    Thanks and Regards.

    1- put your images in a directory under the web app directory. Example: app/images/
    2- in your jsp, use: String file = application.getRealPath("/images/"); to get the images directory. See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
    3- it's not the right forum to post this kind of question. Post them in the JSP/Servlet JSTL forum instead

  • How to Display Excel Report in Client machine  in Forms11g

    Hi All,
    we are running database in Linux server and separate Linux Application Server , But my question is how to display the data to Excel Report in the Client machine
    in Forms11g applications.
    Plesase suggest any method.
    Regards
    Venkatesulu Gunisetty

    You should use webutils.
    For proper answer, place ur request here in oracle Forms Thread,
    Forms

Maybe you are looking for

  • If I chose the wrong folder as defaulf for downloads to go to, how can I change it?

    I use download manager. I hit '''yes''' when asked if I wanted to make the folder shown as the default for future downloads of that type. I did not mean to do that. How can I change the default folder?

  • How to print Excise values in Purchase Order Smartform

    Hi, Experts, I am developing the Purchase Order Smartform as per the my client requirment. For this i took the copy of standard Smartform for PO. The name of the standard smartform is 'YBIN_MMPO'. My requirment is to print all the excise values {BED,

  • Custom Images not appearing

    Hi, I have added two images to the folder path C:\OracleBI\web\app\res\s_ect\images\ as Image1.jpg and Image2.jpg size-2 kb. I added it as fmap:Images/Image1.jpg and added fmap:Images/Image2.jpg as required at different places but, Image1 is appearin

  • Automate template download for SAP BPC client rollout

    Hi Experts Is it possible to automate the downloading of the template and dimension files automatically using a client deployment tool such as Symantec Altiris. We will be deploying to over 3000 clients in a staged approach, but due to the strict ban

  • English to Japanese

    I have a small home base business and a Japanese business man has made contact with me, wanting to purchase some of my goods.  We have been communicating via email, but there have been problems on both side.  I know no Japanese and he knows very litt