Author: jbalunas(a)redhat.com
Date: 2010-08-20 10:17:25 -0400 (Fri, 20 Aug 2010)
New Revision: 18850
Removed:
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/CancelControlIcon.java
Modified:
branches/RF-9112/
branches/RF-9112/core/api/src/main/java/org/richfaces/resource/ImageType.java
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/InputErrorIcon.java
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java
branches/RF-9112/examples/output-demo/src/main/java/org/richfaces/TogglePanelBean.java
branches/RF-9112/examples/output-demo/src/main/webapp/examples/accordion.xhtml
branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
Log:
Merged revisions 18838,18842,18845-18846 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r18838 | nbelaevski | 2010-08-20 05:20:08 -0400 (Fri, 20 Aug 2010) | 1 line
Updated skinning for inputNumberSlider
.......
r18842 | Alex.Kolonitsky | 2010-08-20 06:54:21 -0400 (Fri, 20 Aug 2010) | 1 line
Accordion width and height attributes
.......
r18845 | nbelaevski | 2010-08-20 10:02:27 -0400 (Fri, 20 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-9119
.......
r18846 | nbelaevski | 2010-08-20 10:03:25 -0400 (Fri, 20 Aug 2010) | 1 line
https://jira.jboss.org/browse/RF-8936
.......
Property changes on: branches/RF-9112
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-18827 /branches/RF-9023:1-18690 /branches/RF-9040_build_updated_m2:1-18626
+ /trunk:1-18847 /branches/RF-9023:1-18690 /branches/RF-9040_build_updated_m2:1-18626
Modified: branches/RF-9112/core/api/src/main/java/org/richfaces/resource/ImageType.java
===================================================================
---
branches/RF-9112/core/api/src/main/java/org/richfaces/resource/ImageType.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/core/api/src/main/java/org/richfaces/resource/ImageType.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -21,14 +21,20 @@
*/
package org.richfaces.resource;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
import java.awt.image.IndexColorModel;
+import java.awt.image.WritableRaster;
public enum ImageType {
GIF("gif") {
@Override
public BufferedImage createImage(int width, int height) {
- return createARGBImage(width, height);
+ return createBitmaskImage(width, height);
}
},
PNG("png") {
@@ -98,6 +104,15 @@
return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
}
+ private static BufferedImage createBitmaskImage(int width, int height) {
+ ColorModel colorModel = new
ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false,
+ Transparency.BITMASK, DataBuffer.TYPE_BYTE);
+
+ WritableRaster raster = colorModel.createCompatibleWritableRaster(width,
height);
+
+ return new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(),
null);
+ }
+
public abstract BufferedImage createImage(int width, int height);
public String getFormatName() {
Deleted:
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/CancelControlIcon.java
===================================================================
---
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/CancelControlIcon.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/CancelControlIcon.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -1,126 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.renderkit.html.images;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.GradientPaint;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.Java2Dresource;
-import org.ajax4jsf.util.HtmlColor;
-import org.richfaces.resource.DynamicResource;
-import org.richfaces.resource.ImageType;
-
-/**
- * implementation of the default CANCEL icon renderer
- *
- * @author Anton Belevich
- * @since 3.2.0
- */
-@DynamicResource
-public class CancelControlIcon extends Java2Dresource {
-
- protected static final String ALTERNATE_COLOR = "#ED6161";
-
- private static final Dimension DIMENSIONS = new Dimension(11, 11);
-
- protected Integer iconColor;
- protected Integer iconBorderColor;
-
- public CancelControlIcon() {
- super(ImageType.GIF);
- }
-
- @Override
- public Dimension getDimension() {
- return DIMENSIONS;
- }
-
- @Override
- public void readState(FacesContext context, DataInput stream) throws IOException {
- super.readState(context, stream);
-
- this.iconColor = stream.readInt();
- this.iconBorderColor = stream.readInt();
- }
-
- public void writeState(FacesContext context, DataOutput stream) throws IOException {
- super.writeState(context, stream);
-
- stream.writeInt(this.iconColor);
- stream.writeInt(this.iconBorderColor);
- }
-
- @Override
- protected void paint(Graphics2D g2d, Dimension dimension) {
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_OFF);
-// g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
-// g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
RenderingHints.VALUE_STROKE_DEFAULT);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_DEFAULT);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_DEFAULT);
- Color iconColour = new Color(iconColor);
- Color iconBorder = new Color(iconBorderColor);
- g2d.setColor(iconColour);
-
- Color altenateColor = HtmlColor.decode(ALTERNATE_COLOR);
- GradientPaint gradient = new GradientPaint(2, 3, altenateColor, 3, 9,
iconColour);
- g2d.setPaint(gradient);
-
- // draw cross
- g2d.drawLine(2, 3, 7, 8);
- g2d.drawLine(3, 3, 7, 7);
- g2d.drawLine(3, 2, 8, 7);
-
- g2d.drawLine(2, 7, 7, 2);
- g2d.drawLine(3, 7, 7, 3);
- g2d.drawLine(3, 8, 8, 3);
-
- //draw border
- g2d.setColor(iconBorder);
- g2d.drawLine(1, 3, 3, 5);
- g2d.drawLine(3, 5, 1, 7);
- g2d.drawLine(1, 7, 3, 9);
- g2d.drawLine(3, 9, 5, 7);
- g2d.drawLine(5, 7, 7, 9);
- g2d.drawLine(7, 9, 9, 7);
- g2d.drawLine(9, 7, 7, 5);
- g2d.drawLine(7, 5, 9, 3);
- g2d.drawLine(9, 3, 7, 1);
- g2d.drawLine(7, 1, 5, 3);
- g2d.drawLine(5, 3, 3, 1);
- g2d.drawLine(3, 1, 1, 3);
-
-
- }
-}
-
Modified:
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/InputErrorIcon.java
===================================================================
---
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/InputErrorIcon.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/InputErrorIcon.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -20,30 +20,27 @@
*/
package org.richfaces.renderkit.html.images;
-import org.ajax4jsf.resource.ResourceContext;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
-import java.awt.*;
-
public class InputErrorIcon extends OneColorBasedResource {
+ private static final Dimension DIMENSION = new Dimension(6, 11);
+
public InputErrorIcon() {
- super(6, 11, "warningColor");
+ super("warningColor");
}
- /**
- * @see org.ajax4jsf.resource.Java2Dresource#paint(ResourceContext, Graphics2D)
- */
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
+ @Override
+ public Dimension getDimension() {
+ return DIMENSION;
+ }
+
+ @Override
+ public void paint(Graphics2D g2d, Dimension dimension) {
g2d.setColor(getBasicColor());
g2d.fillRect(3, 2, 2, 6);
g2d.fillRect(3, 9, 2, 2);
}
- @Override
- public Dimension getDimension() {
- // TODO Auto-generated method stub
- return null;
- }
-
}
Modified:
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java
===================================================================
---
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -23,40 +23,84 @@
import java.awt.Color;
import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
-import org.ajax4jsf.resource.Java2Dresource;
-import org.ajax4jsf.resource.ResourceContext;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.resource.CacheableResource;
import org.richfaces.resource.DynamicResource;
import org.richfaces.resource.ImageType;
+import org.richfaces.resource.Java2DUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
@DynamicResource
-public abstract class OneColorBasedResource extends Java2Dresource {
+public abstract class OneColorBasedResource implements Java2DUserResource,
CacheableResource, StateHolderResource {
- private Dimension dimension;
-
private String basicColorParamName;
private Color basicColor;
- public OneColorBasedResource(int width, int height, final String basicColorParamName)
{
- super(ImageType.GIF);
+ public OneColorBasedResource(final String basicColorParamName) {
this.basicColorParamName = basicColorParamName;
- this.dimension = new Dimension(width, height);
-
}
/**
- * @see Java2Dresource#isCacheable(ResourceContext)
- */
- public boolean isCacheable(ResourceContext ctx) {
- return true;
- }
-
- /**
* Gets value of basicColor field.
* @return value of basicColor field
*/
- public Color getBasicColor() {
+ protected Color getBasicColor() {
return basicColor;
}
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws
IOException {
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ dataOutput.writeInt(skin.getColorParameter(context, basicColorParamName));
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException
{
+ basicColor = new Color(dataInput.readInt());
+ }
+
+ public boolean isCacheable(FacesContext context) {
+ return true;
+ }
+
+ public Date getExpires(FacesContext context) {
+ return null;
+ }
+
+ public int getTimeToLive(FacesContext context) {
+ return 0;
+ }
+
+ public String getEntityTag(FacesContext context) {
+ return null;
+ }
+
+ public Map<String, String> getResponseHeaders() {
+ return null;
+ }
+
+ public Date getLastModified() {
+ return null;
+ }
+
+ public ImageType getImageType() {
+ return ImageType.GIF;
+ }
+
+ public abstract Dimension getDimension();
+
+ public abstract void paint(Graphics2D graphics2d, Dimension dimension);
}
Modified:
branches/RF-9112/examples/output-demo/src/main/java/org/richfaces/TogglePanelBean.java
===================================================================
---
branches/RF-9112/examples/output-demo/src/main/java/org/richfaces/TogglePanelBean.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/examples/output-demo/src/main/java/org/richfaces/TogglePanelBean.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -29,7 +29,6 @@
}
public String getValue() {
- System.out.println("value = " + value);
return value;
}
Modified: branches/RF-9112/examples/output-demo/src/main/webapp/examples/accordion.xhtml
===================================================================
---
branches/RF-9112/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2010-08-20
14:17:25 UTC (rev 18850)
@@ -15,7 +15,7 @@
<p>Page</p>
<h:form id="f" style="border:blue solid thin;">
- <pn:accordion>
+ <pn:accordion width="500px" height="300px">
<pn:accordionItem header="label 1">Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here. Content will be here. Content will be here. Content will be here.
Content will be here.</pn:accordionItem>
<pn:accordionItem header="label 2">content
2</pn:accordionItem>
<pn:accordionItem header="label 3">content
3</pn:accordionItem>
Modified:
branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
===================================================================
---
branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2010-08-20
14:17:25 UTC (rev 18850)
@@ -33,9 +33,9 @@
}
.rf-ins-mn, .rf-ins-mx, input.rf-ins-i, .rf-ins-tt {
- font-size: 11px;
- font-family: arial;
- color: #000000;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.generalTextColor}';
}
.rf-ins-mn, .rf-ins-mx {
@@ -44,13 +44,17 @@
}
.rf-ins-mn {
- border-left: 1px solid #c0c0c0;
+ border-left-width: 1px;
+ border-left-style: solid;
+ border-left-color: '#{richSkin.panelBorderColor}';
padding-left: 3px;
float: left;
}
.rf-ins-mx {
- border-right: 1px solid #c0c0c0;
+ border-right-width: 1px;
+ border-right-style: solid;
+ border-right-color: '#{richSkin.panelBorderColor}';
padding-right: 3px;
float: right;
text-align: right;
@@ -62,8 +66,11 @@
}
input.rf-ins-i {
- background:
url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}")
top repeat-x #fff;
- border: 1px inset #C0C0C0;
+ background:
url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}")
top repeat-x;
+ background-color: '#{richSkin.controlBackgroundColor}';
+ border-width: 1px;
+ border-style: inset;
+ border-color: '#{richSkin.panelBorderColor}';
margin: 0px 10px 0px 10px;
vertical-align: bottom;
}
@@ -77,8 +84,11 @@
}
.rf-ins-t {
- background:
url("#{resource['org.richfaces.renderkit.html.images.SliderTrackGradient']}")
1px 1px repeat-x #FFFFFF;
- border: 1px solid #C0C0C0;
+ background:
url("#{resource['org.richfaces.renderkit.html.images.SliderTrackGradient']}")
1px 1px repeat-x;
+ background-color: '#{richSkin.controlBackgroundColor}';
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
display: block;
height: 6px;
clear: both;
Modified:
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -70,6 +70,8 @@
onmousedown,
onmousemove,
onmouseout,
+ width,
+ height,
onmouseover,
onmouseup
}
@@ -83,6 +85,22 @@
return COMPONENT_FAMILY;
}
+ public String getWidth() {
+ return (String) getStateHelper().eval(PropertyKeys.width);
+ }
+
+ public void setWidth(String width) {
+ getStateHelper().put(PropertyKeys.width, width);
+ }
+
+ public String getHeight() {
+ return (String) getStateHelper().eval(PropertyKeys.height);
+ }
+
+ public void setHeight(String height) {
+ getStateHelper().put(PropertyKeys.height, height);
+ }
+
public String getItemHeaderClassActive() {
return (String) getStateHelper().eval(PropertyKeys.itemHeaderClassActive);
}
Modified:
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -25,6 +25,7 @@
import org.ajax4jsf.javascript.JSObject;
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.AbstractAccordion;
+import org.richfaces.component.util.HtmlUtil;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
@@ -34,6 +35,8 @@
import java.io.IOException;
import java.util.Map;
+import static org.richfaces.component.html.HtmlAccordion.PropertyKeys.*;
+
/**
* @author akolonitsky
* @since 2010-08-05
@@ -56,6 +59,15 @@
}
@Override
+ protected String getStyle(UIComponent component) {
+ return HtmlUtil.concatStyles(
+ attributeAsStyle(component, height),
+ attributeAsStyle(component, width),
+
+ super.getStyle(component));
+ }
+
+ @Override
protected String getStyleClass(UIComponent component) {
return "rf-ac " + attributeAsString(component,
"styleClass");
}
@@ -79,6 +91,7 @@
@Override
protected Map<String, Object> getScriptObjectOptions(FacesContext context,
UIComponent component) {
Map<String, Object> options = super.getScriptObjectOptions(context,
component);
+ options.put("isKeepHeight", !attributeAsString(component,
height).isEmpty());
options.remove("items");
return options;
Modified:
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-08-20
14:17:25 UTC (rev 18850)
@@ -43,7 +43,7 @@
*/
public class DivPanelRenderer extends RendererBase {
- private static final RenderKitUtils.Attributes PASS_THROUGH_ATTRIBUTES0 =
attributes(
+ private static final RenderKitUtils.Attributes PASS_THROUGH_ATTRIBUTES = attributes(
lang,
onclick,
ondblclick,
@@ -53,10 +53,21 @@
onmouseover,
onmouseup,
title,
- style,
dir
);
+ protected static String attributeAsStyle(UIComponent comp, Enum attr) {
+ String value = attributeAsString(comp, attr.toString());
+ if (value.isEmpty()) {
+ return "";
+ }
+
+ return new StringBuilder()
+ .append(attr).append(':').append(value).toString();
+ }
+ protected static String attributeAsString(UIComponent comp, Enum attr) {
+ return attributeAsString(comp, attr.toString());
+ }
protected static String attributeAsString(UIComponent comp, String attr) {
Object o = comp.getAttributes().get(attr);
return o == null ? "" : o.toString();
@@ -80,9 +91,18 @@
writer.startElement(HTML.DIV_ELEM, component);
writer.writeAttribute("id", component.getClientId(context),
"clientId");
writer.writeAttribute("class", getStyleClass(component), null);
- renderPassThroughAttributes(context, component, PASS_THROUGH_ATTRIBUTES0);
+ writer.writeAttribute(HTML.STYLE_ATTRIBUTE, getStyle(component), null);
+ renderPassThroughAttributes(context, component, getPassThroughAttributes());
}
+ protected String getStyle(UIComponent component) {
+ return attributeAsString(component, "style");
+ }
+
+ protected RenderKitUtils.Attributes getPassThroughAttributes() {
+ return PASS_THROUGH_ATTRIBUTES;
+ }
+
protected String getStyleClass(UIComponent component) {
return attributeAsString(component, "styleClass");
}
Modified: branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-08-20
14:17:25 UTC (rev 18850)
@@ -25,6 +25,16 @@
</property>
<property>
<description></description>
+ <property-name>height</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
+ <property-name>width</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <description></description>
<property-name>bypassUpdates</property-name>
<property-class>boolean</property-class>
</property>
Modified: branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-08-20
14:14:43 UTC (rev 18849)
+++ branches/RF-9112/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-08-20
14:17:25 UTC (rev 18850)
@@ -338,6 +338,16 @@
</attribute>
<attribute>
<description></description>
+ <name>height</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
+ <name>width</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description></description>
<name>bypassUpdates</name>
<type>boolean</type>
</attribute>
Modified:
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/AccordionItem.js 2010-08-20
14:17:25 UTC (rev 18850)
@@ -69,7 +69,10 @@
* @return {jQuery Object}
* */
__content : function () {
- return $(rf.getDomElement(this.id + ":content"));
+ if (!this.__content_) {
+ this.__content_ = $(rf.getDomElement(this.id + ":content"));
+ }
+ return this.__content_;
},
/**
@@ -80,14 +83,15 @@
__enter : function () {
var parentPanel = this.getTogglePanel();
if (parentPanel.isKeepHeight) {
+ this.__content().hide();
var h = parentPanel.getInnerHeight();
var items = parentPanel.getItems();
for (var i = 0; i < items.length; i++) {
- h -= items[i].getHeight();
+ h -= items[i].__header().outerHeight();
}
- this.__content().height(h);
+ this.__content().height(h - 20); // 20 it is padding top and bottom
}
this.__content().show();
Modified:
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
===================================================================
---
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2010-08-20
14:14:43 UTC (rev 18849)
+++
branches/RF-9112/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2010-08-20
14:17:25 UTC (rev 18850)
@@ -1,5 +1,5 @@
.rf-ac {
- width: 300px; /*visible width*/
+ /*width: 300px;*/ /*visible width*/
border-width: 1px;
border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
@@ -28,7 +28,7 @@
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: '#{richSkin.panelBorderColor}';
- height: 100px /*visible modal panel height minus header height*/;
+ /*height: 100px*/ /*visible modal panel height minus header height*/;
position: relative;
overflow: auto;
overflow-x: hidden;