How to catch data from Purchase Order form, when user click CLOSE menu?

Hi,
I need do my own biz process when user click CLOSE in the Data menu to close a purchase order.
But I don't know how to get data from PO form which opened by user.
Can anybody give me some suggestions? thanks.

Clicking "Close" is menuUID 1286. (Check this by going to View->System Information, and then hovering your mouse over "Close" in the menu. The menuUID is displayed in the bottom left of the screen)
So catch the menu event, when menuUID and pVal.BeforeAction = True.
The slightly tricky thing here is that pVal for a menu event doesn't give you the form, but it will be the active form, so you can do this:
Private Sub SBO_Application_MenuEvent(pVal As SAPbouiCOM.IMenuEvent, BubbleEvent As Boolean)
     If(pVal.BeforeAction And pVal.menuUID = "1286")
         SAPbouiCOM.Form oForm = SBO_Applcation.Forms.ActiveForm
         //Now you have the form, when the user has clicked close, so process the data
         //from the form as normal
     End If
End Sub
Syntax might be wrong, I typed it up from memory and have no error checker!
Edited by: njmog1 on Feb 28, 2011 10:35 AM

Similar Messages

  • How to upload data from excel to form using webutil

    Hi,
    In the sample provided by Oracle
    http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
    Note 247606.1 How to Copy Records From a Form Into Excel
    It shown the methods of how to copy data from form to excel but is there any sample to provide the step on how to read the cell from excel into Form in 10g.

    declare
    args client_ole2.list_type;
    application client_ole2.obj_type;
    vworkbooks client_ole2.obj_type;
    vdoc     client_ole2.obj_type;
    vworksheet     client_ole2.obj_type;
    vrange               client_ole2.obj_type;
    begin
    -- create app object
    application := client_ole2.create_obj('Excel.Application');
    client_OLE2.SET_PROPERTY(application, 'Visible','True');
    -- get workbooks object
    vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
    -- and open a file
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
    vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- get a worksheet object
    -- for this to work you need to know the sheet name or its index
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 1); <-- name or index
    vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);          
    client_ole2.destroy_arglist(args);
    -- get a range object which in this case is just a cell
    -- for this to work you need to know the cell coordinates
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'B6');          
    vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
    client_ole2.destroy_arglist(args);
    -- and here you get the value
    message(client_ole2.get_char_property(vrange,'Value'));
    -- release objects          
    client_ole2.release_obj(vrange);
    client_ole2.release_obj(vworksheet);
    client_ole2.release_obj(vdoc);
    client_ole2.release_obj(vworkbooks);
    client_ole2.release_obj(application);
    end;

  • How to transfer data from Mobilephone's form to PC's form?

    Hi
    I'm sorry about the title. The title itself may be hard to understand or even misleading. So I try to explain what is my problem below and hope to find some advices or help about it.
    My question is about the Mobile function in LiveCycle ES2.5. LiveCycle ES2.5 could let users start workflow(for example: a approval process) by a mobile device. I think this function could help sellsmen to report customer information(for example: basic information of a customer's offer) more faster and make the whole application precedure faster than before.
    I try to make a simple demo to show my thought. My needs are written below
    1,  By using iphone, a sellsman write some basic information(such as: name, address, offer number) in a mobile form and submit the information to Data Center and start a approval workflow in Workspace at the same time.
    2,  When the specific employee of Data Center opened the workspace, he will notice the new task and open it. At this time, a dedicated offer sheet will be opened and The Most Important Thing is that the information sent by the selssman are filled in the specific items of the sheet. And The Other Items in the sheet should be editable.
    3,  The mobile form and the offer sheet are both created by LiveCycle ES2.5.
    The most thing I want to do is the second need :   the information sent by the selssman are filled in the same items of the sheet. And the other items in the sheet should be editable.
    I faced problem here.I built a mobile form and a offer sheet, then I noticed that if I want to transfer data, I need Data Model embedded with the forms. But mobile form's Data Model is .fml, offer sheet's Data Model is .xsd.  I don't know how to make the two Data Model connected. I also try to only use .fml to embedded the both forms, but as a result, the items in the offer sheet could not be edited.
    This is my question, and in fact, my way may not be a good one or even just be wrong.  If you notice that, please fix it or if you think there is much easier to realize my needs, please teach me how to do.
    Best wishes.
    En Shoku

    Sharing my thoughts:
    FML and XSD are just Data Models. Which means, they defines how the data are represented within your form/guide.
    But the actual data must be in a XML format only.
    I hope its just a matter of transforming the XML data from Guide[Mobile form] to PDF [PC's form].
    What do you think?
    Nith

  • How to get 'linenum' from the order form matrix

    I'v been trying to get this to work for the past 4 hours now and I can't find a solution.
    I have a button on the sales order form, when the user clicks on this button a second screen will appear with more information (stored in a usertable).
    However to be able to get this information from my usertable I need to have the linenum of the selected line (in the matrix).
    I know I can get the 'row' property but this doesn't give me the linenum (wich is the unique key in the RDR1 table).
    Also the 'visorder' column doesn't work since I have textlines in the order that can be placed anywhere and can be more than 1.
    Consider the following scenario:
    Order with the following lines:
    Textline
    article line (actual orderline)  (linenum = 1 / visorder = 0 / row = 2)
    article line (actual orderline)  (linenum = 2 / visorder = 1 / row = 3)
    article line (actual orderline)  (linenum = 3 / visorder = 2 / row = 4)
    textline
    article line (actual orderline)  (linenum = 4 / visorder = 3 / row = 6)---- (this line has been deleted)
    article line (actual orderline)  (linenum = 5 / visorder = 3 / row = 6)
    So in total 6 lines.
    How do I get the 'linenum' from the last line (note that linenum 4 has disappeared because of the deleted row)?
    I looked into using the dbdatasource but with this I gets the entire RDR1 table (for that order) and can't get the linenum (correct one) out off it since the textlines mess up the order.
    Anyone know how to do this?

    Hi Marc,
    Assuming the document is saved, you can use something like the following:
    SAPbouiCOM.Form sboForm = (SAPbouiCOM.Form)_sboApp.Forms.GetForm(ItemEvent.FormTypeEx, ItemEvent.FormTypeCount);
    SAPbouiCOM.Matrix sboMatrix = (SAPbouiCOM.Matrix)sboForm.Items.Item("38").Specific;
    // Get the document number
    SAPbouiCOM.EditText sboEdit = (SAPbouiCOM.EditText)sboForm.Items.Item("8").Specific;
    string sDocNum = sboEdit.Value;
    if (sDocNum == "") // No document is selected in this window so report error
        _sboApp.SetStatusBarMessage("No document has been selected", SAPbouiCOM.BoMessageTime.bmt_Short, true);
    else
        if (sboForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE || sboForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE) // Document must be saved to ensure VisOrder is correct in the database
            _sboApp.SetStatusBarMessage("Please save the document first", SAPbouiCOM.BoMessageTime.bmt_Short, true);
        else
            int iVisOrder = -1;
            string sMessage = "The Line Numbers on this document are: " + System.Environment.NewLine;
            for (int i = 1; i < sboMatrix.RowCount; i++) // Last row is always blank so loop while i is LESS than RowCount
                SAPbouiCOM.ComboBox sboCombo = (SAPbouiCOM.ComboBox)sboMatrix.Columns.Item("257").Cells.Item(i).Specific;
                string sLineType = sboCombo.Selected.Value.ToString();
                if (sLineType == "") // Not a text line or a subtotal
                    iVisOrder++; // Increment your counter to get the next VisOrder value
                    SAPbobsCOM.Recordset sboRec = (SAPbobsCOM.Recordset)_sboCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                    try
                        sboRec.DoQuery("select T0.LineNum from RDR1 T0 inner join ORDR T1 on T0.DocEntry = T1.DocEntry where T0.VisOrder = " + iVisOrder.ToString() + " and T1.DocNum = " + sDocNum);
                        if (!sboRec.EoF)
                            sMessage += "Row " + i.ToString() + " in the matrix is LineNum " + sboRec.Fields.Item("LineNum").Value.ToString() + System.Environment.NewLine;
                    finally
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(sboRec);
                        sboRec = null;
                        GC.Collect();
            _sboApp.MessageBox(sMessage, 1, "Ok", "", "");
    Basically you have a counter that you increment if the matrix line is not a text or subtotal line. This will match the VisOrder value in the RDR1 table which you can use to get the LineNum value.
    Kind Regards,
    Owen

  • How to combine data from different input forms outside a nested iView

    Hi,
    i try to combine data from different input forms in a single one.
    Because of space reasons in Flex compiling i already use nested iViews. Within these nested iViews its possible to use the 'combine' function to do this.
    But in the main iView I cant compose these function with other elements. I need to do this because of using these model in Guided Procedures with output parameters. These parameters I only get with a 'endPoint'. Unfortunatly its not possible to combine data from different input forms into the 'endPoint'.
    Is there any solution?
    Thanx
    Mathias

    Hi Scott,
    i tried this already and i also tried to map all parameters in the endpoint by drawing lines from the other forms and assign the 'empty parameters' by a formula.
    And when i create a collable object in GP and assign the VC iView, only the parameters of the parent-form (the form who trigger the event) are shown as output-parameters.
    Maybe any other ideas? I cant believe that such a simple thing is not possible?!?!
    In my opinion, thats a bug, that I'am not able to use the combine-operator in the main VC-iView. Whats your mind?
    greets
    mathias

  • How to transfer data from adobe interactive form to va02 tcode

    Hi experts,
    My requirement is in pdf file if I attached a sales order document and I should create a button called submit when user clicks on button  the sales order document  should go and attach in vao2 tcode.
    Can u tell me for this requirement how I can proceed.
    Thanks & regards
    Naveenreddy
    Edited by: Thomas Jung on Oct 11, 2010 10:20 AM - Removed all upper case - No shouting, please

    Can you migrate/ alter that .pdf file as EXCEL or TEXT file? I am not aware of any tools do that
    you will have to write an app to do this.
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

  • How to populate data in a new page when user place mouse on table cell

    Hi friends,
    i am working on OAF. I have one table with data coming from the backend. In a table some cells repersents wiht "P" or "C", till that Ok. but when user place mouse pointer over the cell, data should be populated in addtion text( babul text) or new page should be opened and it will show the related information about perticular cell.
    in my R&D. i created one OACellformateBean and attached messageStyled Text. MessageStyled text have property like " setMouseOver(MulInode, string)". i am really not aware what are the areguments i need to pass to this method ?. what is MultiInode.
    Pls help me in this reagard?. i am really in trouble ?????

    Thanks a lot. Tapash Ray, atleast should it possiable to open a new window when user click cell. could you please suggest some toher way similar to this , which we can get the data to diplay in a new window.

  • How to read data from writable PDF Form?

    Hi,
    I need some help for the web site that I am working on.
    This is asp.net website. Client is requesting to provide writeable PDF forms on this website for download.
    These forms will be downloaded by customers, they will fill in the required data on these forms save it and upload the forms back on the website.
    Once uploaded we need to read whtever client has written in these forms and update in the database (SQL server).
    I have been going through adobe web site and lot of other web sites to understand this concept (as i have never done this).
    What I understood is, with Adobe LiveCycle designer and forms we can create writeable forms.
    However I have not got any idea or seen any documentation on how do I read the data that user has typed on these forms.
    This reading the data from pdf and saving into sql server, I have to do it in asp.net app.
    Could anyone please help me understand how to achieve this.
    Thanks a lot for you time.

    How do we do that?
    Just to clarify myself, I am not putting any button on PDF to invoking submit action from PDF. I am allowing user to upload the pdf and they click submit button on my aspx page.
    Are you saying that when user submits the aspx page there is a wasy to retrieve the data in the form of XML or name/value pair on this aspx submit? if so please send me some pointers/examples or let me know how to do this? Is there any additonal tools/software that we will need to buy from adobe for this?
    thanks for you time!
    Praxo

  • How to get data from the GUIBB FORM on processing method PROCESS_EVENT?

    Hello Community,
    one more question do I have.
    I need to process some form data, that were entered by a user. One field was additional added via the method IF_FPM_GUIBB_FORM~GET_DEFINITION, so it is not in the BOL.
    I listen to an FPM_EVENT in the IF_FPM_GUIBB_FORM~PROCESS_EVENT.
    IF io_event->mv_event_id EQ 'FPM_SAVE_AND_BACK_TO_MAIN' OR io_event->mv_event_id = 'FPM_SAVE_1'.
         " Here I need to access the data from the GUINN FROM
      ENDIF.
    How can I access to the data, entered in the GUIBB FORM?
    Thank you and best regards, Christian

    Hello Jens and Christian,
    Thanks very much for your help.
    Could you help me check where the problem is ? My detail step is as below:
    1.      Structure     'S_TR_FILE' ,  which  include component  'MIME_TYPE' with data type 'String'  and 'UPLOAD_FILE' with data type 'String'.
    2.    IF_FPM_GUIBB_FORM~GET_DEFINITION
        DATA: lo_structdescr    TYPE REF TO cl_abap_structdescr.
        FIELD-SYMBOLS: <ls_new_field_descr> TYPE fpmgb_s_formfield_descr.
        lo_structdescr  ?= cl_abap_typedescr=>describe_by_name( 'S_TR_FILE' ).
        eo_field_catalog = lo_structdescr.
        APPEND INITIAL LINE TO et_field_description ASSIGNING <ls_new_field_descr>.
        <ls_new_field_descr>-name = 'MIME_TYPE'.
        <ls_new_field_descr>-label_by_ddic = 'X'.
        <ls_new_field_descr>-visibility = '01'.
        <ls_new_field_descr>-default_display_type = 'IN'.
        UNASSIGN <ls_new_field_descr>.
        APPEND INITIAL LINE TO et_field_description ASSIGNING <ls_new_field_descr>.
        <ls_new_field_descr>-name = 'UPLOAD_FILE'.
        <ls_new_field_descr>-label_by_ddic = 'X'.
        <ls_new_field_descr>-visibility = '02'.
        <ls_new_field_descr>-default_display_type = 'FU'.
        <ls_new_field_descr>-mime_type_ref = 'MIME_TYPE'.
    3.  After the OVP page is displayed, I select a xlsx file in 'UPLOAD_FILE', and click "upload" button(toolbar on the top  page) , I can't get any data from IS_DATA in flush method or CS_DATA in Get_DATA.
    Thanks& Best Regards,
    Yupeng

  • [php+mysql] how to pass data from one insert form to another?

    Hi all,
    I have an insert form (in a mysql db) on the page. Is there a way to
    view the inserted data after inserting so stat the user can print it
    out?
    TIA
    tony

    >Hi Tony,
    >let´s assume the table´s Primary Key column is named "id" -- just add this value (available as "Dynamic Data") to the "Redirect after Insert" URL in the following way:
    >print.php?id={id}
    >...and on that page add a recordset which queries the table like that:
    >"SELECT * FROM tablename WHERE id" equals the URL parameter "id"
    >That should be all there is to do.
    >Cheers,
    >Günter Schenk
    >Adobe Community Expert, Dreamweaver
    Hi Günter,
    Thanks, it works.
    I added a bit of code to set a session variable using this Parameter
    URL, so that I can manage the record ID along the whole user session.
    So, I ask you a little question: when it is best to delete or destroy
    session variables? after displaying the inserted records or just befor
    inserting the first one?
    Here is my little test workflow:
    1- destroy variable sessions (I think I will unset session variables
    one by one instead, to eliminate the risk to delete other sesssion
    variable (UserID...)
    2- insert the first record (redirect to the next page using the record
    ID1)
    3- set a session variable (S1) using the ID1 coming from previous page
    ($_GET)
    4- insert the second record (redirect to the next page using the
    record ID2)
    5- set a session variable (S2) using the ID2 coming from previous
    page ($_GET)
    6- insert the third record (redirect to the next page using the
    record ID3)
    7- set a session variable (S3) using the ID3 coming from previous page
    ($_GET)
    8- create a recordsets to filter the db by S1, S2 and S3.
    9- display the report
    it seems to work.
    do you think there is something to refine?
    Thanks again for your kindness.
    tony

  • How to recover data from .bkf files made when os was XP Proffesional into the system when it is windows7

    Hello Sir/Madam,
    Previously I was using Microsoft Wndows XP Professional,with version: 5.1.2600 Service Pack 3 Build 2600.
    I took .bkf files by using the Backup utility (i.e. Start -> All Programs -> Accessories -> System Tools and then click Backup)
    And paste it to my external hard disk.
    Then I used OS :Microsoft Windows 7 Professional(Version 6.1.7600 Build 7600).I formated my system deleted all the partitions and created new partions and installed Windows 7.
    Now I have the .bfk files in my external hard disk and I want to recover my data from that .bfk files made from xp-sp3 pc to windows 7.
    Plz help me.....
    I downloaded Windows NT Backup - Restore Utility and tried to install NtBackupRestore_x86.msi .But it will not installed in Windows 7 with a message that this requires Removable Storage Management. Since RSM is not included in Windows 7 how does
    one access old Backups from Windows XP?
    Will the NtBackupRestore program be updated to be compatible with Windows 7? plz help................................

    Yes, you need to first install Removable Storage Management software before installing NT-Backup.exe in Windows 7. To know more about restoring backup file, you can read this post: http://belanalavade.blog.com/2014/04/15/how-to-repair-damaged-bkf-file/
    Berdooook
    No.  You do not need to install Removable Storage Management in Windows 7 to read NT backups!
    You go to http://support.microsoft.com/kb/974674 and download the package for Windows 7 that Microsoft has published specifically for this!
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • How to identify column name in ALV tree when user clicks a particular field

    Hi All,
    In My requirement i am displaying ALV Tree.
    In Which When the user clicks on a particular header column it should navigate to other transaction.
    Now the issue is it is navigating to other transaction when we click on any column of the header row.
    But, the user requires only for particular column .
    Is there any method  to catch the field name in CLASS 'CL_GUI_ALV_TREE'.
    Regards,
    Bhanu.R

    Check out for CUCOL system field.
    Regards,
    Lalit Mohan Gupta.

  • How Variant Configuraton data  from Sales Order stored in the database

    Hi,
    I understand that the "variant configuration" data (chosen values for each characteristics assigned to material) from a sales order is stored separately with reference of an object in SAP.
    Please let me know how SAP stores such data -source in the database tables.
    This is required to draw a report of these charateristics values for various sales orders (Transactional data).
    I also understand that there are function modules to retrieve this data, but the function modules are unable to retrieve data as accurately as the VA03 program.
    Thank you for your advice.
    Regards,
    Hemant

    Hi ,
    I do not know what a reference charactersitcs is,but there are all independant characeristics in terms of their values.
    A guess it is because the VC data is changed after the sales order is created, the updated VC data is displayed properly only in VA02 or VA03 but other function modules fail to display the updated VC data.
    I understand there is a relationship of instance -between sales order object and VC data object-which we need to update and then see the latest data.
    Please let me know if anyone has debgged VA03 to know how the standard SAP program retrieves VC data in a sales order.
    Thank you,
    Hemant

  • How to retrieve data from the HTML form in the JEditorPane?

    I could quite easily use JEditorPane to render and display a simple HTML file.
    My HTML looks like this:
    <html>
    <head>
    <title> simple form</title>
    </head>
    <body bgcolor="cccccc">
    <center><h1>SURVEY THING</h1>
    </center>
    <form id="survey">
    <p>1.Type something in.</p>
    <textarea cols=25 rows=8>
    </textarea>
    <BR>
    <p>2.Pick ONLY one.</p>
    <input type="radio" name="thing" value="0" Checked> NO choice <BR>
    <input type="radio" name="thing" value="1"> First choice <BR>
    <input type="radio" name="thing" value="2"> Second choice
    <BR>
    <p>3.Pick all you like.</p>
    <input type="checkbox" name="stuff" value="A"> A <BR>
    <input type="checkbox" name="stuff" value="B"> B <BR>
    <input type="checkbox" name="stuff" value="C"> C <BR>
    <input type="submit" value="give data">
    <input type="reset" value="do clensing">
    </form>
    </body>
    </html>
    It gets diplayed fine and I can type in text, select radio buttons (they behave mutualy-exclusive,
    as they should) and check checkboxes.
    The problem I have is with retrieving the values which were entered into the form.
    If I, after editing, try to write the html to the file using HTMLWriter,
    it records the changes I made into the textarea, however all the radio and checkbox selections are lost.
    Maybe the problem is that when I enter the values I do not use any methods like
    insertBeforeStart and so on, but I believe I shouldn't need to use them to populate a form.
    Especially I never change the structure of the HTML.
    Also, when I try to traverse the Element tree and see the input elements attributes,
    I can never see a change in the entered values. However it is probably b/c I am traversing through
    the model and the changes are in the view (just a guess.)
    Anyway, if anybody could direct me onto the right path: how to retrieve the values typed in the form,
    or if it is possible at all in the JEditorPane, I would greatly appreciate.
    thanks
    maciej
    PS. I have seen the answer to a similar question posted some time last year. However, I am trying
    to find a soultion which allows forms/surveys to be built by people who have no java and only basic
    html knwledge. And Axualize way is probably a little bit too "high-tech."

    Maybe helpful for u.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Container;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    public class TestHtmlInput extends JFrame {
         JEditorPane pane=new JEditorPane();
         public TestHtmlInput() {
              super();
              pane.setEditorKit(new HTMLEditorKit());
              pane.setText("<HTML><BODY><FORM>" +
              "<p>1.Input your name.</p>" +
              "<INPUT TYPE='text' name='firstName'>" +
              "<p>2.Input your information.</p>" +
              "<TEXTAREA rows='20' name='StationDescriptions' cols='100'>" +
              "<p>3.Pick ONLY one.</p>" +
              "<input type='radio' name='thing' value='0' Checked> NO choice <BR>" +
              "<input type='radio' name='thing' value='1'> First choice <BR>" +
              "<input type='radio' name='thing' value='2'> Second Choice <BR>" +
              "<p>4.Pick all you like.</p>" +
              "<input type='checkbox' name='stuff' value='A'> A <BR>" +
              "<input type='checkbox' name='stuff' value='B'> B <BR>" +
              "<input type='checkbox' name='stuff' value='C'> C <BR>" +
              "<p>5.Choose your nationality.</p>" +
              "<select name='natio'>" +
              "<option>12</option>" +
              "<option selected>13</option>" +
              "</select>" +
              "</FORM></BODY></HTML>");
              this.getContentPane().add(new JScrollPane(pane));
              JButton b=new JButton("print firstName text");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        System.out.println("Number of Components in JTextPane: " + pane.getComponentCount());
                        for (int i = 0; i <  pane.getComponentCount(); i++) {
                             //NOTE FOR BELOW: know its a Container since all Components inside a JTextPane are instances of the inner class
                             //ComponentView$Invalidator which is a subclass of the Container Class (ComponentView$Invalidator extends Container)
                             Container c = (Container)pane.getComponent(i);
                             //the component of this containers will be the Swing equivalents of the HTML Form fields (JButton, JTextField, etc.)
                             //Get the # of components inside the ComponentView$Invalidator (the above container)
                             Component swingComponentOfHTMLInputType = c.getComponent(0);
                             //each ComponentView$Invalidator will only have one component at array base 0
                             //DISPLAY OF WHAT JAVA CLASS TYPE THE COMPONENT IS
                             System.out.println(i + ": " + swingComponentOfHTMLInputType.getClass().getName());
                             //this will show of what type the Component is (JTextField, JRadioButton, etc.)
                             if (swingComponentOfHTMLInputType instanceof JTextField) {
                                  JTextField tf = (JTextField)swingComponentOfHTMLInputType;
                                  //downcast and we have the reference to the component now!! :)
                                  System.out.println("  Text: " + tf.getText());
                                  tf.setText("JTextField found!");
                             } else if (swingComponentOfHTMLInputType instanceof JButton) {
                             } else if (swingComponentOfHTMLInputType instanceof JComboBox) {
                                     JComboBox combo = (JComboBox)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected index: " + combo.getSelectedIndex());
                                } else if (swingComponentOfHTMLInputType instanceof JRadioButton) {
                                     JRadioButton radio = (JRadioButton)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected: " + new Boolean(radio.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JCheckBox) {
                                     JCheckBox check = (JCheckBox)swingComponentOfHTMLInputType;
                                     check.setSelected(true);
                                     System.out.println("  Selected: " + new Boolean(check.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JScrollPane) {
                                  JScrollPane pane = (JScrollPane)swingComponentOfHTMLInputType;
                                  for (int j=0; j<pane.getComponentCount(); j++) {
                                       //JTextArea area = (JTextArea)swingComponentOfHTMLInputType.getComponent(0);
                                       Container c2 = (Container)pane.getComponent(j);
                                       for (int k=0; k<c2.getComponentCount(); k++) {
                                            Component c3 = (Component)c2.getComponent(k);
                                            if (c3 instanceof JTextArea) {
                                                 JTextArea area = (JTextArea)c3;
                                                 System.out.println("  " + area.getClass().getName());
                                                 System.out.println("     Text: " + area.getText());
                                                 area.setText("JTextArea found!");
                             } else {
              this.getContentPane().add(b,BorderLayout.SOUTH);
         public static void main(String args[]) {
              TestHtmlInput app = new TestHtmlInput();
              app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              app.setSize( 400, 900 );
              app.setVisible( true );
    }

  • How to Validate Data from a JSP form

    [newbie]
    From a netui:anchor, I call a data entry form (dataEntry.jsp). It contains 5 textboxes created using netui:form and netui:textbox.
    The user enters the new account info and clicks the submit button, a form bean is populated and passed back to the controller which calls a method to update the database. This all works well. At least it did, until I found that I could enter control characters into the form... So, this brought up the issue of data validation.
    I would imagine there is a standard way to validate form data. (like checking a value is numeric or alpha, has a specific length or to apply a regex or edit mask prior to insertion into a database...)
    Is it generally done within the jsp?, the form bean? or in the controller? The latter 2 would be java, I suppose. If it's in the jsp, are there jsp tag libraries for that?
    Any direction would be most appreciated.
    Mark
    If I should be on another forum/newgroups (perhaps one for amateurs, please let me know... :>)

    I believe I found the answers to my questions in some Beehive docs. I'll follow up if I have others... Mark

Maybe you are looking for

  • Random crashes w/ iTunes 9.2.1 on iPhone 3GS

    Hi everyone, I keep having the same error message each time I connect my iPhone 3GS to my Macbook Intel Core 2 Duo 1.83GHz on iTunes 9.2.1 I've already uninstalled as per http://support.apple.com/kb/ht1925 twice. Below is the transcript. Process: iTu

  • " " in soap message

    Hi, We receive a soap message with the characters "&lt" and "&gt".  The soap adapter is unable to parse this as "<" and ">".  Is there a way to translate "&lt" to "<" without creating an adapter module? Thanks.

  • Assigning the library to a report in report painter

    Hi All, I have developed a new Z report in report painter by copying from an existing report called 3CST6. (Actual/Plan/Variances Proj + Responsible). But I would like to know to which library this report belongs to. (As this information is needed du

  • INSERT INTO TABLE (SELECT -----)

    I laready posted But i think people got confused this is the same query in easiest way Hi Please please here Insdie the curusr FOR Loop i am using INSERT INTO by SELECT (see the below code EACH INSERT WILL FETCH 800-1000 records Minimum !!!) In that

  • P Pavilion dv5 1004nr just went black, will not turn on.

    HP Pavilion dv5 1004nr just went black, will not turn on. Just flashes three times when start is pushed.