Calling a button's events

Hi guys. I'm making a mortgage calculator for my java class. the program calculates a monthly mortgage payment using the user-defined parameters, and when/if the user clicks the "Amortization table" button the program creates a Jtable and populates it with the loan details.
The problem I am having is that if the user clicks the "Amortization table" button without first clicking the "calculate" button, the program just creates a blank JTable.
What I want to do is: when the user clicks the "Amortization button", if the label in which the monthly payment goes is empty, then do all the events from the calculate button, then create the amortization table.
Is there a way for me to call button's events? or somehow activate another button?

I tried that. The problem I was having was passing the user-entered amounts to the method. This is my current getPayment method
double getPayment(double dAmount, double dRate, int iTerm)
          dPayment = (dAmount*(dRate/1200))/(1-Math.pow(1/(1+dRate/1200),(iTerm*12)));
          return dPayment;
     }and this is my current actionPeformed for the calculate button:
public void actionPerformed(ActionEvent onClick)
          Object src = onClick.getSource();
          try
               if(src == bCalc)
                    dAmount = Double.valueOf(tAmount.getText());
                    dRate = Double.valueOf(tRate.getText());
                    iTerm = Integer.parseInt(tTerm.getText());
                    lPaymentAmt.setText(""+(currency.format(getPayment(dAmount, dRate, iTerm))));
          catch(Exception error)
               JOptionPane.showMessageDialog(null, "Invalid Input.  Please Try Again.","Input Error",
                                                 JOptionPane.ERROR_MESSAGE);
}If i was to do this the way you suggested, how would I send the items from the textfields to the method. I tried using the getText() method but it wouldn't work.
Any ideas?

Similar Messages

  • Call the button click event programmically

    I have customised the billing.aspx page.  I now need to programmically call the click event of the continue image button to continue to the next page.  I can't fire the click event.  Does any one know the click event name of the continue button?
    I've tried using this line to call the event
    this.btnNext_Click(this, new EventArgs());
    or
    this.btnNext_Clicked(this, new EventArgs());

    Thomas,
    You could also just click the button client-side with javascript:
    function clickTheButton(theButton){
        fireAnEvent(theButton,'click','MouseEvents');
    function fireAnEvent(theControl, evtName, theModule){
        if(document.createEvent){
            var evObj = document.createEvent(theModule);
            evObj.initEvent(evtName,true,true);
            theControl.dispatchEvent(evObj);
        else if(document.createEventObject) {
            theControl.fireEvent('on' + evtName);
    Cheers,
    Corbin

  • How to call a dynamic URL on 'button press' event, in MVC-based BSP

    Hi,
    My requirement is as below:
    On selecting a row in table view, and pressing a button, I need to open a browser.
    The Browser URL depends on the row selected.
    The key field from table view, is added at the end of the URL string.
    Shortly, I can say that, I am getting a value on row selection & want to pass it to button event.
    In Views Section, there are 2 tags- (1)table view & (2)button.
    Right now, I have put the code for getting the key field, in DO_HANDLE_DATA method.
    In Button's OnClientClick method, I have called the Javascript to open the browser.
    If I now write the code to concatenate the key field value to form the dynamic URL in 'OnClick' method,
    it will be called only after the browser is opened.
    (as OnClick event is executed only after OnClientClick event is executed)
    Could anyone please tell me what event (and in which tag) can be used to solve this.
    Is there any event which is triggered, as soon as the row is selected, &  before the button press event is triggered ?
    Would really appreciate responses made to this query.
    Thanks,
    Nisha Vengal.

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • How to call elem. Search help on Button click event in WD appilcation

    Hello All,
    i have requirement to call elem. search help on button click event in WD application. currently i am calling FM  F4IF_START_VALUE_REQUEST but getting the short dump as below,
    The following error text was processed in the system X31 : Screen output without connection to user.
    The error occurred on the application server saps_X31_31 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    SYSTEM-EXIT of program SAPLSDH4
    Function: F4_PRESEL_WITH_TABSTRIP of program SAPLSDH4
    Form: F4PROZ_STEP_PRESEL of program SAPLSDSD
    Function: DD_SHLP_SINGLE_STEP of program SAPLSDSD
    Form: F4PROZ_LOOP of program SAPLSDSD
    Form: F4PROZ of program SAPLSDSD
    Function: F4IF_START_VALUE_REQUEST of program SAPLSDHI
    Method: ONACTIONSEARCH_CUSTOMER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/50TU5ZEXF3K0IWCWE153==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    is there any way to achieve the required behaviour.
    please let me know.
    Regards,
    Chandra

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Button action event not call in dataprovider

    hi,
    i have JSF table and it's bound to Mysql database table. when i bound the table and run it's working properly but it's button action event is not call action. when i use static jsf table then it's table action event work properly.
    my jsp code is
    <ui:table binding="#{search.search_table}" id="search_table" lite="true" selectMultipleButton="true" sortPanelToggleButton="true"
                                style="height: 70px; left: 240px; top: 240px; position: absolute; width: 600px" title="Search Text :" visible="true" width="600">
                                <ui:tableRowGroup binding="#{search.tableRowGroup1}" id="tableRowGroup1" rows="5" sourceData="#{search.srch_tablevalDataProvider1}" sourceVar="currentRow">
                                    <!--    <ui:tableColumn headerText="Script" id="tableColumn2" width="700">
                                        <ui:staticText id="staticText4" text="#{currentRow.value['search_script']}"/>
                                    </ui:tableColumn>-->
                                    <ui:tableColumn binding="#{search.tableColumn13}" headerText="Search Word" id="tableColumn13" style="#{search.columnStyle}">
                                        <ui:staticText binding="#{search.search_word1}" id="search_word1" text="#{search.search_word1}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn4}" headerText="#{search_lang['search.contentName']}" height="39" id="tableColumn4"
                                        style="#{search.columnStyle}" width="100">
                                        <ui:staticText id="staticText1" onMouseOver="play_video(this);" text="#{currentRow.value['name']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn6}" headerText="#{search_lang['search.srchTag']}" id="tableColumn6"
                                        sort="search_tags" style="#{search.columnStyle}">
                                        <ui:staticText id="staticText3" text="#{currentRow.value['search_tags']}"/>
                                    </ui:tableColumn>
                                    <ui:tableColumn binding="#{search.tableColumn5}" headerText="#{search_lang['search.tpDetail']}" id="tableColumn5" style="#{search.columnStyle}">
                                        <ui:imageHyperlink action="#{search.action}" id="imageHyperlink1" text="#{currentRow.value['details']}"/>
                                        <ui:button action="#{search.button2_action}" id="button2" text="Button"/>
                                    </ui:tableColumn>
                                </ui:tableRowGroup>
                             </ui:table>and back bean code is
    public String button2_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            System.out.println("Invoke");
            return null;
        }i don't know what is problem there if found any solution, help me.

    You need to make sure that the getter of the datatable value returns exactly the same list in the apply request values phase of the form submit as it did during the render response phase of the initial display. Only this way JSF can find out which action which row was been invoked. Alternatively you can also place the data bean in session scope (which may have more impact), or use for example Tomahawk's t:dataTable with preserveDataModel attribute set to "true".

  • HOW TO CALL APPROVAL WORK FLOW ON BUTTON CLICK EVENT OF VISUAL WEB PART?

    Hiall,
    I created an OOB an approval work flow I want to start that approval work flow through visual web  part button click event
    In work flow Settings I selected to manually start .Is this possible ? if possible please guide me how to do this
    Thanking you,
    Arun  kumar

    Hi,
    If you have an instance of SPListItem, and know the workflow association name, you can start it. First you need to find workflow assocation instance and tell SPSite.SPWorkflowManager to start your workflow.
    See this for more information:
    http://blog.mmasood.com/2012/06/programatically-start-workflow.html
    Please remember to up-vote or mark the reply as answer if you find it helpful.

  • How to run a dialog's method from a button's event handler?

    I've created my first dialog from the samples, but I am having trouble figuring out how to run a method in my dialog from an button's event handler. Can anyone please point me in the right direction?
    function CreateDialog() 
        this.windowRef = null;
    CreateDialog.prototype.run = function()
        //...declare a bunch of vars
        // Create a window of type palette.
        var win = new Window("dialog", "Element Spray Generator",[iTop,iLeft,iTop + iWidth,iLeft + iHeight] );  // bounds = [left, top, right, bottom] 
        this.windowRef = win;
        // Add a frame for the contents.   
        win.btnPanel = win.add("panel", [iPadding,iPadding,iWidth-iPadding,iHeight-iPadding], "");
        .... add a bunch of other stuff ...
        win.btnAdd = win.btnPanel.add("button", [win.btnRemove.bounds.left - iPadding - iButtonWidth,win.lstImages.bounds.bottom + iSmPadding,win.btnRemove.bounds.left - iPadding,win.lstImages.bounds.bottom + iSmPadding +iTextHeight], "Add");
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- problem is on this line here!!
        this.EnableControls();  //<--- this works
        // Display the window
        win.show();
        return true;      
    CreateDialog.prototype.EnableControls = function (){
        var result = true;
        result = result && (this.windowRef.ddlPaths.selection != "");
        result = result && (this.windowRef.lstImages.items.length > 0);
        this.windowRef.btnOK.enabled = result;

    This may not be the reason, but when using the way I create dialogs 'this' inside of an onClick points to the control.
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- I would expect it to call another function of btnAdd
                                            // this.parent.EnableControls() might be what you want if the control is not in some other container

  • How do you fire a button click event on apex page from fancybox iframe that was created by page

    I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
    A couple of points:
    I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
    The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
    The click dynamic action on the button is calling the plugin to replace the html in the div.
    The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
    Can anyone help. Here is the fancybox code:
      function customProcessOnReadyState4(){
        for (var i=0;i<11;i++){
          $( "#tabs"+i ).tabs();
          $("#createNewExerciseLink"+i).fancybox({
              ''width''         : ''60%'',
              ''height''        : ''70%'',
              ''autoScale''     : true,
              ''transitionIn''  : 200,
              ''transitionOut'' : 200,
              ''type''          : ''iframe'',
              ''onClosed''         : function() {
                                         window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
    Here are the dynamic actions assigned to the button:
    5 - Execute JavaScript Code
    alert("Starting refresh");
    10 - Execute PL/SQL Code and Return Content [Plug-in]
    begin
      SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
    end;

    user setActionListener...
    <af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
                  <af:inputText value="#{bindings.Email.inputValue}"
                                label="#{bindings.Email.hints.label}"
                                binding="#{backingBeanScope.backing_ShuttlePage.it2}"
                                id="it2">
                    <f:validator binding="#{bindings.Email.validator}"/>
                  </af:inputText>
                  <af:commandButton text="commandButton 2"
                                    binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
                                    id="cb2" action="passing">
                    <af:setActionListener from="#{bindings.Email.inputValue}"
                                          to="#{processScope.detail}"/>
                  </af:commandButton>next jsf page:
                <af:outputText value="#{processScope.detail}"
                               binding="#{backingBeanScope.backing_ProcessScope.ot1}"
                               id="ot1"/>setPropertyListener also should work
    <af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/>

  • Sample code to call web dympro from event

    Hi.
    I have a web dympro form. I want to call this form with dynamic url to which I want to pass parameter transaction_id. For example url http://www.zzz.com&transaction_id=7712
    I created new button and event in component from which i want to make a call. Now i want to know if someone has a sample code which would from event call this dynamic url.
    Thanks in advance.

    hi,
    see below thread ,  may be it helps.
    Re: Start dynamic URL from CRM Opportunity

  • Disabled button fires events to event structure

    Hi all,
    I was trying to disable a Button on the frontpanel by using its enabled property while the event was executed. The ide wa not to create more events of this buttopn while its fucntion was executed. However thsi did not work.It was creating events even though it was greyed out.
    I troied two different versions:
    1) in the event case of the button (value changed) in a sequence I first dispalbned the button, execuded the code and then enabled it again
        Result: All events were generated even though the button was greyed out
    2)  in the event case of the button (value changed) in a sequence I disbaled the Button and then started a second event. The Second event executed the code and then enabled the Button egain
       Result: Even though the Button was greyed out events were generated
    3) in the event case of the button (value changed) in a sequence I first dispalbned the button, execuded the code and in the timeout event I thenenabled it again
       Result: No additional events were generated
    it seems that the enable state of the button is analysed at teh time when the event is execute din teh event case but not at the time when it was created?
    So I Tried the Time Input of the case expecting that it woudl give me a time stamp of the time when the key was pressed - but instead it gave me the time point when teh event was executed...
    Teh only othe rsolution was to set teh cursor to busy (however I dont want to see the changed cursor during the busy cycle)
    So how can I make shure that no additional events are fired during the time teh code of the Button s executed?
    Thanks for any help,
    Rainer

    to altenbach:
    The evet takes about one or two seconds - I checked the behaviour as shown in the attached examples with LV 8.5, LV 2010, TV2011, LV2012 - allways exactly the same behaviour.
    It does not make any difference weather you use switch when pressed or latched when pressed.
    It does not make any difference weathe ror not you tag "Lock front panel" for that event
    to sth:
    > If you disable a front panel control (ie the button) you cannot click on it and a value changed event will not be
    generated.
    This is my experience so far as well, but if you disable and enable the control within the same event it does not work (see attaced example 1) and 2). It only works if you do the enable in the timeout event.
    > The time stamp from the event case left hand property is the time of the event not the time of execution.
    > If you ask for the timer value inside the event case it will be the time of event case executing.
    In the attached exampel this is not the case. The time differecne between the Time input on the left and the Tick count
    placed in the event is 0 for all events generated whil the button is supposed to be disabled.
    As I wrote before, the explanation I have for this behaviour is that the events are generated by windows weather or not
    the button is disabled and they are queued to the event cue. Only when the event is handeled LabVIEW tests weather
    or not the button is disabled and ignores the event in case it is disabled. If the Disabling and enabling is done
    withim the same event the button pressed events are added to thw event queue and the button is set to enabled before the  next event (button pressed while it shoul be disabled) is handeled. When that event is handeled the button is enabled again (by the original event) and therefore the evenet is not ignored (because by the time of execution of the event the button is enabled again).
    If the button is enabled in the timeout event instead of the button change value event all event in teh queue are executed before teh timeout event. At their time of execution therefore the button is steill disabled. Only then the timeout event enables the button again.
    If the vi is set to busy (sand clock) this is activating actually a windows function/property and no events are queued to teh event queue by windwos. Therefore no button change event is added to teh queue.
    Funtciomn of the 3 attached Vis (LV 2010):
    Run the Vi, then press the Test button once - when it is greyed out click it a few more times. The test button value
    changed event has a 2 second delay. You will see the event counter increase, and you will see the time difference
    between the time property on the left of the event and the tick count vi whci is displayed in the waveform chart.  
    DisableButton 1: Disable and enable are ste in teh same event  
    DisableButton 2: The button is disabled then a second event is called to do the work and then enable teh button again
    DisableButton 3: The Button is disabled in button change value event and it is enabled again in teh timeout event.
    Attachments:
    DisableButton1-3.zip ‏29 KB

  • Button Fire Event Multiple Times

    Hey everyone.  I've somewhat inherited a LabVIEW program for a project I'm working on.  I need to fire an event in an event structure 20 times in a row to fully collect my data.  Right now i just have the event structure connected to a slider so i just slide it enough and it completes the 20 events needed.  Is there a way I can make one button fire an event 20 times?  I need the while loop for the entire program to run during these 20 times so a simple loop around the event code won't work.  Any ideas?  Thanks guys.

    I'd use another solution.
    When the button is pressed, start a dynamic VI that does the aqcuisition.
    When the VI is done, it sends a user event (or a value (signalling) event to
    some control), so the main VI knows it's done. By doing this, you seperate
    the DAQ and the MMI, which is good. Both VI's are kept simple. Put the data
    in a buffer, or pass it in the user event data.
    Timing and event structures are difficult. It's very inconvenient to exectue
    an event case every X sec. without using a dynamic VI (or parrallel loop).
    Using the time out event has it's own problems. The TO event is called when
    no other event occured for the given period. So if you'd add a mouse over
    event (as an example) the TO case isn't called at all when the mouse
    moves...
    You could also start a dynamic VI that creates a user event (or value
    (signalling) 20 times at some interval, and then quits. But it's just as
    complex as a dynamic DAQ vi, and less elegant.
    Regards,
    Wiebe.

  • HIde button on events

    Hi,
    Can some body elaborate how to hide buttons on events.
    Regards
    Sameer

    Hi,
    You can use PPR.
    Step 1. create a VO which contains one transient attribute of type boolean
    Step 2. Base button rendered property using SPEL
    Step 3. Initialize your VO for PPR(inintialization includes insertion of one row and set the attribute as True)
    Step 4. In the event handler where you want to hide button just set it false.
    Sample code:
    //Code to hide button
    public void handlePoApproveChangeEvent()
    // Get the special, single-row application properties and make the first
    // (only) row current.
    OAViewObject vo = (OAViewObject)findViewObject("SampleBrowserPVO1");
    OARow row = (OARow)vo.first();
    // Get the value of the view object attribute with the PO Approval
    // status.
    OAViewObject poVO = (OAViewObject)findViewObject("PurchaseOrderHeadersVO1");
    OARow poRow = (OARow)poVO.getCurrentRow();
    String status = (String)poRow.getAttribute("StatusCode");
    // Set the application property values based on the PO Approval
    // status value.
    if ("APPROVED".equals(status))
    row.setAttribute("HideButton", Boolean.FLASE);
    //Code to initialize VO
    public void initializePPRExamplePage()
    // Create purchase order header
    OAViewObject appPropsVO =
    (OAViewObject)findViewObject("SampleBrowserPVO1");
    if (appPropsVO != null)
    // If the VO already has a row, skip its initialization. Note that
    // calling getFetchedRowCount() won't perform a DB hit on a VO with
    // no SELECT and only transient attributes.
    if (appPropsVO.getFetchedRowCount() == 0)
    // Setting the match fetch size to 0 for an in-memory VO
    // prevents it from trying to query rows.
    // Calling executeQuery() is a small workaround to a known
    // BC4J issue that ensures that modified rows in this
    // transient view object are not lost after commit. See
    // View Objects in Detail for additional information about
    // both of these calls.
    appPropsVO.setMaxFetchSize(0);
    appPropsVO.executeQuery();
    // You must create and insert a row in the VO before you can start
    // setting properties.
    Row row = appProposVO.createRow();
    appPropsVO.insertRow(row);
    // Set the primary key value for this single-row VO.
    row = (OARow)appPropsVO.first();
    row.setAttribute("RowKey", new Number(1));
    row.setAttribute("HideButton",Boolean.TRUE);
    // Initialize the application properties VO (and the UI) based on the
    // default PO approval value set on the underlying object.
    handlePoApproveChangeEvent();
    else
    // throw exception
    } // end initializePPRExamplePage()
    SPEL Parameter:
    ${oa.myVOName.HideButton}
    Hope this help, Please refer JDeveloper guide for Topic Dynamic User Interface.
    Regards,
    Reetesh Sharma

  • IOS Home Button and Event.ACTIVATE/Event.DEACTIVATE

    Hi all,
    I read tons of questions re iOS Home Button and Event.ACTIVATE/Event.DEACTIVATE. Everything should work well if you set the proper listeners and save/restore your app state upon receiveing these events.
    My question is: Is there a way to tell difference between a Home Button press and an iOS notification alert or incomming call? In both cases, AIR will dispatch Event.DEACTIVATE, however I want to know if the user pressed the Home Button or if he just received an SMS/Calendar alert, and adapt my app state accordingly - i.e. if it's a Home Button press, change my app state to "Main Menu", otherwise (SMS/Calendar/alert) I will pause execution.
    NOTE: I don't want to override the Home Button behaviour, just want to tell if it's a Home Button press or SMS/Calendar/alert, and react accordingly. The iOS documentation states that in case of SMS/Calendar/alerts, (void)applicationWillResignActive:(UIApplication *)application is dispatched, and in case of actually going to background state (i.e. Home Button pressed) (void)applicationDidEnterBackground:(UIApplication *)application is dispatched.
    Thanks

    Any luck with this yet? I'm having the exact same issues but on a different device, the Kindle Fire.
    I need to determine whether a user hit the Home button, or hit the Quick Settings button (that accesses controls like volume). Air treats both events equally by broadcasting Event.DEACTIVATE. Unfortunately, the Amazon Appstore approval team thinks otherwise...
    It seems like there should be a simple, no-brainer way to track these events, but I'm beginning to suspect Air just is not capable. In that case, if you're developing for Kindle Fire, you may want to avoid going with Adobe.

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • How to generate barcode on button click event in PDF using adobe livecycle?

    I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
    Please give me right way for doing it .
    Thanks in Advance,
    Jaydeep Solanki.

    Hi vijay,
    What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
    http://forums.asp.net  for more efficient responses, where you can contact ASP.NET experts.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Video playing back choppy even in Source window

    I've been working on a project for a while and wanted to back it up to a hard drive. We have an internal hard drive bay so I shut the computer down, put in a 500GB hard drive, backed up the project, shut the computer down and removed the hard drive.

  • HP Officejet Pro 8610 setup ink cartridges not recognized

    I just purchased an HP Officejet Pro 8610, and was following the setup on the printer, installed the ink cartridges as shown in the "movie" guide, and the printer seems to not recognize that I have installed the 4 ink cartridges. They are the 4 cartr

  • There was an initialiation error

    I just bought a new LG GE20 20x DVD +- R Write Speed External Super Multi DVD Rewriter. I put a movie DVD in and it mounts on the desktop with the name of the movie, then an error appears stating There was an initialization error. [A valid DVD Drive

  • Need to reinstall CS6

    My mother board will be change for a new one because my computer is having problems I'm afraid I will have to reinstal my Photoshop CS6 I  can not afford to buy a new one what I should do????

  • Invite resources from a iPhone

    I have set up some locations and resources in OS X Lion Server iCal. I can invite them with no problems from any mac associated, but it doesnt work from iphones. What do i have to do to make it work there?