Invoking another command button while clicking on the other

Hi All,
I have an add form where I have 2 buttons, one is ADD and othe is SAVE. Each one of them will call different backing bean methods. When I Click on Add my save button should also be invoked. How can I do that?

You can do that using javascript. But note that only one action method would be executed on submit.
function submitSave(){
    var save = document.getElementById(//id for ur save button);
    save.click();
<h:commandButton value="Add" action="#{Bean.xyz}" onclick="submitSave()"/>
<h:commandButton value="Save" action="#{Bean.abc}"/>If both the buttons are in the same form, then only one action can be invoked on click of a button. If you want to execute both actions, you can handle the same on server side. After completing the action for your add button, from the same method you can invoke the action method for save button.

Similar Messages

  • Open a new window while clicking on the command button

    Hi,
    Can I open a pdf report in a new window when adf command button is clicked?
    I am using jdev11g
    Thanks

    Hi John,
    I found the goButton's destination expression do not read value from any controls e.g.: Input Text.
    Is there anyway to read some value, that input by user not in the db, on the screen?
    e.g.: I have a Input Text for user to input a date to print the report. I've tried to binding the control in backingBean, but I get a null value from the goButton's destination function.
    the jspx:
    <af:inputText label="Search" id="it1"
                            value="#{backingBeanScope.backing_goUrl.it1Value}" autoSubmit="true"/>
    <af:goButton text="goButton 1" id="gb1" targetFrame="_blank"
                           destination="#{backingBeanScope.backing_goUrl.searchURL}"/>in the backing bean:
    public class GoUrl {
      private String it1Value;
      public String getIt1Value() {
        return it1Value;
      public void setIt1Value(String it1Value) {
        this.it1Value = it1Value;
      public String getSearchURL() {
        String s = getIt1Value();
        return "http://www.google.com/search?hl=zh-tw&q="+s; // the result of s is always null.
      }Cheers,
    Samson Fu
    Edited by: Samson Fu on Aug 31, 2010 1:46 PM

  • Af:statusIndicator does not show busy icon when a command button is click

    Hi Guys,
    af:statusIndicator does not show busy icon or motion when a command button is click
    I am working on an excel data upload functionality on .jspx page. I use “af:inputFile” file uploader to upload an excel file then process the data and store it as a list of objects in memory and display it in “af:table” table
    I added “af:statusIndicator” to the page to show the user that the page is progressing while the data is uploading and when it is saving the data to the database.
    In this case, when the “af:inputFile” is clicked to upload the excel file - the status indicator shows a progress icon (movement) which is expected and is good. However, after the data have been display in the table when I click on a command button that saves the data to the database – I expected the status indicator to start its busy motion but that is not happening. Whereas, the command button grayed out and is disable when I clicked the button until the operation is completed.
    Is there any way to start the statusIndicator when a command button is clicked?
    I tried the following options
    *<af:statusIndicator id="si1_uploadStatus" partialTriggers="pc1:cb1 pc1:table"/>*
    Where pc1:cb1 is the command button and pc1:table is the table
    *<af:commandButton text="Submit Uploads" id="cb1"*
    *disabled="#{!viewScope.batchUploadController.allSavable}"*
    *partialTriggers="::infFilePath"*
    *action="#{viewScope.batchUploadController.saveUploadedData}"*
    *blocking="true"/>*
    Thanks,

    Can somebody please address this?
    Thanks,

  • ADF/JSF page loads when any command button is clicked

    Hello All,
    I am lost in the ADF/JSF page flow (using Jdev 10.1.3). Following are the tags (in order) in my page;
    (WHEN THIS PAGE LOADS, IT GOES TO THE DATABASE TO GET VALUES (for the drop down lists that will appear on the page); THIS SHOULD HAPPEN JUST ONCE AND AT THIS POINT)
    <f:view>
    <afh:body>
    <afh:html>
    <af:form>
    <af:panelpage>
    <f:facet name="contextSwitcher">
    <af:panelHorizontal> has a af:commandLink </af:panelHorizontal>
    </f:facet>
    <f:facet name="messages">
    <af:messages/>
    </f:facet>
    <af:panelform>
    <h:panelGrid columns="2" cellspacing="14">
    has 2 panelgroups (one group has *2 SelectOneChoice lists (that need to be populated by fetching data from database* and the other group has 2 CommandButtons - 'Go' and 'Cancel") (GO BUTTON SETS THE SHOWPANEL() TO TRUE)
    (WHEN GO BUTTON IS CLICKED, THE PAGE GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD (action="#{muBean.doWork}" )THAT IS ASSOCIATED WITH GO BUTTON ACTION SHOULD BE CALLED)
    </h:panelGrid>
    <h:panelGrid columns="2" cellspacing="14" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 inputText fields
    </h:panelGrid>
    <af:table var="someTable" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has a bunch of af:columns
    </af:table>
    <af:panelHorizontal rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 af:commandButtons - submit, save, add row
    (WHEN submit or save or add row BUTTON IS CLICKED, THE PAGE KIND OF LOADS AND GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD THAT IS ASSOCIATED WITH submit/save/add row BUTTON ACTION SHOULD BE CALLED)
    </af:panelHorizontal
    </af:panelForm>
    </af:panelPage>
    <!-- Footer -->
    <jsp:include page="/pages/includes/footer.jspx"/>
    </af:form>
    <f:verbatim>
    <script type="text/javascript" src="../script/tree.js"></script>
    </f:verbatim>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    _*why is it that when the command buttons are clicked, the whole page is loaded? Only the methods associated with the action (action="#{newMapRequestItem.addARow}" ) should be called.*_
    _*IS THERE A WAY TO AVOID THIS WITHOUT USING PARTIAL PAGE RENDERING ?*_
    _*DOES MY TAG NESTING LOOK OK?*_
    Edited by: user12054715 on Mar 24, 2010 12:00 PM

    Can somebody please address this?
    Thanks,

  • When I click the Sections button then click on the 1st page I get  a page that is titled "Lorem ipsum dolor sit amet"! Where did it come from and how do I get rid of it. I have tried deleting and "dont save" but it comes back.

    In Pages when I click the 'Sections'  button then click on the 1st page I get  a page that is titled "Lorem ipsum dolor sit amet"!  Where did it come from and how do I get rid of it? I have tried deleting and "dont save" but it comes back. It is a full page in some unknown language. The only thing I can decifer is 'cupy uf cak'.   Rdal

    Roger,
    The icon is +Sections, not just Sections, as in "Add a Section". When you click that icon you get a section break and and a new section template, complete with preformatted text called placeholder text. The reason "Lorem ipsum" is there is so you can see what the format looks like. The reason that it is Latin gibberish is so you won't get hung up on, or distracted by, what it says. It's just a display of format. Select the "Lorem ipsum" text and start typing your content.
    Jerry

  • Fullscreen on one monitor, while working on the other?

    Mac Pro running Maverick OSX. When I go into fullscreen with youtube on one monitor, and click anywhere on my secondary monitor: Youtube exits fullscreen.
    I've tested this with another machine running OSX Mountain Lion. With Mountain Lion I can have one monitor in fullscreen while working in the other monitor.
    Is there a way to do this with mavericks?
    My secondary monitor is a Cintiqu 13, I'm not sure if that makes a difference.

    About the only thing you can do with Premiere is export out a sequence in the background while you continue working, then bring that back into Premiere and lay it down above the original sequence.
    Of course, if you wish to continue working on the same sequence, this won't work.
    Background rendering would be a very welcome addition to Premiere.  Hell even Encore can do that.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How to get audio output of my instrument while playing back the other tracks?

    I do not hear any audio signal from my bass guitar while playing along the other tracks in Logic. I can only hear the audio output of my bass while I record or stop the music. How can I change the settings so that I can play along and hear myself while I practice? The track for bass is not muted and is getting a strong input signal.

    Hi
    Enable the Input Monitoring button (the I next to the R)?
    CCT

  • When I send a text to another phone, it shows up on the other phone as coming from email address and not from phone number.

    I just came over from Sprint 4 days ago and had my number ported over. When I send a text to another number, it shows up on the other phone as coming from email address and not my phone number. For example, if the recipient of the text has me in the contacts as "Tom", the text comes to them displaying my email address instead of "Tom".

        cfm007,
    Welcome to our family. We want you to be able to enjoy all the services we provide and we definitely need to address this. Do you receive/make calls without problems? Are you able to receive messages with your contacts' number? Are you using iMessages? If so, go to Settings>Messages>Send&Receive>only your phone number should be enabled.
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • JPopupMenu in one frame is not closing while clicking on the another frame

    Hi friends,
    I have a web application which is manily applet oriented. I have two frames in the page on which i have loaded separate applets. One on the left side an the other on the right side. I have implemented a popup using JPopUpMenu in the left hand side applet in response to mouse pressed event. But when i am clicking on the right side frame which is having the other applet loaded the pop up still remains the same in the first frame. It's not going away. How can I solve this issue ?
    Pls help me out in this regard.
    The JRE used is JRE 1.4.2
    Regads
    AK

    If you dont find anything specific, a lot of the problems i
    encounter like this are because one little thing is spelled wrong.
    like it doesnt match whats in your php file, ect. my suggestion,
    though a long one, if you know its supposed to work, and theres no
    syntax error, re type it, not copy and paste, and just be careful.
    keep tripple checking. you might not even find what was spelled
    wrong, but it might fix the situation,

  • Load CSV file into a table when a button is clicked by the user

    Hello,
    Can anyone please help me out with this issue, I have a form where in a user comes and uploads a CSV file and clicks a button, when the button is clicked - it should load the CSV file data into the database table for the corresponding columns.
    Can anyone please suggest me a possible solution or an approach.
    Thanks,
    Orton
    Edited by: orton607 on May 5, 2010 2:00 PM

    thanks fro replying.
    I have tried your changes but its not working. One more question is that I am having one column which contains commas, when I tried to load the file its failing. I think its the problem with commas. So I have changed the code to use the replace function for that column, then also its not working. Can anyone please suggest a possible approach. Below is my source code for your reference.
    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len NUMBER := 1;
    v_line VARCHAR2 (32767):= NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows NUMBER;
    v_sr_no NUMBER := 1;
    l_cnt BINARY_INTEGER := 0;
    l_stepid NUMBER := 10;
    BEGIN
    delete from sample_tbl;
    -- Read data from wwv_flow_files</span>
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
    and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- Read and convert binary to char</span>
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved </span>
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    -- Insert data into target table </span>
    EXECUTE IMMEDIATE 'insert into sample_tbl(col1..col12)
    values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12)'
    USING
    v_sr_no,
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4),
    v_data_array(5),
    v_data_array(6),
    v_data_array(7),
    v_data_array(8),
    REPLACE(v_data_array(9), ':', ','),
    to_date(v_data_array(10),'MM/DD/YYYY'),
    v_data_array(11);
    -- Clear out
    v_line := NULL;
    v_sr_no := v_sr_no + 1;
    l_cnt := l_cnt + SQL%ROWCOUNT;
    END IF;
    END LOOP;
    COMMIT;
    l_stepid := 20;
    IF l_cnt = 0 THEN
    apex_application.g_print_success_message := apex_application.g_print_success_message || ' Please select a file to upload ' ;
    ELSE
    apex_application.g_print_success_message := apex_application.g_print_success_message || 'File uploaded and processed ' || l_cnt || ' record(s) successfully.';
    END IF;
    l_stepid := 30;
    EXCEPTION WHEN OTHERS THEN
    ROLLBACK;
    apex_application.g_print_success_message := apex_application.g_print_success_message || 'Failed to upload the file. '||REGEXP_REPLACE(SQLERRM,'[('')(<)(>)(,)(;)(:)(")('')]{1,}', '') ;
    END;
    Below is the function which I am using to convert hex to decimal
    create or replace function hex_to_decimal( p_hex_str in varchar2 ) return number
    is
    v_dec number;
    v_hex varchar2(16) := '0123456789ABCDEF';
    begin
    v_dec := 0;
    for indx in 1 .. length(p_hex_str)
    loop
    v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
    end loop;
    return v_dec;
    end hex_to_decimal;
    thanks,
    Orton

  • How do i keep youtube video maximised, while i work on other monitor. (it minimalizes itself every time i click on the other monitor).

    I like to learn things from youtube tutorials.. but the window there is small, so i want to maximise it on my old smaller monitor and work on my other. (like blender tutorials.. where i need to model on main monitor while i watch how to do it on smaller one)
    Problem is, every time i click on my main monitor, maximised youtube video minimases.
    So what do i do to stop this from happening?
    Thank you for answering my guestion. :-)

    From what I've seen I think the labels you use linux, either. The solution I think would be to open Firefox on the desktop, and let it open on that desktop on the monitor you want and then the other task in another desktop on the other monitor.
    Hope that helps, greetings!!

  • Cannot load .dll files in another directory when double clicking on the .exe

    Hi all,
    I am currently using VS 2005. I have quite a few of .dll(s) that is currently residing in the same directory as the .exe
    I want to put the .dll(s) in another directory and have the application point it to that directory so that it can load the .dll(s) from there. 
    I know that I am able to set the Environment path to my desired directory in project properties->debugging. 
    However, i also know that this is only applicable for debug mode and executing the app by pressing "F5" or the "play" button.
    But when i double click on the app in the debug folder, it does not load the .dll(s) from the specified path. 
    How can I make the .dll(s) load from my specified path even when i double click on the .exe? in debug and release mode. 
    Cheers,
    nat

    Hi Nat,
    Thank you for your information.
    Your issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because you want to load dlls from your application, it is more related to programming, I suggest opening a new thread about your issue in some development forums based on the type of your application. For example, if you are working with Windows Forms app,
    you can consult on Windows Forms Forum:http://social.msdn.microsoft.com/Forums/windows/en-US/home?category=windowsforms
    If you are working with WPF app, WPF forum is a proper forum:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wpf
    Best regards,
    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.

  • Why do i get redirected when I click on search link If I hit the back button and click on the link again It was allow me to go there

    I use Google to search I click on the link and I get redirected to some other page I click on my back button and re click on the link and it will the allow me to go the link. it does this to me 40% of the time and I know the links that I'm click on a a known good link cause I used them before I just have not save them to my bookmarks

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • SharePoint 2013 - getting an error while clicking on the ellipsis of a document in a Document Library

    I have a standard out-of-the-box Document Library. versioning/checkin/out is enabled. There are a few extra columns added to the library. There is this a weird random behavior when clicking on the ellipsis (...) button on a document. Sometimes it will display
    the context menu and sometimes it will give me this error:
    TypeError: Unable to get property 'FileLeafRef' of undefined or null referenceTypeError: Unable to get property 'ItemType' of undefined or null referenceTypeError: Unable to get property 'ID' of undefined or null reference
    Sometimes a refresh will fix it. Sometimes it won't. It's all pretty random.
    Anyone have this issue or have any ideas on how to solve it?

    Hi
    "TypeError: Unable to get property 'FileLeafRef' of undefined or null reference"
    You can find some alternatives here (none of which have I tried or am I recommending):
    http://alternativeto.net/software/hotspot-shield/
    I'd still suggest ensuring you are running the latest version and contacting the vendor
    "TypeError: Unable to get property 'ItemType' of undefined or null reference"
    please try to test the site using IE Compatibility View, compare the result.
    Also, try to reset IE , compare the result.
    Here is a similar posts for your reference:
    http://social.technet.microsoft.com/Forums/en-US/6efe0564-7df9-4812-b08b-a9d36e3c257b/typeerror?forum=w8itprogeneral
    TypeError: Unable to get property 'ID' of undefined or null reference
    http://community.microstrategy.com/t5/Web/TN204030-TypeError-Unable-to-get-property-id-of-undefined-or/ta-p/204030
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • Need to show popup when the Submit button is clicked for the second time ..

    Hi guys,
    I have a requirement where i need to show a popup or alert when the submit button is clicked twice . When it is clicked for the first time one method is been called and its process starts. When the user clicks the submit button for the second time they should be shown a popup stating "Submit button already been clicked, please clicked OK to continue".
    Can anyone help with this please , its really urgent requirement ?
    Thanks in advance

    Hi,
    I dont have any sample code to give you now. For quick reference, I can advice some psuedo steps to achieve your requirement. I dont have access to JDEV to test this. If any syntax errors then pls correct yourself.
    1. Extend Controller since it is standard page ( Refer Anil Passi site for steps to extend seeded ontroller)
    2. Write below logic in your Process Request method
    super.processRequest(oaPageContext, oaWebBean);
    pageContext.putSessionValue("status", "notInitiated");
    3. Include below logic in your PFR method
    if(pageContext.getSessionValue("status")!=null){
    if("notInitiated".equals(pageContext.getSessionValue("status")))
    super.processFormRequest(oapagecontext, oawebbean);
    pageContext.putSessionValue("status", "initiated");
    else
    String message = "Display error message as required";
    throw new OAException(message, OAException.ERROR);
    You may need to import required packages ( Related to OAException).
    Remeber, to sumbit the request, user need to refresh the page again so that "status" variable will be refreshed.
    Hope it helps.
    Thanks
    venkat

Maybe you are looking for

  • Error while copying a movement type

    Hi all, I want to create an movement type alternate to 501which will only update the qty not the value. 1. For  this I have copied movement type 501 through t code OMJJ. 2. While copying I changed the target movement type as "Y01". 3. Selected the op

  • Wireless bridging is not working in 1552 outdoor access point and 2602e indoor access point.

    Hi, I am have been tested  wireless bridging with 2 indoor Cisco 2602 access point by following the attached document and its working fine without any issue.  After then I made one Cisco 1552 EU-M-K9 outdoor access point as RAP, then connect to this

  • Istat Pro "Processes" doesn't work since upgrade to OS X 10.8.2

    Ever since I upgraded the OS to 10.8, the istat Pro widget on the dashboard doesn't list anything but a stack of empty white squares under "Processes". Is this a known bug?

  • Apple tv to Dubai UAE-apple id failed recognition

    It is unable to recognize my apple id for home sharing; furthermore, the device cannot seem to connect to the apple system at large for date and time or mobile me, although internet connection is valid. I might try connecting the apple tv directly to

  • Waveform chart slow to read samples AIs when sending AOs

    Hi all, I am using labview to sample AI signals and send AO signals sampling at 4k with 400 samples to read... The AOs are triggered using buttons on the frontal (E-stim or M-Stim).. When the E-stim button is pushed it will generate a square-wave sig