Author: pyaschenko
Date: 2008-03-31 14:00:43 -0400 (Mon, 31 Mar 2008)
New Revision: 7493
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/taglib/ToolTipTagHandlerBase.java
Log:
http://jira.jboss.com/jira/browse/RF-2879
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/taglib/ToolTipTagHandlerBase.java
===================================================================
---
trunk/ui/tooltip/src/main/java/org/richfaces/taglib/ToolTipTagHandlerBase.java 2008-03-31
17:36:31 UTC (rev 7492)
+++
trunk/ui/tooltip/src/main/java/org/richfaces/taglib/ToolTipTagHandlerBase.java 2008-03-31
18:00:43 UTC (rev 7493)
@@ -10,23 +10,27 @@
import com.sun.facelets.tag.jsf.ComponentConfig;
public abstract class ToolTipTagHandlerBase extends AjaxComponentHandler {
-
- public ToolTipTagHandlerBase(ComponentConfig config) {
- super(config);
- }
-
- protected MetaRuleset createMetaRuleset(Class type) {
- TagAttributes attributes = this.tag.getAttributes();
- TagAttribute attribute = attributes.get("event");
- if (attribute != null && attributes.get("showEvent") != null) {
- TagAttribute idAttribute = attributes.get("id");
- FacesContext facesContext = FacesContext.getCurrentInstance();
- facesContext.getExternalContext().log("showEvent attribute has been already set
for component with id: " +
- idAttribute != null ? idAttribute.getValue() : null +
- "[" + attribute.getValue() + "]. event attribute is deprecated and
thus has been dropped!");
- }
- return super.createMetaRuleset(type).alias("event", "showEvent");
- }
+ public ToolTipTagHandlerBase(ComponentConfig config) {
+ super(config);
+ }
+ protected MetaRuleset createMetaRuleset(Class type) {
+ TagAttributes attributes = this.tag.getAttributes();
+ TagAttribute eventAttribute = attributes.get("event");
+ TagAttribute showEventAttribute = attributes.get("showEvent");
+ MetaRuleset ruleset = super.createMetaRuleset(type);
-
-}
+ if (eventAttribute != null) {
+ if (showEventAttribute != null) {
+ TagAttribute idAttribute = attributes.get("id");
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ facesContext.getExternalContext().log("showEvent attribute has been
already set for component with id: " +
+ idAttribute != null ? idAttribute.getValue() : null +
+ "[" + eventAttribute.getValue() + "]. event
attribute is deprecated and thus has been dropped!");
+ ruleset.ignore("event");
+ } else {
+ ruleset.alias("event", "showEvent");
+ }
+ }
+ return ruleset;
+ }
+}
\ No newline at end of file