jsf - How to override primefaces component class -


i override primefaces component class. so, have registered component class in faces-config.xml of war project.

    <component>         <component-type>org.primefaces.component.dnd.droppable</component-type>         <component-class>com.******.****.****.component.customdroppable</component-class>     </component> 

this new test class:

public class customdroppable extends droppable{      @override     public void queueevent(facesevent event) {         system.out.print("fffffffffffff");     }  } 

the application built anew, uses old class. why ? else should ?

in <component-type>, should specify component type, not component class. component type not resemble java fqn, can kind of string want. usually, can find right component type in api documentation of component class you'd replace.

in case of org.primefaces.component.dnd.droppable class, it's defined constant field component_type value org.primefaces.component.droppable (thus, without dnd "subpackage" compared component class).

fix accordingly:

<component>     <component-type>org.primefaces.component.droppable</component-type>     <component-class>...</component-class> </component> 

see also:


Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -