Posts

Showing posts from July, 2012

Featured Post

Difference between Struts1 and Struts 2

Feature Struts 1 Struts 2 Action classes Struts 1 requires Action classes to extend an abstract base class. A common problem in Struts 1 is programming to abstract classes instead of interfaces. An Struts 2 Action may implement an Action interface, along with other interfaces to enable optional and custom services. Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Albeit, the Action interface is not required. Any POJO object with a execute signature can be used as an Struts 2 Action object. Threading Model Struts 1 Actions are singletons and must be thread-safe since there will only be one instance of a class to handle all requests for that Action. The singleton strategy places restrictions on what can be done with Struts 1 Actions and requires extra care to develop. Action resources must be thread-safe or synchronized. Struts...

Jquery bind event

Returns: jQuery .bind(eventType, [eventData], handler(eventObject)) eventType A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. eventData A map of data that will be passed to the event handler. handler(eventObject) A function to execute each time the event is triggered. .bind(eventType, [eventData], false) eventType A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. eventData A map of data that will be passed to the event handler. false Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. .bind(events) events A map of one or more JavaScript event types and functions to execute for them. Attach a handler to an event for the elements. The .bind() method is the primary means of attaching behavior to a document. All JavaScript event types...

Jquery one event

Returns: jQuery .one(eventType, [eventData], handler(eventObject)) eventType A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. eventData A map of data that will be passed to the event handler. handler(eventObject) A function to execute at the time the event is triggered. Attach a handler to an event for the elements. The handler is executed at most once per element. This method is identical to .bind(), except that the handler is unbound after its first invocation. For example: $("#foo").one("click", function() { alert("This will be displayed only once."); }); After the code is executed, a click on the element with ID foo will display the alert. Subsequent clicks will do nothing. This code is equivalent to: $("#foo").bind("click", function( event ) { alert("This will be displayed only once."); $(this).unbind( event ); }); In oth...

Jquery bind event

Returns: jQuery .bind(eventType, [eventData], handler(eventObject)) eventType A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. eventData A map of data that will be passed to the event handler. handler(eventObject) A function to execute each time the event is triggered. .bind(eventType, [eventData], false) eventType A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. eventData A map of data that will be passed to the event handler. false Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. .bind(events) events A map of one or more JavaScript event types and functions to execute for them. Attach a handler to an event for the elements. The .bind() method is the primary means of attaching behavior to a document. All JavaScript event types...

Live event in jquery

Returns: jQuery .live(eventType, handler) eventType A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names, as well. handler A function to execute at the time the event is triggered. .live(eventType, eventData, handler) eventType A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names, as well. eventData A map of data that will be passed to the event handler. handler A function to execute at the time the event is triggered. .live(events) events A map of one or more JavaScript event types and functions to execute for them. Attach a handler to the event for all elements which match the current selector, now and in the future. This method is a variation on the basic .bind() method for attaching event han...

Jquery die event

.die() Remove all event handlers previously attached using .live() from the elements. .die(eventType, [handler]) Remove an event handler previously attached using .live() from the elements. Returns: jQuery .die() Remove all event handlers previously attached using .live() from the elements. Any handler that has been attached with .live() can be removed with .die(). This method is analogous to calling .unbind() with no arguments, which is used to remove all handlers attached with .bind(). See the discussions of .live() and .unbind() for further details. Note: In order for .die() to function correctly, the selector used with it must match exactly the selector initially used with .live().

Delegate event in jquery

Returns: jQuery .delegate(selector, eventType, handler) selector A selector to filter the elements that trigger the event. eventType A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names. handler A function to execute at the time the event is triggered. .delegate(selector, eventType, eventData, handler) selector A selector to filter the elements that trigger the event. eventType A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names. eventData A map of data that will be passed to the event handler. handler A function to execute at the time the event is triggered. .delegate(selector, events) selector A selector to filter the elements that trigger the event. events A map of one or more event types and functions to execute for them. Attach a handler to one or more events for all elements that match t...

Maven Archetypes

Image
217----> Prev : 14.3. Getting Started TOC Next : 14.5. Using Add-Ons 14.4. Creating New Projects with the Android Maven Archetypes When starting a fresh project it is easy to use the Maven Archetype Plugin to create a skeleton to start working with. Fortunately multiple archetypes for Android projects are available. You can create a new android-quickstart project, which is similar to the helloflashlight example on the command line with mvn archetype:generate \ -DarchetypeArtifactId=android-quickstart \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion=1.0.6 \ -DgroupId=your.company \ -DartifactId=my-android-application Other archetypes available are an Android project including test execution with the archetypeArtifactId android-with-test-archetype and a project with release process configuration android-release-archetype. Note Many developmemt environments have a visual integration of creating new projects with a Maven archetype, so you can...