You need to add something according to following codes, or refer to
http://www.nabble.com/Schedule-component%2C-mouseListener-is-not-triggered-At-all-tf2213732.html
public class ScheduleComponentHandler extends HtmlComponentHandler {
| // private static final Log logger =
LogFactory.getLog(ScheduleComponentHandler.class);
|
| private static final String RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME =
"renderZeroLengthEntries";
| private static final String MOUSE_LISTENER_METHOD_ATTRIBUTE_NAME =
"mouseListener";
| private static final String EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME =
"expandToFitEntries";
|
| public ScheduleComponentHandler(ComponentConfig tagConfig) {
| super(tagConfig);
| }
|
| protected MetaRuleset createMetaRuleset(Class type){
| MetaRuleset m = super.createMetaRuleset(type);
| m.addRule(new MethodRule(MOUSE_LISTENER_METHOD_ATTRIBUTE_NAME,
null, new Class[] {ScheduleMouseEvent.class }));
| return m;
| }
|
| @Override
| protected void onComponentCreated(FaceletContext context, UIComponent
component, UIComponent parent) {
| if (getAttribute(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME) !=
null) {
|
component.getAttributes().put(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME,
getAttribute(RENDER_ZERO_LENGTH_ENTRIES_ATTRIBUTE_NAME).getObject(context));
| }
|
| if (getAttribute(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME) != null) {
|
component.getAttributes().put(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME,
getAttribute(EXPAND_TO_FIT_ENTRIES_ATTRIBUTE_NAME).getObject(context));
| }
| }
| }--tomahawk.taglib.xml
| ...
| <tag>
| <tag-name>schedule</tag-name>
| <component>
| <component-type>org.apache.myfaces.Schedule</component-type>
| <renderer-type> org.apache.myfaces.Schedule</renderer-type>
|
<handler-class>com.genchik.componenthandlers.ScheduleComponentHandler</handler-class>
| </component>
| </tag>
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970791#3970791
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970791
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user