events

Is there an event for collapsing a rich:tree node?

I've finally managed to receive events if the user expands a node of my client side handled tree using the following method: public void processExpansion(NodeExpandedEvent event) throws AbortProcessingException { if (event != null && event.getSource() != null && event.getSource() instanceof HtmlTree) { this.expandedNodes.add(((UITree...

Is 'event' a reserved word in JavaScript?

Hi, I am a beginner to Javascript. And when I was practicing I have noticed something. Take this function: <script type="text/javascript"> function showChar(sSomeData, oEvent) { alert (oEvent.keyCode); return true; } </script> When I call this function as this: <input type="text" id="txtTextBox" onkeypress="...

JQuery - url location and click event

Hello, I have code: $('#head_menu a').click(function(){ currentPage = document.location.hash.split('#')[1]; }); <div id="head_menu"> <a href="#order"><div>make order</div></a> <a href="#portfolio"><div>portfolie</div></a> <a href="#contacts"><div>contacts</div></a> <a href="#vacancies"><div>vacancies</div></a> <...

Raise "global" events in .NET via executable

Hello, I am not sure about how to do it, and what to search for... I want a simple executable which "raises an event". I know, this sound crazy and is most likely described with the wrong terms. Lets go back a few steps and describe the scenario: I just bought a nice Wacom Pen + Touch. I also have a Logitech MX Laser Mouse with some f...

How to forward asynchronous events to parent classes?

I'm unsure as to what is the best approach for passing events down the line to parent classes and in need of some feedback. The example code below tries to illustrate what I want to achieve. namespace test { public delegate void TestCompletedEventHandler(object sender, TestCompletedEventArgs e); public class Manager { ...

cancel mouse events

i'm using a mouse event for an outer element. how to cancel the from triggering by sub elements with reasonably small code <div onmouseout='myfunc()'> <div>item1</div> <div>item2</div> ............... <div>item n</div> </div> mouseevent should not apply to item1 to n ...

Callback for changed ActiveRecord attributes?

I am aware of ActiveRecord::Dirty and the related methods, but I don't see a means by which I can subscribe to an attribute changed event. Something like: class Person < ActiveRecord::Base def attribute_changed(attribute_name, old_value, new_value) end #or attribute_changed do |attribute_name, old_value, new_value| end end ...

jQuery: dynamically binding events to dom objects

Several related questions already exist on this site and elsewhere, but none of the answers seems to apply to my situation. I have a bunch of radio buttons in HTML. <input type="radio" name="b1" value="aa"> aa<br> <input type="radio" name="b1" value="ab"> ab<br> <input type="radio" name="b1" value="ac"> ac<br> <input type="radio" name=...

jQuery Nesting Events

Sometimes in my jQuery scripts they don't work unless I nest the events. For example... $(selector).click(function(){ //do something such as create an element $(selector).click(function(){ //do something with the created element }); }); Is this ok? I've always tried to avoid it as it doesn't seem the proper way of doi...

AS3: add event listener to loaded swf

ok, maybe i've just had too much beer at this point but - i'm just trying to listen for a custom event from a swf i've loaded and i'm just NOT able to capture it. the loading code right now is just: public function loadGame(gameSrc:String,gX:Number,gY:Number):void { var loader = new Loader(); var addedDefinitions:L...

Menu - background image and hover action

Hello, I have a menu and jquery-code, which makes its background-image different when hover. $('#menu a').hover(function() { $(this).css( 'background', 'url(images/slider_bg_hover.png) repeat-x' ); },function(){ $(this).css( 'background', 'url(images/slider_bg.png) repeat-x' ); ...

Simple WPF event question with custom control

Hi All, Im making a custom button called "ShardButton" which uses a Style to control its content as well as its event triggers: <Style x:Key="ButtonStyle" TargetType="{x:Type obj:ShardButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type obj:ShardButton}"> <Grid> <Path .../> <Con...

jQuery dispatch event from a plugin for multiple listeners

I'm looking for a way to dispatch an event from my jQuery plugin so that it can have multiple listeners for that event. I have the plugin setup so that it returns a reference to itself so that I can add listeners later via public methods. The only examples I've seen so far have a single event handler, e.g.: $.fn.foo = function( options...

Flex Drag & Drop: Detecting when all data has been moved from source to destination

I have two mx:TileList controls that I'm using to allow editing of objects in batch. The first contains a collection of all available data, and the 2nd contains the current batch. Both are bound to ArrayCollections, and using the native drag-n-drop functionality of the TileList control the data is moved from one ArrayCollection to the ot...

In Qt4, how to check if paintEvent is triggered by a resize?

In a Qt4 application, is it possible to tell inside a paintEvent() handler whether the repaint was triggered by a resize or not? I have a widget which is very slow to redraw (a complicated plot), and I want to speed up resizes by just blitting a resized pixmap while the widget is being resized, and only redraw the widget when the resiz...

Selenium IDE focus event doesn't fire unless window is active

I added this code to my web page: <input id='argh' type='text' onfocus='this.value=7'> Unless the browser window is active, the focus event does not seem to fire (using the 'focus' command) from Selenium: # [info] Executing: |waitForElementPresent | argh | | # [info] Executing: |focus | argh | | # [info] Executing: |verifyValue | arg...

Implement an event for a change in a SortedList

Hello, I'm hoping the answer is as simple as the question, but I need to write an event for a class that implements a SortedList. Is there a way I can create an event handler for anytime this list changes (Add, Modify, Remove)? The Add() methods and such are not override-able. Thanks! ...

What's the most elegant way to swap out events when setting a property?

Doing component-based development, I find myself doing this fairly often: public class SomeClass { SomeOtherClass foo; public SomeOtherClass Foo { get { return foo; } set { if (value != foo) { if (value != null) { // subscribe to some events ...

Event propagation in Javascript

If I have an element (html) nested in another element and both of them have a click handler attached, clicking the inner element executes its click handler and then bubbles up to the parent and executes its click handler. That's how I understand it. Do events bubble up the DOM tree if there are no events attached that are the same and i...

How do I fire an action when the user leaves a JTextBox?

I've got a JTextField, and I'd like the system to do some processing on what the user typed whenever the user leaves the text field. The ActionListener that you can add to just the JTextField only fires when the user presses enter, however. I'd like the processing routine to run whenever the user leaves the text box by any means - tabs,...