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>
Comments
Post a Comment