Relaxation/simulate Click event programmatically via ClientListerner

I managed to get a reference to an element of the ADF by following the documentation. What I am now struggling with is to trigger the click event programmatically on this component.

The source code is as follows:

ADF

< af:panelAccordion discloseMany = 'false' id = 'pa1' >

     <af:showDetailItem id="pane1" text="Panel Label 1" disclosed="true">
       
<af:commandButton text="commandButton 1" id="cb1">
              
<af:clientListener method="showNext" type="action" />
       
</af:commandButton>
     </af:showDetailItem>

     <af:showDetailItem id="pane2" text="Panel Label 2">
       
<af:commandButton text="commandButton 2" id="cb2">
            
<af:clientListener method="showNext" type="action" />
       
</af:commandButton>
     </af:showDetailItem>

     <af:showDetailItem id="pane3" text="Panel Label 3">
       
<af:commandButton text="commandButton 3" id="cb3">
            
<af:clientListener method="showNext" type="action" />
       
</af:commandButton>
     </af:showDetailItem>

< / af:panelAccordion >

JavaScript

function showNext(evt){  
  
var src = evt.getSource();

   var showDetailItemNode = src.getParent(); // targets the showDetailItem node in which the button resides  

   /* how do I simulate the click event of this object? */

   /* For example: If button #cb1 was clicked, it should simulate clicking of the showDetailItem #pane1 */
}


Use cases

When a user clicks on a button (which is inside the showDetailitem), the parent panel collapses and the next panel must open upwards. The button is just another way to trigger the Panel click behavior.


jDeveloper Version

11g

Thanks for the suggestions guys. The only reason why I use javascript is because I have virtually no knowledge in JAVA/Beans. I am more a guy script and therefore wanted to achieve the same using client-side scripts instead of having to go to the side server.

in any case, I managed to solve it, but I had to take a different route. What I did was the target node parent of the button, and then set its property disclosed to false.

Tags: Java

Similar Questions

  • How to generate a right click event programmatically

    I use a table with a dynamic context menu. I would like to show a right-click context menu with a left-click instead. Is it possible to generate an activation of the context menu event?

    Use the mouse to the bottom? event (note the question mark) and use the terminals on the right to change the button 2 (or any) what should be the value of the RMB. This will transform a left-click in a straight line.

  • Change the button programmatically click event

    Hi all.  I would like to pass to the action click through my result event.

    For example, I have a table that creates buttons with a Repeater.

    Array = [{label: "Flex", action: ' navigateToURL (new URLRequest ("http://www.adobe.com/flex', '_blank'")); "" ""}, ]

    {label: 'Flash', action: "Alert.show ("I love Flash too!");"}

    And then my Repeater brings pimples like this

    < mx:Button label = "{repeater.currentItem.label}" "

    Click = "Alert.Show (Event.currentTarget.getRepeaterItem (.Act)); "/ >

    Now the above button works, but what I would like the button is the action itself, as in this example below:

    < mx:Button label = "{repeater.currentItem.label}" "

    Click = "Event.currentTarget.getRepeaterItem () .Act;" "/ >

    However, it does nothing.

    Any suggestions?  I have to be close...

    Thanks in advance!

    Hi mattcom,

    I don't think you can do it directly like that... but you can try something like this...

    Use another property in your table as shown below...

    Array = [{label: 'Flex', data: " " "http://www.adobe.com/flex: ' action: 'navigateToURL'http://www.adobe.com/flexhttp://www.adobe.com/flex},]

    {label: 'Flash', data: action "I love Flash too!": "Alert"}

    Click = "doAction (Event.currentTarget.getRepeaterItem ());" » />

    private void doAction(repeaterItem:Object):void

    {

    Switch (repeaterItem.action)

    {

    case 'navigateToURL '.

    navigateToURL (new URLRequest (repeaterItem.data, '_blank'));

    break;

    case 'alert '.

    Alert.Show (repeaterItem.Data);

    break;

    }

    }

    If you still want to go with your approach so you will have to use javascript using ExternalInterface call and send the expression in event.currentTarget.getRepeaterItem (.Act) to the javascript function, then use the Eval function, you must execute the javascript statement.

    Thank you

    Jean Claude

  • By the way a multicolumn Listbox double-click event line in a secondary

    What I have is a shell at a higher level with the configuration of equipment of high level, as well as common application functions as save the test report and exit/close.

    In this first level is a listbox multicolumn "Test selection".

    When a device is selected in the configuration, one of the many sub-panels charge based on the selected device.  When the secondary is loaded, the table of test selection on the front of the top is filled with items via a reference.  The listbox items differ according to high school who is responsible.

    Normally what we do is use a structure of the event with the event double-click to change States in the program.  Given that States I want to change are in the secondary, and the list box lies in the toplevel, I can't use the event structure to integrate this double click on the secondary line.

    What I want to do currently a property to read to the 'value' of this list box in the secondary in both cases the timeout of a structure of the event or within a parallel loop, then to the decision of the State based on the changing value of the indicator.  However, by doing this I lose the effect "queues" in the table of test selection (can double-click some line items and the structure of the event will be queued double click events).

    Is there a more elegant way to spend this line double-clicked in the secondary?

    It seems that you already pass a reference to the Listbox MC control to the Subvi.  You can use it to record dynamically for the double click event inside the Subvi.

  • Add dynamically with the click event.

    I introduce several add button programmatically. I have sucessfully Add button but I can't able to get the button click event everything. I always click the last button added.

    Event for all I want to separately, click the button.

    I use this code for the Add button.

    ComponentDefinition {
                id: mComponentDefinitionSubmitButton
                Button {
                    id: mButtonID
                    horizontalAlignment: HorizontalAlignment.Center
                    onClicked: {
                        //My Click code. Always detect last button.
                    }
                }
            },
    
    var mButton = mComponentDefinitionSubmitButton.createObject();
    mButton.text = qsTr(title)
    mContainerButton.add(mButton)
    

    I did with signal...

    function checkClick(button)
        {
            console.debug("click..."+ button);
        }
        attachedObjects: [
            ComponentDefinition {
                id: mComponentDefinitionSubmitButton
    
                Button {
                    id: mButtonID
                    signal click(variant text);
                    horizontalAlignment: HorizontalAlignment.Center
                    onClicked: {
                        click(mButtonID.text);
                    }
                }
            }
        ]
    
    ----------------------------------------------------------------
    var mButton = mComponentDefinitionSubmitButton.createObject();
    mButton.text = qsTr("Button");
    mButton.click.connect(checkClick);
    btnContainer.add(mButton);
    
  • How do you attribute the click event of the object created dynamically?

    This is probably an easy question to answer:

    I'm iteration in an XML list, I created via a HTTP Service to load the XML file.  For each object, I want to create a LinkButton which will link to a URL.

    However, since I created the LinkButton object in ActionScript instead of MXML, I can't understand how to assign a click event, for example navigateToURL()

    How to assign as the LinkButton should do the mouse click?

    I know that someone will be able to answer this, then... Thanks in advance!

    myLinkButton.addEventListener(MouseEvent.CLICK,myClickFunction);
    

    and your event listener function

    private function myClickFunction(e:MouseEvent):void{
                        //do something
                   }
    
  • ranging from CO to add additional validation to a button click event

    Hello

    I have a requirement as follows:

    1. I want to have a validation via iExpense.

    2. the validation is the same, when the user creates costs report claiming suppose Bill say mobile and tries to submit it, then a check must be made if it already sent the report stating even before spending.

    The expense report is a trail, so when the user selects the type of expense and enters the details and then when he clicks the next button, the validation should take place.

    The problem is already some validations take place on the click of a button. Now, if I measure the CO and the logic of writing for postings on button click events, then the previous validations will be eliminated.

    How can I get this fact... can anyone suggest me a solution for this... Please help its really urgent and I need to give estimates for the same customer.


    Thanks in advance,
    Kaushik Rinaldi

    Hello

    Question: The problem is already some validations take place on the click of a button. Now, if I measure the CO and the logic of writing for postings on button click events, then the previous validations will be eliminated.

    Answer: call the method super in processformRequest (super.processFormRequest) first which means first the basic Oracle code will be executed and then enter your code to capture the details... pass it in a procedure to validate whether the expense was already filed.

    Thank you
    Gerard

  • Click event incorrectly attached after DOM manipulation

    I have a page with elements of entry and a span element style as a button. Register event handlers changes on input elements, to make the validation when the input values are changed. If the entries are not valid, I add the content of a div on the page to indicate the problem. I also save a click event handler on the span of style as a button.

    When I change an entry and then immediately click the duration (i.e. without leaving the input element before clicking on the duration of the update), I see:

    (1) mousedown on the duration
    2) switch to entry
    (3) mouseup on the entry

    This happens only when I change the DOM in the event handler changes on the entry. If I do not change the DOM then I see:

    (1) mousedown on the duration
    2) switch to entry
    (3) mouseup on the duration
    4) click on the duration

    In the first case, I see the mouseup attached to the input rather than the span element element, even if it has the same coordinates as the mousedown attached to the span element. Given the coordinates are within the span element and outside limits of the input element, I don't understand why mouseup is associated with the element of entry rather than the span element.

    There is an example of this at http://jsfiddle.net/4zx8rm7c/.

    I see this behavior in Chrome and Firefox 34.0.5 39.0.2171.95 m.

    If the association of the mouseup event with the input element, despite the apparently independent of the mouse event, behavior plan, coordinates I need to understand why that is. I looked at characteristics of COM event level-2 (briefly) and I don't see an obvious explanation.

    This forum is intended for the user support, not for issues related to web development.
    Try announcement Web development / standards evangelism MozillaZine forum. The contributors there are better informed on the problems of development of web page with Firefox.
    http://forums.mozillazine.org/viewforum.php?f=25
    You will need to register and log in to post in this forum.

  • Errors in 'Speed' while accessing the mouse click events?

    Hello

    I built a software where it has a CVI callback function registered on the Panel. The function tests whether two cases, the first EVENT_LEFT_CLICK and then EVENT_LEFT_CLICK_UP. The user is supposed to keep the click button for some time (~ 1 second), and there is no problem. However, I have found that if by mistake (that users commit often) multiple rapid clicks are made, sometimes the click down the piece of event (EVENT_LEFT_CLICK) of the code is not read. I reduced the likelihood of this problem of the speed setting of double click (on Windows) to the maximum.

    I think that if I could eliminate the double click event, this problem would be resolved almost completely and only limited by the speed at which the processor can update mouse events.

    Hope you understand my problem.

    Thank you!!

    AUTOSOLVED.

    Thanks to a guy who posted his own solution on a Windows forum, to 'disable' the double click. Just change the HKEY_CURRENT registry value > ControlPanel > mouse > DoubleClickSpeed to 1. What makes the double click speed so fast that you can access virtually every user actually simple clicks.

    After doing this, in order to apply the registry editing, I ended explorer.exe running and he raised through windows task screen. However, change, this applies to what I opened the mouse Panel (without change or apply anything from there).

  • Double-click event

    Hello

    How to get the double click event. (ex if I click table colume double time as only triger event.)

    Hello

    pls refer this link...

    http://digital.NI.com/public.nsf/allkb/391D522B0FDD4B3F862571E300739F44

  • Contact information for return pixel Imaq image with the mouse click event

    Hello

    I'm trying to get the coordinates in pixels of an image Imaq based on a mouse click event, similar to this post and this post. The problem is that with the first post, I get the coordinates in the image control and hesitate to trust them, they seem to have the Center origin, may return negative coordinates and do not represent the actual size of the detector that I use (512 x 512). It also returns the coordinates outside the actual data when it is clicked on the image control framework. The second method returns simply null coordinates. What I want are the coordinates of the pixel displayed when hovering the mouse imaq image control framework.

    What baffles me, is that I tried the second method with a png stock file and it works fine, it is only when I create an image from the data of my camera than the coordinates are returned null. Note data views of camera under control of image very well.

    Any ideas would be useful. Enclosed is a picture of the offending code and the Panel before displaying the camera data is coming (I know it needs some cleaning).

    Thank you

    Tyler

    for help, please send your vi

    but I think that this example vi is your solution

    check this vi

  • How to create the scroll to the menu icon click event bar

    How to create the scroll to the menu icon click event bar

    (as the "field of scrolling image")

    In my opinion, it is better for you to try something to help implementation of your solution to ask for the code.

    For example, create a few BitmapFields with icons that act as buttons.  There is source for this sort of thing on the forum if you look at, I think, looking FRO Image button, icon or Bitmap button.

    Once you have these buttons work, add these in a HorizontalFieldManager.

    Good luck.

  • Add images to the listfield on the click event

    Hello

    I'm trying to reproduce the "tableview with UITableViewCellAccessoryCheckmark" iPhone, IE, whenevever, I click on a line in the listfield, I want to display a check mark in the same row.

    In the click event, I am not able to get the graphics of the listfield object draw the check mark. Is there another way to do this?

    Any response is appreciated.

    Thank you

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/rim/device/API/UI/component/ListField.html#GE...

    (using the index you can retrieve the item from the underlying collection)

  • Capture the click event of the button 'back' on DateTimePicker

    How to capture the click event of the button "return" on the DateTimePicker control.

    Show us in the form DateTimePicker.doModal)

    I know that this response is late, but if someone else is asking about this.

    doModal() returns a Boolean value and returns false if the user clicks Cancel.

    I hope this helps.

  • not pulling - click event button position: fixed - 2.0 Playbook

    I have a fixed position "back" button in my application that triggers not when scrolling to the bottom of the screen.

    Here is the code for the button:


    When I scroll the screen to the top, the button triggers without problem. However, if the screen scrolls down at all, the button's click event will not occur.

    I've traced the events Web Inspector and a click event fires when I click the button. However, it does not actually draw the method that I've linked to the click event of the button. Once again, if I scroll the screen to the top, the button click fires very well.

    I must emphasize that the button is displayed correctly at all times. He remains in a fixed position of 5px to the right side of the screen, even when scrolling of the window down. If the button is visible at any time. It's just that when I scroll nothing happens if I click on the button.

    Looks like a bug with WebWorks. If anyone can confirm?

    Thank you

    Thanks for the suggestion ignites.

    I found that this was due to my own bug. It was a problem with z-index. I increased the z-index of the button, and it solved the problem. The button must have been in conflict with lowest elements of the page, but it was very well at the top of the page.

    Thank you

Maybe you are looking for

  • My password changed after using the migration wizard

    I have improved my SSD and installed OSX then migration assistant to transfer everything from my old SSD to the new. Now that he's been transferred I can't complete the process, because the password I am using has changed. I was running Yosemite but

  • T60 unknown device, PCI Device, SM Bus

    I just did a fresh XP on my T60 facility and I have 3 devices that are not the installer, even if I installed the 1 chipset driver. They are unknown device and SM Bus PCI device. My # is 200755U product. Can anyone help?

  • Modify icons/applications in car dock menu?

    How can I edit/replace the apps in the provided car dock menu? I now there are several 'Add app here', but, as condition of radio tuner is not good here in AUS so I wanted to replace by ' tunine which works well and has local radio stations Thank you

  • AnyConnect for windows

    Hello What file I need to download to install the anyconnect on windows, I don't have an exe file to download. Concerning Leonardo Santana

  • Utility HP app crashing when I try to change the parameters of the model analysis. Help? OSX Lion

    Product: HP Photosmart 5510 Operating system: OS x Lion Error: Utility Application HP unexpected blocks Connected: Wifi UPDATE: I chat with a HP technician, and we tried different things, such as remove all printer drivers, check/repair disk permissi