Posts

Showing posts from July, 2013

Featured Post

Jquery Val()

.val()  .val() Get the current value of the first element in the set of matched elements.  .val(value) Set the value of each element in the set of matched elements. Returns:  String, Number, Array .val() Get the current value of the first element in the set of matched elements. The  .val()  method is primarily used to get the values of form elements. In the case of <select multiple="multiple">  elements, the  .val()  method returns an array containing each selected option. For selects and checkboxes, you can also use the  :selected  and  :checked  selectors to get at values, for example: $ ( 'select.foo option:selected' ). val (); // get the value from a dropdown select $ ( 'select.foo' ). val (); // get the value from a dropdown select even easier $ ( 'input:checkbox:checked' ). val (); // get the value from a checked checkbox $ ( 'input:radio[name=bar]:checked' ). val (); // get the v...

Struts different actions

Struts framework is developed using j2ee  standard tag library and JSPs  Struts has 4 different Action classes  Include action  Switch action  Dispatch action   LookupDispatchAction    MappingDispatchAction Forward action Include action :         This is used for including some jsps into existing jsps works like jsp: include  Forward action :       This is for forwarding request resemblance to jsp:forward which is unlike include forward request to different action  DispatchAction:     This is for dispatching request based on some criteria i.e if we have multiple actions in same page we can use this     It has two different subclasses which are lookupFispatch action and mappingdispatchaction which has method  getKeyMethkdMap()  which should be overridden by subclasses  And also we need to define parameter in action tag     To be contin...

Struts different actions

Struts framework is developed using j2ee  standard tag library and JSPs  Struts has 4 different Action classes  Include action  Switch action  Dispatch action   LookupDispatchAction    MappingDispatchAction Forward action Include action :         This is used for including some jsps into existing jsps works like jsp: include  Forward action :       This is for forwarding request resemblance to jsp:forward which is unlike include forward request to different action  DispatchAction:     This is for dispatching request based on some criteria i.e if we have multiple actions in same page we can use this     It has two different subclasses which are lookupFispatch action and mappingdispatchaction which has method  getKeyMethkdMap()  which should be overridden by subclasses  And also we need to define parameter in action tag     To be contin...

Spring bean life cycle

    Instantiate  – First Spring instantiate the bean.   Populate properties - Spring Inject the bean’s properties.   Set Bean Name - Spring set bean name. if the bean implements  BeanNameAware , spring passes .The  bean’s id to  setBeanName()  method. Set Bean factory -If Bean implements BeanFactoryAware  ,spring passes the beanfactory to           setBeanFactory() . Pre Initialization -  It also called postprocess of bean . if there are any bean BeanPostProcessors,  Spring calls postProcesserBeforeInitialization ()  method. Initialize beans -   If the bean implements IntializingBean ,its afterPropertySet()  method is called. If the bean has init method declaration, the specified initialization method is  Called. Post Initialization -  If there is  BeanPostProcessors , is implements , spring calls their  postProcessAfterinitalization() method.   Rea...

Jquery toggle class

.toggleClass() Returns:  jQuery .toggleClass(className) className   One or more class names (separated by spaces) to be toggled for each element in the matched set. .toggleClass(className, switch) className   One or more class names (separated by spaces) to be toggled for each element in the matched set. switch   A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. .toggleClass(function(index, class), [switch]) function(index, class)   A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set and the old class value as arguments. switch   A boolean value to determine whether the class should be added or removed. Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. This method takes one or more class na...

Jquery removeProp

. removeProp() Returns:  jQuery .removeProp(propertyName) propertyName   The name of the property to set. Remove a property for the set of matched elements. The  .removeProp()  method removes properties set by the  .prop()  method. With some built-in properties of a DOM element or  window  object, browsers may generate an error if an attempt is made to remove the property. jQuery first assigns the value undefined  to the property and ignores any error the browser generates. In general, it is only necessary to remove custom properties that have been set on an object, and not built-in (native) properties. Note:  Do not use this method to remove native properties such as checked, disabled, or selected. This will remove the property completely and, once removed, cannot be added again to element. Use  .prop()  to set these properties to  false  instead. Example   Demo Set a numeric property on a paragraph and then rem...