How do a simulate a button click from the code in BSP

Guys,
I have a push button .I need to simulate the click of that button some way through the code (in the view or controller ).Maybe by raising an button event .Has anybody done it ? Any ideas ?
Thanks,
Manoj

Hi,
so after reading your "This is the real solution" I got it
In my opinion there are two possible solution:
1)When you hit the ok button on the valuehelp on view B two things happen:
a)You copy the selected values to the inputfield on view A
b)You raise an event on view A by clicking an invisible button on view A or using the <bsp:htmlbEvent> like Thomas suggested. However the code which clicks something on view A has to be in view B (the inputhelp). So you will have to change the inputhelp extension by adding a new attribute. I would only choose this solution when you are sure that you need this functionality also for other applications. The extension could look like this:
<zkeg:inputHelp id       = "In5"
                        value    = "<%= data5 %>"
                        rfcDest  = "D10088t"
                        objtype  = "DRAW"
                        objname  = "Document"
                        param    = "DocumentNumber"
                        keyField = "DOKNR"
                        parentFunctionToCallOnOkClick = "refreshSite()" />
The inputfield will then generate a javascript statement like this: parent.refreshSite();
and puts it in the function that is called when a user clicks on the OK button.
2)You attach an onChange event listener to your inputfield on view A. When a value is entered into the field the event handling javascript function raises a server event. Brians weblog shows you how the call the event and this OnChange Event for inputField shows you how to add the onChange event to the inputfield.
Btw really interesting problem I would love to read a weblog about it when you solved it
regards,
Thomas

Similar Messages

  • 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"/>

  • How to open a Filechooser on a button click from jsp page

    can anyone tell me how to open a Filechooser on a button click from a jsp page.
    Thanks

    <input type="file" name="myfile">

  • How do I simulate a right-click in Windows when connected with Remote Desktop 8.0 for Mac OS X?

    When connecting to a remote Windows 7 OS from Mac OS X 10.8.5 with Microsoft Remote Desktop 8.0.24091, I'm not able to simulate a right-click with the Apple magic mouse.  
    On an older version Microsoft Remote Desktop Client version 2.1.1, I can hold down shift+ctl on the Mac and click the magic mouse to simulate a right-click in Windows.  With this new version RDP 8.0, I can't find any way to simulate a right-click,
    other than to select "Swap mouse buttons" under settings, and then every click is a right-click and then I'm no longer able to left-click (which is even worse).  I've tried several key combinations and nothing seems to work.  Am I missing
    something simple here with the new RDP 8.0 application, or is the right-click simulation not (yet) functional?  
    Any help is greatly appreciated, thanks!

    In order to make use of the right-click inside an open session you have three options:
    Standard PC two button USB mouse
    Apple Magic Mouse: To enable right-click, clickSystem Preferences in the dock, click Mouse, and then enable Secondary click.
    Apple Magic Trackpad or MacBook Trackpad: To enable right-click, click System Preferences in the dock, click Mouse, and then enable Secondary click.
    Extracted from "Remote desktop Client on Mac: FAQ"
    http://technet.microsoft.com/en-us/library/dn473006.aspx

  • Opening new window on button click from pdf without loosing session

    Hi,
    In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
    On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
    For opening new window from pdf button click we are using
    var dynamicUrl3 = myappurl;
    app.launchURL(dynamicUrl, true); 
    How can i open new window with the same sesion from the pdf button.
    Please help for the same.
    Thanks,
    Abhijit Mohite.

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • On Button click change the button display text from LOCK to UNLOCK

    Hi Freinds,
    I am rendering a TreeByNestingTableColumn with two columns  like:  Name , Status as below shown. In The status column I inserted a Table Cell editor Button type and  the button element property text mapped to the context attribute called statusButton and set the button name in the code to display as LOCK. When the tree renders all the vales are displaying in status column as LOCK. Now whrn the user click on LOCK i should fire the event and change the button text from LOCK to UNLOCK. The same way when they click on UNLOCK and i have change to LOCK. please help how to do this.
       Name                          Status
    |> Employee1------------------LOCK (when i click on lock  button here, his and under neath of him button status should                 
            |>Employee2-----------LOCK    change from LOCK status to UNLOCK)                                                     
                   |>Employee3----LOCK
    Thanks in advance.
    Thanks
    Srini

    Armin,
    Yes I removed the method and created the calicualted value as you suggested and I able to get the out put what i have asked.
    My complete scenario is some thing like this, i able to complete upto certain level but not able to make it work for complete scenario, I appreicate your comments or advice for getting me the below output
    I have a TreeByNestingTableColum UI rendering with three columns as NAME(node |>), STATUS(Toggle Button) and PLANNING (Text view)  (developed based on sample tutorial Integration of a Tree Structure in a Web Dynpro Table.pdf)
    I am trying to get this output:
    From the sap backed i am getting flag value, based on that i have to render Tree UI columns NAME,  STATUS(Toggle Button) and PLANNING (Text view). if the flag is null i have to show as LOCK and In Planning else Unlock and Submitted  (please see the below picture for clear idea)*
    if (statusflag = ""){
    i have to show values in two columns like Lock ...Planning
    } else
    show values in two columns like Un Un Lock ...Submitted
    One more thing is , If i lock a record at secound node level , then all the records should locked underneath of that node (it could be 2 nodes or 10 nodes) and then the status column values should change from lock to Unlock and Planning column values should change from In Planning to Submitted. where as when i Click on Unlock , only that perticular record (not node level) should changed from unlocked to Lock and planning is  from Submitted to In Planning.
    This is the functionality actually I am looking for.
    Here the tree sample:
    Name                        Status              Planning
    |>M1                         Lock                 In Planning
       |>M2                      Lock                 In Planning
         *M2a                    Lock                 In Planning
       |>M3                    Un Lock                Submittd
    Thank you.
    Srini

  • I have a powermac dual g5 2.0 that wont start up.When I plug it in I get the click from the power supply. When I hit the start button, the white led on the front panel lights up and stays lit. No whir sound from the hard drive or the fan. No lights on the

    I have a powermac dual g5 2.0 that wont start up.When I plug it in I get the click from the power supply. When I hit the start button, the white led on the front panel lights up and stays lit. No whir sound from the hard drive or the fan. No lights on the motherboard

    The click usually indicates a big problem, but...
    How to reset the SMU/PMU on a Power Mac G5 (Late 2004) or Power Mac G5 (Late 2005) ...
    http://support.apple.com/kb/HT1436
    Earlier G3, G4, G5 models...
    http://support.apple.com/kb/HT1939
    Might be time to replace the PRAM Battery, 4 years is close to their lifespan, far less if ever without AC power, & can cause strange startup problems...
    See which one your G5 has...
    http://eshop.macsales.com/item/Newer%20Technology/CR2032/ 
    http://eshop.macsales.com/item/Newer%20Technology/BAA36VPRAM/ 

  • Simulate any mouse click from webview

    How can I simulate any mouse click on any element of the site in webview ? (I have not managed yet to jquery and javascript control 100% of cases)

    http://forum.java.sun.com/thread.jsp?forum=4&thread=191468
    http://forum.java.sun.com/thread.jsp?forum=5&thread=135141
    http://forum.java.sun.com/thread.jsp?forum=54&thread=202069
    http://forum.java.sun.com/thread.jsp?forum=5&thread=11443
    this are some results of search applet browser +close                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to populate a sharepoint 2010 list from the active directory. How to populate a sharepoint 2010 list with all sharepoint user profiles

    How to populate a sharepoint 2010 from the active directory.
    I want a list of all the computers in the active directory,
    another one with all users.
    I want also to populate a sharepoint 2010 list from the sharepoint user profiles.
    Thanks
    sz

    While
    the contacts list is usually filled out for contacts that are outside the company, there are times when you would use a contacts list to store internal and external resources.  Wouldn’t it be nice if you didn’t have to re-type your internal contacts’
    information that are already in the system?  Now you can with a little InfoPath customization on the contacts list. 
    Here’s our plan:
    Create the contacts list, and open in InfoPath
    Create a data connection to the User Profile web service
    Customize the form adding some text, a people picker and a button
    Create InfoPath rules that will populate the contact fields from the user fields in the User Profile store
    Let’s get going!  Before we begin, make sure you have InfoPath 2010 installed locally on your computer.  I also want to give credit Laura
    Rogers and Darvish Shadravan’s book Using
    Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step.  I know it looks like a lot of steps, but it’s easy once you get the hang of it.
    So obviously we need a contacts list.  If you don’t already have one, go to the SharePoint site where it will live, and create a contacts list.
    From the list, click the List tab on the ribbon, then click Customize form:
    So now we have our form open in InfoPath 2010.  Let’s add our elements to the form. 
    Above all the fields, let’s add some text instructing users what to do with the the field we’re about to add (.e.g To enter an existing user’s information, choose the user below).
    Insert a people picker control by clicking the Person/Group Picker control in the Controls section of the ribbon.  This will add a column to the contacts list called group.
    Below the people picker, insert a button control from the same section of the ribbon as above.  With the button still highlighted, click the Control Tools|Properties tab on the ribbon. 
    Then in the Label box, change the text to something more appropriate to our task (e.g. Click here to load user data!).
    You can drag the button control a little larger to account for the text.
    We should end up with something like this:
    Before we can populate the fields with user data, we need to create a connection to the User Profile Service.
    Add a data connection to the User Profile Service
    Click the Data tab on the ribbon, and click the option From Web Service, and From SOAP Web Service.
    For the location, enter the URL of your SharePoint site in the following format – http://<site url>/_vti_bin/UserProfileService.asmx?WSDL.  Click Next.
    Note - for the URL, it can be any SharePoint site URL, not just to the site where your list is.
    For the operation, choose GetUserProfileByName.  Click Next.
    Click Next on the next two screens.
    On the final screen, uncheck the box for “Automatically retrieve data when form is opened”. This is because we are going to retrieve the data when the button is clicked, also for performance reasons.
    Now we need to wire up the actions on our button to populate the fields with the information for the user in the people picker control.
    Tell the form to read the user from the people picker control
    Click the Home tab on the ribbon.
    Click the button control we created, and under the Rules section of the ribbon, click Manage Rules. Notice the pane appear on the far right.
    In the Rules pane, click New –> Action. Change the name to something like “Query and load user data”.
    Leave the condition to default (none – rule runs when button is clicked).
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Click the Show advanced view on the bottom.  At the top, click the drop down and choose the GetUserProfileByName
    (Secondary) option.  Expand myFields and queryFields to the last option and highlightAccountName.  Click ok. 
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Again click the show advanced view link, but this time leave the data
    connection as Main. Expand dataFields, then mySharePointListItem_RW.  At the bottom you should see a folder called group (the people picker control we just added to the form).  Expand this, then pc:Person,
    and highlightAccountId.  Click Ok twice to get back to the Rules pane.
    If we didn’t do this and just queried the user profile service, it would load the data of the currently logged in user.  So we need to tell the form what user to load the data for.  We take the AccountID field from the people
    picker control and inject into the AccountName query field of the User Profile Service data connection. 
    Load the user profile service information for the chosen user
    Click the Add button next to “Run these actions:”, and choose Query for data.
    In the popup, for Data connection, click the one we created earlier – GetUserProfileByName and clickOk.
    We’re closing in on our goal.  Let’s see our progress.  We should see something like this:
    Now that we have the user’s data read into the form, we can populate the fields in the contact form.  The number of steps to complete will depend on how many fields you want to populate.  We need to add an action step for
    each field.  I’ll show you one example and then you will just repeat the steps for the other fields.  Let’s update the Job Title field.
    Populate the contact form fields with existing user’s data
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Highlight the field Job Title.
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button.  Click the Show advanced view on the bottom. At the top, click the
    drop down and choose theGetUserProfileByName (Secondary) option.  Expand the fields all the way down until you see the Value field.  Highlight it but don’t click ok, but click the Filter
    Data button, then Add. 
    For the first dropdown that says Value, choose Select a field or group.   The value field will be highlighted, but click the field Name field
    under PropertyData.  Click Ok. 
    In the blank field after “is equal to”, click in the box and choose Type text.  Then type the text Title. 
    Click ok until you get back to the Manage Rules pane.  The last previous screen will look like this.
    We’re going to update common fields that are in the user’s profile, and likely from Active Directory.  You can update fields like first and last name, company, mobile and work phone number, etc.  For the other fields, the
    steps are the same except the Field you choose to update from the form, and the very last step where you enter the text will change.  Here’s what the rules look like when we’re done:
    We’re all done, good work!  You can preview the form and try it now.  Click Ctrl+Shift+B to preview the form.  Once you’re satisfied, you can publish the form back to the library.  Click File –> Quick
    Publish.  Once it’s done, you will get confirmation:
    Now open your form in SharePoint.  From the contact list, click Add new item.  Type in a name, and click the button and watch the magic happen!

  • How do I get rid of BTFON from the service provider as it takes over everything??

    How do I get rid of BTFON from the service provider as it takes over everything??

    No idea what BTFON is or what "service provider" you mean, or what you mean by saying that it "takes over everything".  Is this a wireless network that you wish to stop connecting to?  If so, open System Preferences, click Network, then select AirPort, then click the Advanced button, then select the AirPort tab.  In the list that appears, select BTFON and click the '-' button.
    If that's not what you're talking about, you'll need to be more specific.

  • How do I remove already updated apps from the update area?

    How do I remove already updated apps from the update area?

    From ; Terence ONeill - UK
    KILLING ADOBE PHOTO DOWNLOADER AND TRAY ICON.
    Easy ! I use Comodo Pro Firewall.
    1) Click on DEFENSE box.
    2) Click on "View Active Process List"
    3) Look down the list of processes. Find APDPROXY.EXE.
    4) Click it, then click "Terminate and Quarantine"
    5) ALL DONE ! No more icon in tray and the program is killed.
    APDPROXY - This is lurking about, you can find it on SEARCH from the START button. BUT, you cannot delete it or move it and MSCONFIG does not work. You can disable it as many times as you like - it will keep coming back.
    SOLUTION ! Download CCleaner, it is a great little program and free.
    Using this you can click on TOOLS, then STARTUP. A list of programs are shown which are enabled at STARTUP. Disabling does not work, just click on APDPROXY and click DELETE. It`s GONE !
    All over in a flash - no more ADOBE PHOTO DOWNLOADER.

  • How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address

    Hello,
    Try Mail>Preferences>Accounts icon>Account Information tab>Click on the Outgoing SMTP server drop down, choose edit Server list, highlight the old one & click Remove.
    (Such convolution is worthy of Windows® in my estimation)

  • How do I remove an old file from the Finder Favorites list?

    Good Afternoon.
    I have a shiney new MBPro with 10.7.1.
    On my old machine running Snow Leopard, I had two .xls files I used often that I had dragged to the left side into the favorites. The truth is, I hadn't used them in months, but hadn't bothered to remove them. Then about ten days ago, the Bad Thing happened, and I had to replace my laptop rather suddenly. The nice folks at the Apple store transferred all the data and I was off an running in just a few hours.
    Now, I thought to myself, I should remove those two files since I don't use them any more. But how?
    If I click on them nothing happens. If I right-click on them, nothing happens. I can't drag them out because they don't drag and they aren't listed on the list of favorites that can be toggled on and off in preferences.
    I checked. The files did still exist but deleting them didn't remove their names from the favorites list.
    Any suggestions as to how to remove these two .xls files from the Finder's Favorites list?
    Thanks. A picture is below.

    The msot amazing person ,just posted an answer to my other question which worked here too.
    Three cheers for Kappy!
    Just hold down the CMD key and drag them off. How simple is that?? They didn't klnow this at the Genius bar when I asked this morning. I am amazed.
    I wish I knew how to send Kappy cookies.
    Thank you Kappy.

  • InfoPath form opens in the browser instead of InfoPath Filler when a link is clicked from the Approval Task email

    I have an admin approved InfoPath 2010 form that is web enabled. It is published to a SharePoint 2010 Forms library and an Approval Workflow is attached to it.
    The form needs to open up in the InfoPath Filler with the Workflow Task bar at the top so users can approve the task from within the form and not go to Tasks list to do so.
    Here's a problem I am experiencing: sometimes the form opens in InfoPath Filler and sometiems it opens in the browser when the link to approve the form is clicked form the email that is sent by the workflow.
    Windows 7, IE 9, MS Office 2010:
    The form opens up in InfoPath filler like it supposed to. The Workflow task bar is there for users to approve the form.
    Surface Pro with Windows 8.1, IE 11 and MS Office 2013
    The form opens up in the browser and there is no Workflow task bar at the top.
    Things that I've already looked at and tried which didn't solve the issue:
    - The forms library is exclusivly set to open documents/forms in the Client Application
    - Set the browser compatibility mode in IE 11, that doesn't work too well, because you have to do it every time you open the browser.
    - Setting browser compatility in IE 11 reintroduced another issue, of multiple login promts, which was fixed by entering the SharePoint site in question into the Trusted sites by a group policy. Adding the site to trusted sites made the forms open up in the
    browser.
    - Researched compatibility issues with InfoPath and Windows 8.1, cannot find anything.
    - Researched compatibility issues with InfoPath 2010, Windows 8.1 and SharePoint 2010, also didn't find anything.
    Can someone offer a suggestion on how to fix this problem, preferably with no code, because we are not allowed to put custom code on the server?
    I need to force InfoPath form to open in InfoPath Filler when the link to the form is clicked from the Workflow email. Also the login prompts should not pop up. Need it to work on all the platforms: Windows 7, and Surface Pro Windows 8.1.
    Thank you.

    Hi,
    Thank you for your response.
    [Steps about how to capture the capture the fiddler log]
    ===========================================
    1. Download fiddler from
    http://fiddler2.com/
    2. Install fiddler and launch fiddler.
    3. When the fiddler be launched, the log will be enabled automatically.
    4. You can click “X” to remove all the records before you reproduce the issue.
    5. If the web site has been configured to https. Please enable https option:
                 Click “Tools” -> “Fiddler Options”            
    Switch to HTTPS tab, then check “Capture HTTPS CONNECTs” and “Decrypt HTTPS traffic”.
    6. Then repro the issue.
    7. Click “File”->”Capture Traffic”, uncheck the Option “Capture Traffic” to make sure the “
    ” is not shown, that mean the logs has been stopped.
    8. Click “File”->”Save” ->”All sessions”, save the file.
    Any quesitons, please let me know.
    Best Regards,
    Dats Luo

  • I just did a system restore on my iphone 4 and it didnt prompt me to restore a back up. how do i restore a back up from the icloud now?

    how do i reload a back up from the icloud when i wasnt prompted?

    If you apps are still in iTunes, you should be able to sync them back to your computer.  Otherwise, if you have iOS 5 (5.01) on your phone you could redownload them by launching Apps, press the Purchased button at the bottom, press Purchased at the top, then Not On This Phone.  This will list your apps and allow you to redownload them.  If you've purchased apps using multiple Apple IDs, you will have to sign in to each of these IDs to be able to download all your apps (by going to Settings>Store>tap on the Apple ID, sign out, sign back in using another ID).

Maybe you are looking for

  • Date in other language

    DW has a built in date format that produces the date in English. Can I change this to another language? Regards, Adriana. [ put out the rubbish if you need to reach me by e-mail ] www.spinsister.nl

  • Sapscript print problem

    in sapscript in the grand total it shud appear like this. ****23,33,546.00 ie: everytime it gets printed (numerical value upto 10 crores) the first digits if they are not numerics (like the example sited) has to appear like '*'. pls help.

  • SQL Server 2000 connectivity probs

    hi frnds i wanna do the database connectivity with Microsoft SQL Server 2000 and for this i got the driver from the site of Microsoft ,named Microsoft SQL Server 2000 JDBC Driver . But on testing this driver i am getting the following errors which sh

  • Groovy expression for column total not working

    I want to show the column total. I have created a view accessor on the view object and a new attribute of Transient type and set its expression to AccessorName.sum("columnName"). But its values is never calculated when I test the view object. Any hel

  • Can't just install 6.0, must first install 4.8, then upgrade

    HI, Anyone else had this? I did a clean install of XP and installed 6.0 (thank goodness I have all install files since 4.7). However, though it installed okay, it left me with the problem of QT playing mp3 samples on websites, though I had all settin