Flex + Multiple Routes, which button clicked?

I have a User Task (which uses a Flex form) in workbench which has 2 defined routes leading out of it, Approve and Reject. If Accept, a bunch of validation should occur. If Reject, no validation is needed.
When the user clicks on either of these buttons in the bottom of Workspace, I receive an event within Flex, which typically kicks of my validations. But, both buttons fire off this event and I don't see any way of telling which of the 2 buttons was clicked.
Anyone have an idea

Hello,
At your PDDF form you have controls loke this : AWS_SUBMIT, AWS_ACTION, AWS_PROCESSTYPE etc.
AWS_SUBMIT it is button, you can put some javascript code on it's onClick event , which will make youre validation.
Example:
prodata.AWS_SUBMIT::click - (JavaScript, client)
// This is the AWS_SUBMIT click script
if (xfa.host.name == "Acrobat")
//validation
if (prodata.AWS_ACTION.rawValue == "Cancel"){
data.main.field.validate.nullTest = "";
if (prodata.AWS_ACTION.rawValue == "Approve"){
data.main.field.validate.nullTest = "Error";

Similar Messages

  • I am writting a test  using a sequencer to test for multiple button click

    I'm using flex sdk 4.1 and have a situation where a  button click is sometimes called twice. I am writting a test for this using a sequencer and it will run for at least one button click, what I am not sure is how to test for multiple click events(which shouldn't happen, but occours randomly in my project)
    package tests.view
        import flash.events.MouseEvent;
        import flexunit.framework.Assert;
        import mx.events.FlexEvent;
        import org.flexunit.async.Async;
        import org.fluint.sequence.SequenceEventDispatcher;
        import org.fluint.sequence.SequenceRunner;
        import org.fluint.sequence.SequenceWaiter;
        import org.fluint.uiImpersonation.UIImpersonator;
        import views.AddComments;
        public class TestAddComments
            private var view:AddComments;
            [Before(async,ui)]
            public function setUp() : void
                view = new AddComments;
                Async.proceedOnEvent( this, view, FlexEvent.CREATION_COMPLETE, 600 );
                UIImpersonator.addChild( view );
            [Test]
            public function testButtonClick():void
                view.addCommentBtn
                var sequence:SequenceRunner = new SequenceRunner( this );
                sequence.addStep( new SequenceEventDispatcher( view.addCommentBtn, new MouseEvent( 'click', true, false ) ) );
                sequence.addStep( new SequenceWaiter( view.addCommentBtn, MouseEvent.CLICK, 100 ) );
                sequence.run();

    The only way you could test for that type of circumstance... one where something may happen... is to do so with a timeout. In other words, you cannot let the test pass simply because the first event occurred.
    Two ways to handle this... with sequences:
    Instead, you write a test that expects 2 clicks. In the assertion handler (which would only be reached if both clicks occur) you would fail the test:
    fail('i shouldnt be here');
    In the Waiter for the 2nd click, you would specify a timeout handler. That timeout handler will get called in the 2nd click does not occur in the specified time... (finding that time is the hard part). The default timeout handler fails the test, however, in your case, your timeout handler would just happily do any assertions needed and move on. A timeout does not necessarily mean failure... in your case, it is correct
    Second choice:
    You could create a timer. Create an event handler for the button click which increments a counter. Start the timer, do your test. However, have your test pending on the timer's completion rather than something like the click.. In that case, you would then be able to just check the count:
    private var clickCount:int = 0;
    [Test]
    public function testButtonClick():void {
         var timer:Timer = new Timer( 100, 1 );
        Async.handleEvent( this, timer, TimerEvent.COMPLETE, checkClickCount );
         view.addCommentBtn.addEventListener( 'click', function( e:Event ):void { clickCount++ } );
         view.addCommentBtn.dispatchEvent( new MouseEvent( 'click;, true, false ) );
    private function checkClickCount( e:Event ):void {
    assertEquals( 1, clickCount );
    However, I can't imagine how the test you are describing could ever yield more than one click event... I am guessing the problem is elsewhere, but this will help you verify
    Mike

  • How to submit data from multiple Input Ports in single SUBMIT button  click

    Hi,
    I am in SPS8.
    What exactly steps I need to perform to submit data from multiple Input Ports.
    I couldn't able to submit One input Form and one Input Table to BAPI data service in single SUBMIT button click.
    I debugged the VC application in SPS8.
    While debugging, I found that when I click the SUBMIT button in the Input Form, Only data in that Input
    form are being passed to the BAPI, But not the Table Form data.
    If I click on the SUBMIT button in another Input Table, Only data from that table is being passed to the BAPI, but not the Input form data.
    Essentially I need to submit both of them in one SUBMIT button.
    Thanks,
    Ramakrishna

    Ramakrishna,
    From the word document that you sent to me the steps you are missing to map the appropriate information into the BAPI is first you are not mapping all data rows into the table input port. To do this double click on the input table view and change your selection mode from single to multiple. Then when you click on your link between the BAPI and your input table you will see a new option appears under data mapping "Mapping Scope" select All Data Rows.
    That's the first part of the problem to get the BAPI to recognize both the inputs coming from the form and the table eliminate the submit button from the form. Drag and drop a link from the output port of the table view to the Input port of the BAPI. Double click on the link between the BAPI and the table view and open the expressions editor for the two fields:
    1/ Automatic Source
    2/ SKIP_ITEMS_WITH_ERROR
    On the hierarchical folder structure on the right expand expand the Data Fields node to find the fields from the form and map them accordingly.
    Now when you hit the submit button on your table it should pass the BAPI all the parameters from both the form and the table.
    Hope this helps,
    Cheers,
    Scott

  • How to identify which button is clicked in an action

    Hi,
    I am just checking whether it is possible to build calculator or not in webdynpro for abap.
    I have some buttons and i have associated same action for all the buttons and in that action i would like to know which button is clicked.
    Please let me know the code for that
    Thanks
    Bala Duvvuri

    Hi Bala,
    Its possible. Just go to the action handler for the button & read the attribute ID of the WDEVENT which is passed by the framework. This id will contain the id of the button which triggered the event. Consider the code fragment below:
    method ONACTIONACTION .
        DATA:  lv_button_name type string.
        lv_button_name = wdevent->get_string( name = 'ID' ).
    endmethod.
    At the end of execution lv_button_name will have the ID of the button which triggered the event.
    Regards,
    Uday

  • Multiple flash files change when a button click using javascript function

    hi.. am new in flsh...
    i want to multiple flash files change when a button click using a javascript

    <script>
    var count=0;
    function mafunct(newSrc){
        alert("hi");
    var path="a"+count+".swf"; 
    flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';         
        flash+='<PARAM NAME=movie VALUE="'+path+'">';         
        flash+='<PARAM NAME="PLAY" VALUE="false">'; 
        flash+='<PARAM NAME="LOOP" VALUE="false">';
        flash+='<PARAM NAME="QUALITY" VALUE="high">';
        flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
        flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
        flash+='</EMBED>';
        flash+='</OBJECT>';    
    count++;
    alert(path+"aa");
    </script>
    <button onclick="mafunct()">next</button>

  • How to open multiple report windows on button click without losing session?

    Hi,
    JDev : 11.1.1.2.0
    I am trying to open multiple discoverer plus report windows using my ADF application.
    My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
    1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
    http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
    2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
    3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
    4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
    Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
    Regards,
    DevD

    sURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
    If this is not a right approach then let me know how to pass the parameter in jsp page.

  • Calling multiple url's base on button click in JSP

    I am trying to call a different jsp depending on which button is clicked on my jsp.
    The way I currently have it working is by posting and I set the url in the action attribute of the form.
    Anyone ever do this or have a solution?
    Thanks.

    I tried the following code but it did not seem to work.
    Do I have to change anything on my form line?
    <form name="form1" method="post" action="/TestJSPModule/DbMaint_Submit.jsp">
    Is the document.forms format exactly the way I have to type it?
    Or is it the actual form name.
    If form name is form1
    Example: document.form1
    <script language="javascript">
    function submitForm(){
    if (document.forms[0].Submit.value='Insert')
    document.forms[0].action="url1";
    if (document.forms[0].Submit2.value='View')
    document.forms[0].action="url2";
    if (document.forms[0].Submit3.value='Delete')
    document.forms[0].action="url3";
    document.forms[0].submit();

  • Friend help me to fix my laptop and runing the program Piriform CCleaner and is finish but which button should I click - Analyze or Run Cleaner

    Need a big help!! A Friend help me to fix my laptop and runing the program Piriform CCleaner and is finish but which button should I click - Analyze or Run Cleaner

    Laptop? this is the ipad forum.
    Is your laptop a macbook? If so I can have the hosts move your post there
    But for specific info about a non-apple program, the best place to look is on the site for the program you're using, In your case Piriform's site.

  • How to get the Id of the Button which is clicked?

    Hi,
    I am having some 10 buttons and in the on action property these button i'm opening a popup.
    I have mapped all the 10 buttons to same action. so i want to know in onAction which button is clicked.
    so how to get the Id of the button clicked in the on action?
    Help me out with the detailed code.
    Thanks,
    Suresh

    Hi,
    Write this code in the "wdDoModifyView()" method:
    //let's say the first button ID is btn1
    IWDButton buttonOne = (IWDButton) view.getElement("btn1");
    buttonOne.mappingOfOnAction().addParameter("commandID","btn1");
    //let's say the second button ID is btn2
    IWDButton buttonTwo = (IWDButton) view.getElement("btn2");
    buttonTwo.mappingOfOnAction().addParameter("commandID","btn2");
    Add the parameter "commandID" to the event handler of ur buttons  and it should be of type "String". That will look like:
    public void onActionTest(IWDCustomEvent wdEvent, String commandID){
    //here commandID contains the ID of the button which was clicked
    wdComponentAPI.getMessageManager().reportSuccess(commandID);
    regards
    Surender Dahiya

  • Which button is clicked?

    hello,
    I have a an array of buttons, which has 20 buttons.
    How can I know which button is clicked inside actionPerformed method.
    THANKS
    Chamal.

    Search for the Java Tutorial and carefully read the section on event listeners. You can find lots of sample code there.
    Basically, you can branch on action commands (typically the label on the button) or event sources (a reference to the object which fired the event). The second method is preferrable to the first, particularly with regard to internationalized applications.

  • How can I find which button is clicked?

    I have two buttons on my page.Is there any way so that I can find which button is clicked in my JSP page?I do not know javascript I tried to pass a parameter by url rewriting through a Javascript function to another page.
    But it did not work? how can I do this?
    Can I return a parameter from javascript to a JSP page?
    Plz help me
    Thanks in advance
    Amit Varshney

    If you give the submit button a "name" attribute, the name of the button you pushed will come through as a parameter, along with its "value" (the text on the button)
    ie
    // in your jsp page
    <input type='submit' name='button1' value='FromB1'>
    <input type='submit' name='button2' value='FromB2'>
    // in your servlet code...
    boolean b1Pressed = request.getParameter("button1") != null;
    boolean b2Pressed = request.getParameter("button2") != null;

  • 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

  • Determine which button is clicked

    I am creating the download buttons on my page dynamically and I am assigning the name also dynamically attaching the counter with the name. Now On form post, i want to know which button( button at which counter ) was being pressed. Could u help me on this.

    Use request.getParameterNames( ) to get an enumeration of all the names passed by the form. You can then go through the list and determine which button was pressed since the name of that button would be passed along.
    If you are uncomfortable with using the enumeration technique, do a request.getParameter( button_name ) for each button and check whether you get a null value which implies the button wasn't pressed, or the counter value, which implies the button was pressed. If you have a lot of buttons, this results in some redundant code, but if you have only one or three, then this is probably an ok way to do it.

  • My iPod Touch was not connecting to my Airport Express router (which was "extending" a network as a WDS repeater) -- SOLVED!

    My problem was this. I have a large apartment with concrete walls, so just one wireless router would not work. I used apple Airport routers and used one of them (an airport extreme) to create my wireless network, and a number of other ones -- airport expresses -- to "extend" the network.
    That's all great, but I found that a couple of my devices -- mainly my iPod Touch -- would refuse to connect to the repeater airport express routers -- it only wanted to connect to the main Airport Extreme router, not the satellite guys.
    Finally I solved the problem.  It had to do with how the wireless network's configuration for "Radio" setting was set regarding 802/11 b/g, and the dual-band ability of the Extreme. Below is the description of how I fixed it.
    ======SOLUTION THAT I POSTED======
    I've pretty much solved this problem. I do not FULLY understand why, but now I can have my iPod touch (and I am hoping my kindle) attach correctly to the satellite/repeater airport express.  Here is what I did:
    I did two configuration changes to my central hub airport extreme router (i.e., the one that my other routers were merely configured to "extend.")  I realize now that these are both configurations that must be done at that central router, and the repeater routers then simply mimic or reflect accordingly.
    -- First, I used the most recent Airport Utility (v6.0) and clicked on my main router (which, crucially, is an airport extreme that has dual band 802.11, both 2.4ghz and 5ghz.)
    -- In the airport utility, I clicked on that Extreme router and then in its funky popup window, clicked Edit.
    -- Clicked the tab called Wireless.
    -- Clicked on Wireless Options button.
    -- the first config change I made on that page was to change the Radio Mode setting to "802.11a/n - 802.11 b/g." 
         What nobody really tells you is that that hyphenated choice means that the 5GHz band will use the first of those two (namely, a and n, in other words the strong modern N standard will be used on this band ONLY) ... while the 2.4GHZ band will use only the second of those two, b/g, in other words, the devices that only can use that older weaker standard.
         So, it's kind of a segregation. I'm telling it "No, don't let the 2.4 ghz band try to handle traffic using N. That band will just take care of the old crappy clients."
    -- the second config change that I made on that page was to check the check box to make a totally separate wireless network name for the 5GHZ band.  Further segregating things.  When I tried my solution without this additional step, my problem did not fix itself, though I don't fully see why.
    As I said, a few questions remain in my head, but the darn thing works, so I'm happy. Among many other questions... are those airport expresses dual-band too? I didn't think they were but somehow they are repeating this dual-band strategy?  Whatever. it works.
    BY THE WAY -- I recommend using the Apple question/answer board on StackExchange to get Apple-related answers. It is at http://apple.stackexchange.com/

    To demonstrate, here's a screenshot from the Airport Utility on the iPod Touch in close proximity to the Express, still connected to the Extreme :

  • Ploting new plot in xy graph on button click

    hi all experts
    i need your help.
    i want to plot multiple graph, on a single xy graph
    i want -->if user want to plot a new plot
    user will place new button,give value of parameter using control,do needed operation .
    then press button name as plot.
    on button click user must see all previous and new plot.

    Hello,
    Joe is right, you will need to use build array to add plots to the previous one. Specifically, you can refer to the XY Graph.vi which demonstrates a couple different methods for graphing multiple plots to an XY Graph.
    Regards,
    Jyoti F.
    National Instruments
    Attachments:
    XY_Graph.vi ‏49 KB

Maybe you are looking for

  • Adding a photo gallery

    Ater a search, I'm more confussed than ever. I have the site to the point where I'm ready to add photos. I'm a photographer( I have PS cs2 and a trial DW CS4) I would like to display 5-10 photos on my index page in the form of an automated slide show

  • Camera-to-computer cable for PowerShot A1100 IS

    need reeplacement camera-to-computer cable for PowerShot A1100 IS -- not available on Canon website -- not available from Office Depot where I bought the camera Solved! Go to Solution.

  • COGI at WM bin level

    Hello experts, My requirement is to see the PSA negaive bins causing production issues. Why cannot we see WM errors in COGI. Do we have any report with combination or IIM and WM? Super users are only looking at COGI and clearing then. They are not lo

  • Change Content-Encoding

    Hi, I have seen that the parameter Content-Encoding: gzip in HTTP Trace. I want to change it to null, is it possible and how? Regards, Priya

  • Why have my MIDI files disappeared?

    All of my MIDI files were imported to iTunes last week and they played fine. When I open any of my MIDI files today I get the following message: "The songs title "XXXX" could not be used because the original file could not be found. Would you like to