Help - Dialogs

Please help me with this.
I need to know how do i save a file, i am using FileDialog.LOAD and i need to know how to use FileDialog.SAVE, the thing is, i'm using a TextArea where i write something and i have to save this in a txt file.
how do i do that.
Tanks for helping me.

Hi,
I'm not sure of understand your problem: do you need to get a text that is in a TextArea and save it in a text file? If this is true, you don't need to use the FileDilagog.SAVE (I don't know if you need it for other things in your program).
So, to save a file from your java program you need to use the "java.io.FileWriter" class. Here is an example:
The FileWriter class needs a File object "f" in the example, where you specify the name and location of the text file...
public static void main(String[] args) {
java.io.File f = new java.io.File("C:\\myNewFile.txt");
try {
java.io.FileWriter fileOut = new java.io.FileWriter(f);
fileOut.write("What I write here it will be inside the txt file");
// Remember to close the FileWriter...
fileOut.close();
catch (java.io.IOException e) {
System.err.println("Error writing the file");
I hope this could help you.
Bye.

Similar Messages

  • Search help dialog when there is only one entry

    Hi experts,
    I am developing a Webdynpro app and I can't find the way of skiping the search help dialog when there is only one entry on the result, just like in SE37 when you put the function name with * and it automatically puts the only ocurrence in the field with no dialog for selection. Right now my application is working correctly but it alwas show the dialog even when there is only one entry on the result.
    Thanks in advance!
    Daniel
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on May 4, 2011 2:35 PM

    Hi,,
    Use OVS to  achieve this., when u press start search select the values from table into internal table (lt_object_list)
    n = lines( lt_object_list ).  " this gives the number of records in internal table..
    if n = 1.
    set_attribute(  ) .. to the input field.
    else.
    co phase 3.
    call popup window to display objects
    endif.
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Help dialog

    Hi all,
    I would like to know, is there some kind of "help" class? Almost all SWs comes with the same sort of help window, and I wondered, does Java have some kind of a class that can be used for that porpose?
    (you know, where the screen is splitted, on the left there is some kind of index, and on the right there is the help text related to the selected item from the index on the left).
    Also, I would like to ask how can I use text and Icons on the same text area (like html, where you write the text, and then use the "image" tag with src etc.). Is it possible? (so that I can write help with pictures of the button of the application)
    Thanks in advance,
    Ohad

    For small, simple help dialogs I use a static instance of a JFrame containing a JEditorPane. I then point the JEditorPane at an index.html that contains my help frameset.
    To get the JEditorPane to follow hyperlinks, I set it up like this:
         * Initialises the visual components of this frame
        private void init() {
            getContentPane().add(htmlPane);
            // make read-only
            htmlPane.setEditable(false);
            // follow links
            htmlPane.addHyperlinkListener(new HyperlinkListener() {
                public void hyperlinkUpdate(HyperlinkEvent e) {
                   if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {                    
                    JEditorPane pane = (JEditorPane) e.getSource();
                    if (e instanceof HTMLFrameHyperlinkEvent) {
                        HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;
                        HTMLDocument doc = (HTMLDocument)pane.getDocument();;          
                              doc.processHTMLFrameHyperlinkEvent(evt);
                    } else {
                        try {
                         pane.setPage(e.getURL());
                        } catch (Throwable t) {
                         t.printStackTrace();
            // set the dimensions for this frame
            setSize(600, 500);
            Dimension ss = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setLocation((int)(ss.getWidth()-getSize().getWidth())/2, (int)(ss.getHeight()-getSize().getHeight())/2);

  • Java help dialog invoked from modal dialog with webstart

    Hi,
    we have an application where we invoke a Help window from a modal dialog. It works fine if ran from IDE but doesn't work if ran from a webstart loader. The problem is to be able to set decorations (exit/minimize) for this help window but since this window is null (from printouts) it never goes to lines where decorations are set. The help dialog is displayed by calling super.setDisplayed(true) but it is not setting variables "frame" or "dialog" of DefaultHelpBroker class.
    I am sure it doesn't sound very clear but if you had a similar problem with web start messing up something please let me know.
    thanks.
    private static void initHelp()
        ClassLoader loader = HelpFactory.class.getClassLoader();
        try
          URL url = HelpSet.findHelpSet(loader, HELPSETNAME);
          helpSet = new HelpSet(loader, url);
          helpBroker = new DefaultHelpBroker(helpSet)
            public void setActivationWindow(Window window)
              if (window instanceof Dialog)
                Dialog d = (Dialog) window;
                if (d.isModal())
                  super.setActivationWindow(window);
                  return;
              super.setActivationWindow(null);
            public void setDisplayed(boolean b)
              //no exception here and shows dialog with no decorations
              super.setDisplayed(b);
              System.out.println("d: " + dialog);//prints null here
              System.out.println("d: " + frame); //prints null here
              if (b)
                if (dialog != null)//since this is true, it never sets decorations
                  dialog.hide();             
                  dialog.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
                  dialog.show();
          helpBroker.setFont(new Font("Verdana", Font.PLAIN, 12));
          helpListener = new HelpListener(helpBroker);
        catch (HelpSetException e)
          e.printStackTrace();
      }

    sorry guys, i should've posted it either in the web-start or on javahelp forums. I'll do it right now.
    never mind :-)

  • HELP-DIALOG POP UP BOX-JAVA Cannot create XMLHTTP instance.

    After going to a Web site with Opera Browser, I get the following dialog box JAVA "Cannot create xmlhttp instance".
    Now it pops up when ever I use Opera, but not Internt Exployer. Can you tell a Newbie how to fix it?
    I uninstalled Java 1.4.2 & installed ( jre 1.5.0.05 ) and I still get the
    same Dialog Box. The Box stops me from using Opera Browser,
    because it reappears all the time. I NEED HELP. My OS is XP Home.
    PM me at( trader_zzzz, yahoo.com ). Thanks in advance, traderzzzz.

    Java is not involved in the error - Javascript is. Javascript is not Java, and except for the similar name, they have nothing in common. The problem is the way that Opera is interacting with Javascript and the webpage you visited. You probably want to look for the solution at Opera's website. This search listing may help:
    http://www.google.com/search?q=Cannot+create+xmlhttp+instance

  • Question about the help dialog

    I accidently clicked a button that made my After Effects help open in my web browser. How do I change it back to opening in Adobe's internal help window?

    This page describes the preference for changing that:
    http://www.dwcourse.com/dreamweaver/adobe-help-in-browser.php
    Why do you want to do that?

  • Turning off "help dialog" tip boxes

    O.k., I've been a Mac guy since 2001 and am relatively proficient. However, whenever I rest the cursor over an area on an application the little yellow tip box appears and I cannot figure out how to turn it off. I'm not sure how long it has been doing it, it is just now getting real annoying.

    Hi,Percheron 1, welcome to Apple Discussions.
    Try this link.. http://www.macworld.com/weblogs/macosxhints/2007/07/safaritips/index.php .. which will show you how turn off the yellow tips boxes, firstly for Safari, then it leads you to turn them off for all apps. Changing the delay time before they appear may be all you need, hope this helps.
    Robert.

  • BUG:  Help (F1) dialog constantly pops up in dialogs

    Every time I go to use Photoshop CS3 Extended (and I've heard this problem also exists in CS4), the Help (F1) dialog inevitably pops up repeatedly over and over again.  I searched Google and came up with "out of memory" as the "cause" - I checked Task Manager and, out of 4GB RAM, only 800MB in use.  Actually, I also have Visual Studio 2008 installed and about half the time, the VS debugger wanted to hook into CS3 - in other words, Photoshop is crashing but instead of completely bailing, it fires up the Help dialog.  Only by rapidly clicking the close button on the help dialog and then immediately pressing ESC do I manage to get out of this infinite loop.  The main dialog that I've encountered this problem within is the styles dialog for a layer.  Seriously annoying BUG because it happens every single time.  And don't try to tell me it isn't.  I know crappy programming when I see it and this is crappy programming.  Especially since I paid $$$ for this product.
    I have all the latest updates installed according to the software.  Running this on Windows XP SP3, fully patched, all drivers updated.  I seem to recall this product supposedly recently started using the GPU for rendering layers and I also know that the latest Adobe Premiere Elements has issues with NVidia + Asus or something like that (I have an ATI Radeon HD 4870 card on a Gigabyte board - custom-built machine, no overclocking).  This is also a relatively new XP install and CS3 Extended has only been used a few dozen times.  I'm pretty sure I ran into the issue on my first use even.  So wiping the preferences isn't going to do a single bit of good (that seems to be the recommended course of action around here).  I also had the same issue on my older computer (same software) but I chalked it up to it just being a six year old installation of Windows XP.

    John Joslin wrote:
    igeterrors wrote:
    I have all the latest updates installed according to the software.
    What version number is reported in Help >About...  ?
    I'm pretty sure I ran into the issue on my first use even.  So wiping the preferences isn't going to do a single bit of good (that seems to be the recommended course of action around here).
    Not true – the preference files can be corrupted at any time; even before the program is used.
    And a re-install will not affect these files, which are generated independently in another location.
    Adobe Photoshop CS3 Extended 10.0.1.  Using the "Help -> Updates..." feature says there are no updates.  Checking the Adobe site:
    http://www.adobe.com/support/downloads/product.jsp?product=39&platform=Windows
    Also confirms I have the latest CS3 build.
    For your second response:  Then that is a bug too.  There is this little thing called a "Checksum" that has been around since, well, forever.  If the product is so shoddily written that it can blow up its own config at install, then, at the very least, automatically detect the broken config and repair or replace it.
    http://en.wikipedia.org/wiki/Checksum

  • Function to create Input Dialog for Search Help

    Hi Folks,
    Is there any function to create the dialog to limit the search help result as the one that appears when you create the Search Help through the SE11.
    This is because when I use F4IF_FIELD_VALUE_REQUEST I'm just being able to set one value to restrict and hopefully the functionality of intervales, exclusions, etc that the search help dialog when created through the se11 does have and haven't found it on F4IF_INT_TABLE_VALUE_REQUEST.
    If you can share a little example I really appreciate it.
    Thanks in advance.
    Regards,
    Gilberto Li

    Hi
    You can accomplish by using search help exits..... search the forum by "Search help exit" and check my wiki on search help exit code.

  • Help window blocked when accessed from modal dialog

    Activating my CSH from a modal dialog leaves not only the main frame inactive but the help window as well preventing further navigation in the help.
    Do I have to start the help in a separate JVM earning a load of communication problems or is there an elegant way to circumvent this restriction?
    I'd be happy for comments...
    Holger

    I think the following code will fix the problem. src is the modal dialog and m_broker is your help broker.
    We need the following call otherwise modal dialog won't allow the help dialog to gain focus when clicked on...
    ((DefaultHelpBroker)m_broker).setActivationWindow( src);

  • Dynamic value help for a table field to fill two fields, how to?

    Hi all gurus,
    In SRM 7 I defined a dynamic value help for a single field (ZZ_PROLE_R3) of my header custom table.
    That's the code from WDDOMODIFYVIEW in the webdynpro /SAPSRM/WDC_DODC_CT, view V_DODC_CT:
    DATA: lo_tabnode        TYPE REF TO IF_WD_CONTEXT_NODE.
          DATA: lo_tabnode_info   TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
          DATA: tab_value         TYPE WDR_CONTEXT_ATTR_VALUE_LIST,
                wa_value          TYPE WDR_CONTEXT_ATTR_VALUE.
          lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node
          lo_tabnode_info = lo_tabnode->get_node_info( ).
          wd_this->GET_VALHELP_ZZ_PROLE_R3( EXPORTING iv_guid = lv_guid
                                            IMPORTING ZZ_PROLE_R3_VALHELP = tab_value ). "this method returns the dyn value table
          lo_tabnode_info->set_attribute_value_set( name = 'ZZ_PROLE_R3'
                                                     value_set = tab_value ).
    The method GET_VALHELP_ZZ_PROLE_R3 dynamically builds the value help table tab_value; such table is made up by two fields:
    value : contains the value of the field
    text   : contains a description of the value
    The above solution works; now I'd like to enhance it. The custom table THCUS contains also a field called ZZ_PROLE_R3_DESC, which represents the description of ZZ_PROLE_R3. It is, exactly, the TEXT field in tab_value.
    So I'd like to do as follows:
    - the user clicks on the search help for ZZ_PROLE_R3 field of the table;
    - the above described value help appears;
    - after the selection, both ZZ_PROLE_R3 and ZZ_PROLE_R3_DESC are filled with the selected couple value - text chosen from the value help.
    Could anyone help me achieving such a behaviour?
    Again, a little request... when I open the above value help dialog box, the window itself has a label "Floorplan Manager application for OIF.." that obviously I'd like to redefine (e.g. "Role selection value help"). Is there any way to do that?
    Thanks in advance

    Chris Paine wrote:
    It seems to me - given that your code is in wddomodifyview that you are trying to have different dropdowns per row
    - I'm not sure where you are populating lv_guid - but I'd guess it is an attribute of the row selected? If it isn't then I can't see any reason that you would do this code in wddomodifyview and not wddoinit.
    Hi Chris and thanks for your help,
    lv_guid is the GUID of the document's header; I need to pass it to the method that populates my value help table because the values in it are derived from some fields on the document. (the situation actually is more complex; there's an RFC call on the backend for which the document is intended for to retrieve the data that populate the value help...).
    I'm quite unexperienced on webdynpro and terminology; if dropdown menus are fixed selection option that appears on a field, I guess this is not my case. I did a pair of screenshot to provide an idea of what the solution by now is, and what "I would like to have":
    [Pre-selection (F4 icon on the field in table)|http://imagebin.ca/view/npIsaqF.html]
    [Value Help popup for the field ZZ_PROLE_R3|http://imagebin.ca/view/8fZUh3T.html]
    [Result by now |http://imagebin.ca/view/3PaqdvE.html]
    [Result I'd like to have.|http://imagebin.ca/view/dExR0J.html]
    Chris Paine wrote:
    However - by your comment on the "value help dialog box" I am guessing you are using an input field? If this is the case then I would strongly suggest that you change/enhance the structure of the context node THCUS (btw, better coding practise to refer to it as wd_this->wdctx_thcus when using the get child node construct) so that you refer to an actual SAP ddic search help, if you then associate in the structure the value and text fields then populating the text field should happen automatically. Also you'd have the nice side effect that your value help dialog would be named after the associated ddic search help.
    Thanks for the code suggestion, I'll apply that. For what concerns the context node THCUS... It is, by standard, a node which I can't explictly find in the context for the view V_DODC_CT. The problem is that ZZ_PROLE_R3 and the corresponding description field ZZ_PROLE_R3_DESC of the table must be filled with data retrieved dynamically @ runtime from the backend. So I guess I can't populate a val help referring to a dictionary table/field; I'd rather do as follows:
    - retrieve what's the target backend for the document (to do so, I have to process the document .. that's why the header guid passed to my method);
    - RFC call to a custom method that extracts possible values for the specific backend;
    - bind the ammissible values to the value help.
    Chris Paine wrote:
    I realise that this is rather a lot - so if you have any specific question please do respond - hopefully I or someone else will be able to clarify.
    Thanks again for your help; additional info as well as code examples would be highly appreciated

  • How to hide Attributes of Variable (In F4 Help)

    Hi Gurus,
    I'm using BI 7.0.
    I have created a Variable on 0EMPLOYEE which should let me select the key and text of 0EMPLOYEE.
    But when i do F4 in the 0EMPLOYEE field I'm getting 47 different fields, which i assume are the attributes of 0EMPLOYEE.
    I have changed the following settings.
    1. Settings at Info object level in option Query Def. Filter Value Selection as only values in Info provider.
    2. At the Query Designer level in Variable settings->Value Restrictions->read mode settings as only values in Info provider.
    3. At the Query Designer level in Variable settings->Value Help Dialog->Display attributes as Default(No Attributes).
    But I'm still unable to fix this issue.
    Please provide your valuable inputs.
    Regards,
    Neeraj

    Hi,
    you get the those 47 objects, when you see the at target Level but..
    Once you did the Restriction, and  you run the Report
    that time, when you brows, you can see only Text and Key of 0Employee not all the Attribute
    so you can easily select it.
    if you want to display Text and Key both of 0Employee in Report then
    in Query Designer, Select 0Employee, Display Property as Key and Text
    Best Regards
    Obaid

  • How to implement SEARCH HELP for input field in WDA

    Hi All,
    I am doing a tool for my team. in this tool there are 4 input fields to show different processes. I implemented the 4 input fields and also bind the respective tables to these fields successfully. Actually I want to filter the data between 2 fields . Means the data in the 2nd input field should be based on the 1st input field. Means when I'll select for example 'CHI' (code for CHINA) in the 1st input field the 2nd field meant for country name should show all country name with value 'CHINA'. But the problem is that all values related to each field are in different table with no foreign key relationship and also some combinations are in single table..
    I have tried the import and export parameter method for search help but no luck till now.
    Can anyone please suggest me how to implement this scenario..
    Thanks in advance...
    sekhar

    Hi sekhar,
    Your Requirement can be implemented by OVS(Object Value selector) This is the custom search help .So that you can define on what basis the value has to be fetched.
    Look at the below link
    http://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
    You need to use the component WDR_OVS.
    It has 3 phases
    In phase 1
         You will fetch the value from input field to F4 help dialog box.
    In phase 2
         You will generate the search results , in this phase look for the input value given in field 2 and accordingly generate search result for the field 3.
    In phase 3
         The selected value will be returned to the original screen.
    Regards
    Karthiheyan M

  • Applying filters to F4 Search help - how so with many entries?

    Hello all,
    I have a problem that I have to filter a search help for employees. We use a DB view that unions infotypes 1, 2 and 105. Now I need to restrict potential employees to a given company code BUKRS.
    I now invoke search help in REQUEST ON-VALUE REQUEST within a DynPro screen and call function module F4IF_INT_TABLE_VALUE_REQUEST which I am passing the restricted internal table.
    Fine, that works - however, in the DynPro (which is actually used as an EWT within our portal), the entire internal table is sent to the frontent instead of, say, 250 or so.
    The search help dialog offers the possibility to manually restrict for first and last name - is it perhaps possible, that this search only applies on the server (ITAB) and just returns the results according to the user input?
    Otherwise, sending all potential employees to the frontend is consuming too much resources (time and traffic).
    In function group SDHI there is an "example" module F4IF_SHLP_EXIT_EXAMPLE which tries to explain how to use callbacks but from my point of view I understand very few (it misses the big picture).
    Do you know an alternative, e.g. using the other module F4IF_FIELD_VALUE_REQUEST and to apply a filter to BUKRS using a callback mechanism? There are module parameters indicating that possibility (passing some report?). Perhaps one of you has some sample code, because I am much more trained in BAPI and web stuff only...
    Any hints? Thank you in Advance!
    Regards,
    Timo

    Hi,
    if I can understand you, you tell me that you search information in the view and all found records (let´s say 300) are saved in the internal table, which in time you pass to function F4IF_INT_TABLE_VALUE_REQUEST for display. Now, you think it is too much to display 300 records because of time and traffic.
    Try this:
    REPORT ztest NO STANDARD PAGE HEADING.
    TABLES mara.
    DATA: mytable TYPE TABLE OF ddshretval WITH HEADER LINE.
    DATA l_repid TYPE syrepid.
    PARAMETERS p_mtart LIKE mara-mtart.
    AT SELECTION-SCREEN ON VALUE-REQUEST
                 FOR p_mtart.
      l_repid = sy-repid.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'MARA'
          fieldname         = 'MTART'
          dynpprog          = l_repid
          callback_program  = l_repid
          callback_form     = 'F4CALLBACK'
        TABLES
          return_tab        = mytable
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
    START-OF-SELECTION.
    *&      Form  F4_form
          Exclude all material types that start with F & H
    FORM f4callback
         TABLES   record_tab STRUCTURE seahlpres
         CHANGING shlp TYPE shlp_descr
                  callcontrol LIKE ddshf4ctrl.
      DATA: aux_struc TYPE ddshselopt.
      MOVE: 'H_T134' to aux_struc-shlpname,
            'MTART'  TO aux_struc-shlpfield,
            'E'      TO aux_struc-sign,
            'CP'     TO aux_struc-option,
            'F*'     TO aux_struc-low.
      append aux_struc to SHLP-SELOPT.
      MOVE: 'H_T134' to aux_struc-shlpname,
            'MTART'  TO aux_struc-shlpfield,
            'E'      TO aux_struc-sign,
            'CP'     TO aux_struc-option,
            'H*'     TO aux_struc-low.
      append aux_struc to SHLP-SELOPT.
    ENDFORM.                                                    "F4_form

  • About Help image does not appear

    RoboHelp X5.2 Webhelp output
    A logo created as a jpg to be used as an About Help button
    will only appear when compiled on my hard drive.
    I got rid of the powered by Robohelp button and created a
    company image in jpg format for the About Help button.
    In my project I double-clicked on the skin, and then the
    About Button, selected the jpg for the About Button image, selected
    a gif to use in the About Help dialog box, added company
    information, company name, etc.
    Part of skin code ----------------
    <toolbaritem mode="Logo Mode" type="built-in-logo"
    id="7">
    <name>About</name>
    <image>selected:napa_logo_blue.jpg?</image>
    I compiled to my local drive. Everything works. The jpg logo
    appears on the top right-hand side, and when you click on it, the
    About Help dialog box opens with the gif image and other
    information.
    However, the development team compiled the help along with
    the application to one of their test boxes. The jpg image does not
    appear. Instead, a small white box with a red x and the words About
    Help appears. When you click on this the About Help dialog box
    opens with all the correct information including the gif image.
    Both images reside in the skin folder on my hard drive. When
    I compile the project they reside in the main folder with all the
    htm files and js files.
    Not sure how to resolve this.
    DM

    I am also having this problem. I've just converted a project
    from RH X5 to RH v7. In X5 the .gif file attached to the About
    button worked fine. In RH 7 nothing appears. I've tried adding the
    .gif to the Baggage files but it's still broken. Any other
    suggestions?

Maybe you are looking for

  • PDF Files from InDesign to larger

    Hi I just upgrade my acrobat pro to 9.3.3. And im running Snow leopard. So - now the ps (print postscript) option is also gone for me. I have som old files from indesign, i printet at ps file and used my distiller to make the pdf file. Result = 168 k

  • Png images not shown in applet when opened in internet explorer

    hi all, I am using some transparent PNG images in my applet . Its working properly in appletviewer as well as netscape but images just disappear in internet explorer. same image appears in internet explorer but not in applet in internet explorer. can

  • Price Difference during GR

    Hi, I have a material on Moving Average Price which was extended to a new plant that was configured. During GR, some amount of significant value is posting to the Variance account. This is the first GR for the new plant and also the first material to

  • Column width collapsing on content within it

    Hi I have a 3 column page, and I don't know why the right column called "rightcolumn" collapses on the size of its contents which is table called "news", no matter the size i make the rightcolumn width it always previews to news width.   it appears c

  • Looking for documentation of scheduling agreement

    Dear friends, Please kindly let me know if you know where to find the documentation of business process documentation of Scheduling agreement(SA).. Also,,Can a PO created reference the SA? As I realized that SA could be shown on MD04 a after source l