You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2007/02/26 18:10:30 UTC
svn commit: r511906 - in
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component:
MenuCommandTag.java MenuCommandTagDeclaration.java
Author: lofwyr
Date: Mon Feb 26 09:10:30 2007
New Revision: 511906
URL: http://svn.apache.org/viewvc?view=rev&rev=511906
Log:
TOBAGO-286: Target Attribute for Menu
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java?view=diff&rev=511906&r1=511905&r2=511906
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTag.java Mon Feb 26 09:10:30 2007
@@ -20,10 +20,13 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_IMAGE;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TARGET;
import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_MENUCOMMAND;
import org.apache.myfaces.tobago.component.ComponentUtil;
import org.apache.myfaces.tobago.component.UIMenuCommand;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import javax.faces.component.UIComponent;
@@ -36,6 +39,7 @@
private String image;
private String label;
+ private String target;
public String getComponentType() {
return UIMenuCommand.COMPONENT_TYPE;
@@ -45,6 +49,7 @@
super.release();
image = null;
label = null;
+ target = null;
}
protected void setProperties(UIComponent component) {
@@ -53,6 +58,7 @@
ComponentUtil.setStringProperty(component, ATTR_IMAGE, image);
//ComponentUtil.setStringProperty(component, ATTR_COMMAND_TYPE, COMMAND_TYPE);
ComponentUtil.setStringProperty(component, ATTR_LABEL, label);
+ ComponentUtil.setStringProperty(component, ATTR_TARGET, target);
}
public String getImage() {
@@ -84,5 +90,9 @@
LOG.warn("Attibute 'labelWithAccessKey' is deprecated, "
+ "and will removed soon! Please use 'label' instead.");
setLabel(labelWithAccessKey);
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java?view=diff&rev=511906&r1=511905&r2=511906
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/MenuCommandTagDeclaration.java Mon Feb 26 09:10:30 2007
@@ -24,6 +24,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasImage;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
+import org.apache.myfaces.tobago.taglib.decl.HasTarget;
/*
* Created by IntelliJ IDEA.
@@ -39,5 +40,5 @@
uiComponent = "org.apache.myfaces.tobago.component.UIMenuCommand",
rendererType = "MenuCommand")
public interface MenuCommandTagDeclaration extends TobagoTagDeclaration, AbstractCommandTagDeclaration,
- HasIdBindingAndRendered, HasLabelAndAccessKey, IsDisabled, HasCommandType, HasImage {
+ HasIdBindingAndRendered, HasLabelAndAccessKey, IsDisabled, HasCommandType, HasImage, HasTarget {
}