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 2009/12/07 17:22:10 UTC
svn commit: r887975 - in /myfaces/tobago/branches/tobago-1.0.x:
core/src/main/java/org/apache/myfaces/tobago/taglib/component/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
Author: lofwyr
Date: Mon Dec 7 16:22:08 2009
New Revision: 887975
URL: http://svn.apache.org/viewvc?rev=887975&view=rev
Log:
TOBAGO-835: tip attribute for Panel
Modified:
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java?rev=887975&r1=887974&r2=887975&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java Mon Dec 7 16:22:08 2009
@@ -23,17 +23,19 @@
*/
-import org.apache.myfaces.tobago.component.UIPanel;
+import org.apache.myfaces.tobago.TobagoConstants;
import org.apache.myfaces.tobago.component.ComponentUtil;
+import org.apache.myfaces.tobago.component.UIPanel;
-import javax.servlet.jsp.tagext.BodyTag;
import javax.faces.component.UIComponent;
+import javax.servlet.jsp.tagext.BodyTag;
// Some Weblogic versions need explicit 'implements' for BodyTag
public class PanelTag extends TobagoBodyTag
implements BodyTag, PanelTagDeclaration {
private String markup;
+ private String tip;
public String getComponentType() {
return UIPanel.COMPONENT_TYPE;
@@ -42,16 +44,20 @@
public void release() {
super.release();
markup = null;
+ tip = null;
}
protected void setProperties(UIComponent component) {
super.setProperties(component);
ComponentUtil.setMarkup(component, markup);
+ ComponentUtil.setStringProperty(component, TobagoConstants.ATTR_TIP, tip);
}
public void setMarkup(String markup) {
this.markup = markup;
}
+ public void setTip(String tip) {
+ this.tip = tip;
+ }
}
-
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java?rev=887975&r1=887974&r2=887975&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java Mon Dec 7 16:22:08 2009
@@ -24,6 +24,7 @@
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasTip;
/*
* Date: 11.02.2006
@@ -41,7 +42,7 @@
@Facet(name = "reload", description = "Contains an instance of UIReload"),
@Facet(name = "layout", description = "Contains an instance of UILayout")})
public interface PanelTagDeclaration extends TobagoBodyTagDeclaration,
- HasIdBindingAndRendered, HasDeprecatedDimension {
+ HasIdBindingAndRendered, HasDeprecatedDimension, HasTip {
/**
* Indicate markup of this component.
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java?rev=887975&r1=887974&r2=887975&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java Mon Dec 7 16:22:08 2009
@@ -24,9 +24,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
-import static org.apache.myfaces.tobago.TobagoConstants.FACET_LAYOUT;
-import static org.apache.myfaces.tobago.TobagoConstants.FACET_RELOAD;
+import org.apache.myfaces.tobago.TobagoConstants;
import org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener;
import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
import org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer;
@@ -48,6 +46,10 @@
import javax.faces.context.ResponseWriter;
import java.io.IOException;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
+import static org.apache.myfaces.tobago.TobagoConstants.FACET_LAYOUT;
+import static org.apache.myfaces.tobago.TobagoConstants.FACET_RELOAD;
+
public class PanelRenderer extends LayoutableRendererBase implements AjaxRenderer {
private static final Log LOG = LogFactory.getLog(PanelRenderer.class);
@@ -132,6 +134,10 @@
writer.writeClassAttribute();
writer.writeIdAttribute(clientId);
//writer.writeStyleAttribute();
+ String tip = (String) component.getAttributes().get(TobagoConstants.ATTR_TIP);
+ if (tip != null) {
+ writer.writeAttribute(HtmlConstants.TITLE, tip, true);
+ }
if (TobagoConfig.getInstance(facesContext).isAjaxEnabled()) {
writer.writeJavascript("Tobago.addAjaxComponent(\"" + clientId + "\")");
Integer frequency = null;