Simulating a button click form code

Hi All,
I was just wondering, if its possible to simulate a button click from code.
simulating a button click by user.
Regards,
ND

You can do this with different methods. The question is why would you do this?
The use case behind your question would help us to give you the answer which best fits your needs.
Timo
P.S. please mention your jdev version and the UI technology.

Similar Messages

  • Very Urgent! Print Report output to local printer on button click in form

    In Sales Order Form there is a print receipt button. In current situation On Clicking the 'Print Receipt Button' it submits a XML Publisher report(PDF output) to the concurrent manager. Currently to print that report i need to go view--> requests--> view output and then print. According to my new Requirement i need to print that report directly to local printer on one simple Print receipt button click in form.
    I am trying to call the printers on server using custom.pll. The report is running successfully but it is not printing output to the local printer. I need to print the report to the local printers based on responsibility. Local printers are available on apps server. Can anyone help me on this issue ASAP.
    Is it possible to print the document using custom.pll? Is there any other alternative to print the report on simple button click in form.
    Environment: Apps 11.5.10.2, Forms 6i
    Here is the code that i am using in my custom.pll.
    if (v_form_name = 'OEXOETEL' --and v_block_name = 'LINES_SUMMARY'
         and name_in('parameter.ACTIONS') = 'PAYMENT_RECEIPT' )THEN
    l_organization_id := Name_In('PARAMETER.OE_ORGANIZATION_ID');
    l_order_header_id := Name_In('ORDER.header_id');
    select to_number(oe_sys_parameters.value ('SET_OF_BOOKS_ID')) into l_sob_id from dual;
    xml_layout := FND_REQUEST.ADD_LAYOUT('XXAFP','XXAFPOEXPMTRCRTF','en','US','PDF');
    select a.profile_option_value
    into v_printer_name     
    from fnd_profile_option_values a
    , fnd_profile_options b
    , fnd_profile_options_tl c
    , fnd_user fu
    where a.profile_option_id = b.profile_option_id
    and c.profile_option_name = b.profile_option_name
    and fu.user_id (+) = a.level_value
    and c.language = 'US'
    and c.user_profile_option_name='Printer'
    and a.level_id = 10003 ;
    if (FND_SUBMIT.SET_PRINT_OPTIONS(v_printer_name, 'Portrait', 2, TRUE, 'N'))
         then
    l_new_request_id := FND_REQUEST.SUBMIT_REQUEST('XXAFP','XXAFPOEXPMTRC',
    null,null,FALSE,l_sob_id,l_organization_id,NULL,NULL,l_order_header_id,
    chr(0), '', '', '', '', '', '', '', '', '', '',
    end if;
    fnd_message.set_string('Request Submitted for Custom Payment Receipt. Request ID is '||l_new_request_id);
    fnd_message.show;
    copy('NULL','parameter.ACTIONS');
    IF (l_new_request_id = 0) THEN
    FND_MESSAGE.RETRIEVE;
    FND_MESSAGE.ERROR;
    else
    l_commit_result := APP_FORM.QuietCommit;
    END IF;
    I need to complete this requirement immediately. Can anyone suggest me better ways in doing this.
    Thanks,
    Srinivas

    I solved this problem myself using shell script through custom.pll. I wrote shellscript and called that shellscript through FND_REQUEST.SUBMIT_REQUEST.It printed 2 copies to local printer.

  • Download the PDF Form as a attachment when button click in BSP application

    Hi All,
    I have scenario, when button click in the BSP application PDF Form want to download in the IE (like one window open with Open,Save and cancel button).
    I have written this code:
    data: pdf type fpformoutput-pdf.
    < Logic for populate value to pdf field ....
    .>
    response->set_header_field(
                         name  = 'cache-control'
                         value = 'max-age=0' ).
      response->set_header_field(
                         name  = 'content-disposition'
                         value = 'attachment; filename=webforms.pdf' ).
      response->set_data( data   = pdf ).
    Once button is clicked pop up is opened and closed automatically because of browser or adobe reader issue.
    How can I resolve this problem ?
    In the IE i need to change any settings ?
    IE version = 7.0
    Adobe reader = 9.0
    I have tried in the same code with IE = 6.0 and adobe reader 8.1.2 its getting download the pdf form working fine.
    The same think i want in IE 7.0 and adobe reader 9.0, what needs to be done ?
    Regards,
    Boopathi M

    Hello Ravi,
    Best would be to bind the dataSource of the InteractiveForm ui element to the parent node containing the table's data. Then specify a name of a template to be created in the templateSource and hit <enter>. Some popups later, the system will have created a template from the structure of the context. All you need to do now is to drag&drop the data structure inside the template designer to the template itself. This will result in a table. Save, activate and return the Web Dynpro view. Don't forget to unbind the pdfSource and enjoy.
    Best regards,
    Thomas

  • Attachments in document library form or list form sent to another Document library on click without code

    Hello,
    I am trying to allow my users to use my form, fill out the fields, add attachments and then on button click the form will be attached to the document library (already done) and the attachments the user added will be automatically sent to another document
    library so that I can send them to another location separately from the form.
    So the sequence of events is:
    User enters in data
    User attaches documents
    User submits data to document library
    Attachments are sent to a separately document library
    Unfortunately I can't use code to go about this so this leaves out the COM but is there an out of the box way to go about this?

    Hi, 
    Kindly check out below mentioned URL for more details on this issue.
    http://sharepoint.sureshc.com/2012/12/publish-different-infopath-forms-into.html
    http://social.msdn.microsoft.com/Forums/en-US/653449d2-7dd2-4a94-862e-32e393ef4cbc/put-an-attached-file-from-an-infopathform-into-a-document-library
    I hope this is helpful to you. If this works, Please mark it as Answered. Regards, Dharmendra Singh (MCPD-EA | MCTS) Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Single form Multiple Actions based on button click

    Hi,
    I have to call two different actions based on button click from single <form > .
    How to achive this?.
    Thank you

    Hi,
    I am using struts <html:form> and my code is as follows
    <script language="javascript">
              function setAction(val){
         if(val==A){
                   window.open(document.forms[0].action="preview.do");
         }else if(val==B){
         document.forms[0].action="create.do";
              document.getElementById('fcreate').submit();
    </script>
    <html:form action="/create.do" >
    <html:text property="name">
    </html:form>
    action is mandatory for <html:form>
    Its not sending the form elements, when I click the preview button.
    Create button works fine. In struts-conig, I have taken same form name for create and preview actions
    Please give me some tips
    Thank you

  • Invoking another form from a button click..

    Hi,...
    I am a beginner in Java Swing Programming using the Netbeans IDE.I want to invoke a form from an existing form thru a button click; thnx...
    Code:
    1st form : NewJFrame.java
    public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jButton1 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(151, 151, 151)
    .addComponent(jButton1)
    .addContainerGap(176, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(130, 130, 130)
    .addComponent(jButton1)
    .addContainerGap(147, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    // End of variables declaration
    2nd Form:
    public class NewJFrame1 extends javax.swing.JFrame {
    /** Creates new form NewJFrame1 */
    public NewJFrame1() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 400, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 300, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame1().setVisible(true);
    }

    shelton141 wrote:
    using the Netbeans IDE.I want to invoke a form from an existing form thru a button clickNote that, instead of JFrame, we normally use JDialog (either a modal or a non modal) for secondary windows.
    We can add an actionPerformed event to the jButton1 in design mode, or manually like this:
    public NewJFrame() {
        initComponents();
        jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                new NewJFrame1().setVisible(true);
    }

  • How to code on button click how to increase row height in iphone/ios/uitableview

    how to code on button click how to increase row height in iphone/ios/uitableview
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
        pppp=[postText objectAtIndex:indexPath.row];
        CGSize maxSize = CGSizeMake(280, MAXFLOAT);//set max height
         CGSize cellSize = [pppp sizeWithFont:[UIFont systemFontOfSize:14]
                           constrainedToSize:maxSize
                               lineBreakMode:NSLineBreakByWordWrapping];//this will return correct height for text
        // return  cellSize.height+115;
        BOOL isSelected = [self.selectedIndexPaths containsObject:indexPath];
        CGFloat maxHeight = MAXFLOAT;
        CGFloat minHeight = cellSize.height+115;
        CGFloat constrainHeight = isSelected?maxHeight:minHeight;
       CGFloat constrainWidth  = tableView.frame.size.width - 20.0f;
        NSString *text       = hChildPost[indexPath.row];
        CGSize constrainSize = CGSizeMake(constrainWidth, constrainHeight);
         CGSize labelSize     = [text sizeWithFont:[UIFont systemFontOfSize:15.0f]
                                constrainedToSize:constrainSize
                                    lineBreakMode:NSLineBreakByCharWrapping];
       // return MAX(labelSize.height+75, 100.0f);     return MAX(labelSize.height+75,cellSize.height+115);    
    i used this code but it crashed app

    On what line did it "crashed app" and what was the exception? The line within this function, not in main.m. If you haven't figured this out yet: view the debugger output, try single stepping, and/or add NSLog messages in the function.

  • Hide/show a form upon button click

    Hi
    I want to show/hide different form upon button clicks. Also I want to clear the data from a form upon button clicks. How can I achecive this? Thanks in advance.

    Hi,
    Create one boolean variable in your datastore. Click of the button should set the value to false and you can bind the same variable to the visibility property so that you can hide and display accordingly. For making the values blank, you can put condition on the detault value formula IF(!<your datastore variable>,"",<value needed>)
    Regards,
    Murtuza

  • How to run report on Button Click in Forms 9i

    Hi ,
    I want to run a report , when I press button on form
    it is RDF file . I have complied it and create a REP File .
    I has also set the report path in registry / HKEY_LOCAL_MACHINE/ SOFTWARE /ORACLE/ HOME1
    And then i has written these command line on Button click
    Declare
         pl_id           ParamList;
         al_id Alert;
         al_button     Number;
         M_RepFile     Varchar2(80);
    Begin
         pl_id := Get_Parameter_List('tmpdata');
         IF NOT Id_Null(pl_id) THEN
              Destroy_Parameter_List( pl_id );
         END IF;
         pl_id := Create_Parameter_List('tmpdata');
    Run_Product(REPORTS,'sitereport', SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id,NULL);
    Show_Window('MAIN');
    End;
    Message('Now Closing');Message('Now Closing');
    But only message at last is showing . No report being open .

    Look at this one
    Re: Run Report10g  Through form 10g

  • BSP code to open new page in new window after button click

    Hi expert,
    I have a requirement to write a BSP code to open new page in new window after button click. I have done the same for opening in same window but not for opening in new window.
    Can you please help me out with the code in which the page opens in new window and the menubar & Addressbar is displayed in hide mode.

    Hi,
    To add more with Anubhav...
                              onClientClick = "javascript:window.open( 'pop.htm' ) "
    You can create a pop.htm page, and call the same in another page using the above code.
    Refer standard BSP examples, SBSPEXT_HTMLB, SBSPEXT_PHTMLB, SBSPEXT_XHTMLB. You can run the default.htm pages and see what way you want to design your BSP.
    Thanks,
    Sreekanth

  • Show image on the form Java WS gets image. Call this WS on button click

    Hi,
    Is there a way to show an image on the form. On the form I have along with the data I have a button that when clicked get and show the image itself on the form. I have a Java WebService that gets the image from the remote location. How can I make the button click event to call this Web Service and show the image on the form itself. Any help is appreciated.
    Thanks

    WHiteSox, are you on client/server or web version.
    which version of forms are you using.
    something i can think of is.
    during the click to call the webservice, copy the image to the local system.
    next step is, using READ_IMAGE_FILE built in which reads the image from the local file system and displayed on the forms image item.

  • Open system form on button click

    Hello Expert,
    How to open system form(invetery transfer from) on button click
    Regards,
    Abhinav Lalpurwala

    Hi Abhinav
    Try This.....
    'In Button pressed event
       sbo_application.ActivateMenuItem("3080") 'For Inventory Transfer form
    Thanks
    Shafi

  • How to blur the windows media player in windows form on a button click?

    Assaliam-o-Alaikum
    i want to disable the functionality of media player by default.But when button clicked it would enabled.
    Any idea how to implement it.
    thanks

    Assaliam-o-Alaikum
    i want to disable the functionality of media player by default.But when button clicked it would enabled.
    Any idea how to implement it.
    thanks
    Hi,
    It seems that you want to disable that media player, the way shared by Pisteuon works for creating a blur for both window and controls.
    If you want to disable that media player, you could consider using the following way, in this case we need the class below.
    ImageCapture.
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Linq;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    namespace YourNamespace
    public class ImageCapture
    [StructLayout(LayoutKind.Sequential)]
    public struct RECT
    public int left;
    public int top;
    public int right;
    public int bottom;
    [DllImport("User32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam);
    [DllImport("User32.dll")]
    public static extern IntPtr GetDesktopWindow();
    [DllImport("User32.dll")]
    public static extern IntPtr GetWindowDC(IntPtr hWnd);
    [DllImport("User32.dll")]
    public static extern IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDC);
    [DllImport("User32.dll")]
    public static extern IntPtr GetWindowRect(IntPtr hWnd, ref RECT rect);
    public const int SRCCOPY = 0x00CC0020;
    [DllImport("gdi32.dll")]
    public static extern bool BitBlt(IntPtr hObject, int xDest, int yDest, int width, int height, IntPtr hObjectSource, int xSrc, int ySrc, int dwRop);
    [DllImport("gdi32.dll")]
    public static extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int width, int height);
    [DllImport("gdi32.dll")]
    public static extern IntPtr CreateCompatibleDC(IntPtr hDC);
    [DllImport("gdi32.dll")]
    public static extern bool DeleteDC(IntPtr hDC);
    [DllImport("gdi32.dll")]
    public static extern bool DeleteObject(IntPtr hObject);
    [DllImport("gdi32.dll")]
    public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject);
    public static Image CaptureControlImage(Control c)
    IntPtr hSrc = c.Handle;
    IntPtr hdcSrc = GetWindowDC(hSrc);
    RECT rWindow = new RECT();
    GetWindowRect(hSrc, ref rWindow);
    int width = rWindow.right - rWindow.left;
    int height = rWindow.bottom - rWindow.top;
    IntPtr hdcDest = CreateCompatibleDC(hdcSrc);
    IntPtr hBitmap = CreateCompatibleBitmap(hdcSrc, width, height);
    IntPtr hOld = SelectObject(hdcDest, hBitmap);
    BitBlt(hdcDest, 0, 0, width, height, hdcSrc, 0, 0, SRCCOPY);
    SelectObject(hdcDest, hOld);
    DeleteDC(hdcDest);
    ReleaseDC(hSrc, hdcSrc);
    Image img = Image.FromHbitmap(hBitmap);
    return img;
    Add a panel to bring to front, and draw what that media player looks as its background image.
    Panel myPanel; //add that panel to disable that media player
    private void button2_Click(object sender, EventArgs e)
    if (this.myPanel == null)
    myPanel = new Panel();
    myPanel.Size = this.axWindowsMediaPlayer1.Size;
    myPanel.Location = this.axWindowsMediaPlayer1.Location;
    DWM_BLURBEHIND bb = new DWM_BLURBEHIND(true);
    DwmEnableBlurBehindWindow((IntPtr)this.axWindowsMediaPlayer1.Handle, ref bb);
    myPanel.BackgroundImage = ImageCapture.CaptureControlImage(this.axWindowsMediaPlayer1 );
    this.Controls.Add(myPanel);
    myPanel.BringToFront();
    //remove that panel to enable that media player
    private void button3_Click(object sender, EventArgs e)
    { if (this.myPanel != null)
    this.Controls.Remove(myPanel);
    myPanel = null;
    Result:
     Regards,
    Carl
    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.

  • How to generate .xls file on a button click in Forms 10g

    Hi
    I am using forms 10g.
    On a button click I want to generate a .csv or .xls file (data in these file should be fetched form database).
    Could you please tell me how can I do this?
    Regards

    Hello 576726,
    where do you want to store the file?
    On the client? If it uses Windows as OS and has Excel installed you can use CLIENT_OLE2, otherwise you can write files using CLIENT_TEXT_IO.
    On the server? You can use utl_file or a package that allowes to write formatted/multiple worksheets like
    https://xml-spreadsheet.samplecode.oracle.com/ or
    https://exceldocumenttype.samplecode.oracle.com/
    Another solution by Friedhold Matz is linked at Re: Gride in Oracle Formns 6i
    Regards
    Marcus
    Edited by: Marwim on 17.11.2010 07:18

  • How to code on button click increase cell height ?

    hi,
    Am new in development .Am creating app same like facebook.i have table view controller in that every cell having button .on perticular button click i want to add view to that cell .on same same when i click second time then it hide the addded view.then accordinly its rezise the row.
    plz help out how to to?

    On what line did it "crashed app" and what was the exception? The line within this function, not in main.m. If you haven't figured this out yet: view the debugger output, try single stepping, and/or add NSLog messages in the function.

Maybe you are looking for

  • IBooks 1.3 , automaticly start audio / video

    Hello, after the update iBooks to version 1.3 i have the following problem. If i start the app and choice the Book "Säulen der Erde" the app plays the audio or video part of the book directly. So every time i open the book i hear the sound. This is t

  • Size of comment icon

    I would like to know how to change the size of the comment symbol. I don´t know what I did but the symbol (standard speech bubble) got much bigger than usual and I would like to get back to the original size.

  • Process multiple files quit working in PSE9 for Windows

    I've used this feature through multiple versions of PSE with no trouble. Now, all of a sudden, it quits processing on the very first file in the batch saying something like "cannot process <name> because it is in use by another program or was left op

  • Creating Secondary Domain

    I am having issues in one of my portal domains that is ongoing. In the interim I would like to create an additional domain on the same servers. Do I need to have a new database built for this or does it store the portal tables completely seperate sin

  • Unable to create CrystalReportViewer control programatically at run time

    Hi I'm not sure the best place to post this, so I'm placing it in Crystal Reports and BusinessObjects Enterprise. I'm using Visual Studio 2010 to create a web application which will serve as a reporting portal for BOE XI 3.1. I first installed Crysta