JBoss Rich Faces SVN: r16824 - branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-04-27 20:54:49 -0400 (Tue, 27 Apr 2010)
New Revision: 16824
Modified:
branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java
branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/DisabledCalendarIcon.java
Log:
https://jira.jboss.org/jira/browse/RFPL-551
Modified: branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java
===================================================================
--- branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java 2010-04-27 14:30:54 UTC (rev 16823)
+++ branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/CalendarIcon.java 2010-04-28 00:54:49 UTC (rev 16824)
@@ -51,9 +51,9 @@
public class CalendarIcon extends Java2Dresource {
private static Dimension dimension = new Dimension(20, 20);
-
+
/**
- *
+ *
*/
public CalendarIcon() {
setRenderer(new GifRenderer());
@@ -68,7 +68,7 @@
// TODO Auto-generated method stub
return dimension;
}
-
+
/* (non-Javadoc)
* @see org.ajax4jsf.resource.Java2Dresource#getDimensions(org.ajax4jsf.resource.ResourceContext)
*/
@@ -76,52 +76,52 @@
// TODO Auto-generated method stub
return dimension;
}
-
+
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
-
+
String skinParameter = "headerBackgroundColor";
String headerTextColor = (String) skin.getParameter(context, skinParameter);
if (null == headerTextColor || "".equals(headerTextColor))
headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
-
+
if (headerTextColor == null) {
return null;
}
-
-
+
+
skinParameter = "selectControlColor";
String headerBackgroundColor = (String) skin.getParameter(context, skinParameter);
if (null == headerBackgroundColor || "".equals(headerBackgroundColor))
headerBackgroundColor = (String) defaultSkin.getParameter(context, skinParameter);
-
+
if(headerBackgroundColor == null){
return null;
}
-
+
byte[] ret = new byte[6];
Zipper2 zipper2 = new Zipper2(ret).addColor(HtmlColor.decode(headerTextColor).getRGB());
zipper2.addColor(HtmlColor.decode(headerBackgroundColor).getRGB());
return ret;
}
-
+
protected Object deserializeData(byte[] objectArray) {
if (objectArray == null) {
return null;
}
-
+
Object[] colors = new Object[2];
Zipper2 z = new Zipper2(objectArray);
colors[0] = z.nextColor();
colors[1] = z.nextColor();
-
+
return colors;
}
-
+
public void paint(ResourceContext context, Graphics2D graphics) {
-
+
Object[] stored = (Object[]) restoreData(context);
if (stored != null) {
Dimension dim = getDimensions(context);
@@ -129,36 +129,40 @@
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
graphics.drawImage(image, 0, 0, dim.width, dim.height, null);
-
+
}
-
+
}
+ protected BufferedImage createImage(int width, int height) {
+ return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ }
+
protected BufferedImage paintImage(Object [] colors) {
- BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
-
+ BufferedImage image = createImage(16, 16);
+
Graphics2D g2d = image.createGraphics();
-
+
Color borderColor = (Color) colors[0];//new Color(((Integer) stored[0]).intValue());
Color activeColor = (Color) colors[1];//new Color(((Integer) stored[1]).intValue());
-
+
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
-
+
g2d.setStroke(new BasicStroke(1));
-
+
int w = 16;
int h = 16;
-
-
+
+
//Draw Border
g2d.setColor(borderColor);
Rectangle2D border = new Rectangle2D.Double(1, 1, w - 3, h - 3);
RoundRectangle2D round = new RoundRectangle2D.Double(1, 1, w- 3, h - 3, 2, 2);
g2d.draw(round);
-
+
Color lightBlue = new Color(216, 226, 240);
Paint gradient1 = new GradientPaint(w-4, h-4, lightBlue, 2, 2, Color.white);
g2d.setPaint(gradient1);
@@ -176,36 +180,36 @@
g2d.drawLine(7, 6, 7, 11);
g2d.drawLine(9, 6, 9, 11);
g2d.drawLine(11, 6, 11, 11);
-
-
-
-
-
+
+
+
+
+
//Draw orange rectangle
border = new Rectangle2D.Double(3, 3, 10, 3);
g2d.setColor(Color.white);
g2d.fill(border);
-
+
Color c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 100);
Color c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
-
+
gradient1 = new GradientPaint(12, 4, activeColor, 4, 7, c2);
g2d.setPaint(gradient1);
g2d.fill(border);
//g2d.setColor(activeColor);
-
+
c = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 150);
c2 = new Color(activeColor.getRed(), activeColor.getGreen(), activeColor.getBlue(), 200);
border = new Rectangle2D.Double(4, 4, 8, 1);
-
+
g2d.setColor(Color.white);
g2d.fill(border);
-
+
gradient1 = new GradientPaint(4, 4, c, 10, 4, c2);
//g2d.setPaint(gradient1);
g2d.setColor(c);
g2d.fill(border);
-
+
g2d.dispose();
return image;
Modified: branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/DisabledCalendarIcon.java
===================================================================
--- branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/DisabledCalendarIcon.java 2010-04-27 14:30:54 UTC (rev 16823)
+++ branches/enterprise/3.3.X/ui/calendar/src/main/java/org/richfaces/renderkit/html/iconimages/DisabledCalendarIcon.java 2010-04-28 00:54:49 UTC (rev 16824)
@@ -21,25 +21,29 @@
package org.richfaces.renderkit.html.iconimages;
+import java.awt.Transparency;
import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
-import java.awt.image.ColorConvertOp;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.WritableRaster;
/**
* @author Maksim Kaszynski
*
*/
public class DisabledCalendarIcon extends CalendarIcon {
-
- /* (non-Javadoc)
- * @see org.richfaces.renderkit.html.iconimages.CalendarIcon#paintImage(java.lang.Object[])
- */
- protected BufferedImage paintImage(Object[] colors) {
-
- BufferedImage image = super.paintImage(colors);
-
- image = new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY), null).filter(image, null);
-
- return image;
+
+ @Override
+ protected BufferedImage createImage(int width, int height) {
+ ColorSpace gsColorSpace = ColorSpace.getInstance(ColorSpace.CS_GRAY);
+
+ ComponentColorModel ccm = new ComponentColorModel(gsColorSpace, true, false,
+ Transparency.TRANSLUCENT, DataBuffer.TYPE_BYTE);
+
+ WritableRaster raster = ccm.createCompatibleWritableRaster(width, height);
+
+ return new BufferedImage(ccm, raster, ccm.isAlphaPremultiplied(), null);
}
+
}
14 years, 8 months
JBoss Rich Faces SVN: r16823 - in root/ui-sandbox/trunk/components/componentcontrol/src/main: resources/META-INF/resources/script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-04-27 10:30:54 -0400 (Tue, 27 Apr 2010)
New Revision: 16823
Modified:
root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/tag/BehaviorTagHandlerDelegate.java
root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
Log:
fix handler, public api invocation
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/tag/BehaviorTagHandlerDelegate.java
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/tag/BehaviorTagHandlerDelegate.java 2010-04-27 14:30:04 UTC (rev 16822)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/tag/BehaviorTagHandlerDelegate.java 2010-04-27 14:30:54 UTC (rev 16823)
@@ -95,22 +95,24 @@
}
private void collectParameters(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException {
- ComponentHandler componentHandler = (ComponentHandler) handler;
-
- ComponentConfig componentConfig = componentHandler.getComponentConfig();
- String componentType = componentConfig.getComponentType();
- if(isUIParameter(componentType)) {
-
- FacesContext facesContext = ctx.getFacesContext();
- UIComponent component = (UIComponent)facesContext.getApplication().createComponent(facesContext, componentType, null);
- if((component instanceof UIParameter) || (component instanceof UIHashParameter)) {
- componentHandler.setAttributes(ctx, component);
- getChildren().add(component);
+ if(handler instanceof ComponentHandler) {
+ ComponentHandler componentHandler = (ComponentHandler) handler;
+
+ ComponentConfig componentConfig = componentHandler.getComponentConfig();
+ String componentType = componentConfig.getComponentType();
+ if(isUIParameter(componentType)) {
+
+ FacesContext facesContext = ctx.getFacesContext();
+ UIComponent component = (UIComponent)facesContext.getApplication().createComponent(facesContext, componentType, null);
+ if((component instanceof UIParameter) || (component instanceof UIHashParameter)) {
+ componentHandler.setAttributes(ctx, component);
+ getChildren().add(component);
+ }
+
+ if(component instanceof UIHashParameter) {
+ componentHandler.applyNextHandler(ctx, component);
+ }
}
-
- if(component instanceof UIHashParameter) {
- componentHandler.applyNextHandler(ctx, component);
- }
}
}
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-04-27 14:30:04 UTC (rev 16822)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-04-27 14:30:54 UTC (rev 16823)
@@ -9,15 +9,19 @@
var target = parameters.target;
var callback = parameters.callback;
+ if(target) {
+ target = document.getElementById(target);
+ }
+
if(target && (callback && typeof callback == 'function')) {
richfaces.ui.ComponentControl.eachComponent(event, target, callback);
}
},
eachComponent : function(event, target, callback) {
- $(target.replace(/:/g, "\\:")).each(function() {
- if (this.component) {
- callback(event, this.component);
+ $(target).each(function() {
+ if (this.richfaces && this.richfaces.component) {
+ callback(event, this.richfaces.component);
}
});
}
14 years, 8 months
JBoss Rich Faces SVN: r16822 - root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-04-27 10:30:04 -0400 (Tue, 27 Apr 2010)
New Revision: 16822
Modified:
root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
Log:
change function encoding
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-04-27 14:29:19 UTC (rev 16821)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-04-27 14:30:04 UTC (rev 16822)
@@ -59,7 +59,7 @@
String apiFunctionName = controlBehavior.getOperation();
StringBuffer script = new StringBuffer();
- script.append(REF_COMPONENT).append("[").append(apiFunctionName).append("].").append("apply").append("(");
+ script.append(REF_COMPONENT).append("['").append(apiFunctionName).append("'].").append("apply").append("(");
List<Object> apiFunctionParams = createSignature(controlBehavior);
script.append(REF_COMPONENT).append(",").append(ScriptUtils.toScript(apiFunctionParams.toArray())).append(");");
14 years, 8 months
JBoss Rich Faces SVN: r16821 - root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/component/behavior.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-04-27 10:29:19 -0400 (Tue, 27 Apr 2010)
New Revision: 16821
Modified:
root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
Log:
add selector attribute
Modified: root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java
===================================================================
--- root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-04-27 14:27:33 UTC (rev 16820)
+++ root/ui-sandbox/trunk/components/componentcontrol/src/main/java/org/richfaces/component/behavior/ComponentControlBehavior.java 2010-04-27 14:29:19 UTC (rev 16821)
@@ -16,7 +16,7 @@
enum PropertyKeys {
- event, target, parameters, operation, type
+ event, target, selector, parameters, operation, type
}
private List<UIComponent> children;
@@ -50,15 +50,23 @@
}
public void setTarget(String target) {
- getStateHelper().eval(PropertyKeys.target, target);
+ getStateHelper().put(PropertyKeys.target, target);
}
+ public String getSelector() {
+ return (String)getStateHelper().eval(PropertyKeys.selector);
+ }
+
+ public void setSelector(String selector) {
+ getStateHelper().put(PropertyKeys.selector, selector);
+ }
+
public String getOperation() {
return (String)getStateHelper().eval(PropertyKeys.operation);
}
public void setOperation(String operation) {
- getStateHelper().eval(PropertyKeys.operation, operation);
+ getStateHelper().put(PropertyKeys.operation, operation);
}
@Override
14 years, 8 months
JBoss Rich Faces SVN: r16820 - in root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF: resources/script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-04-27 10:27:33 -0400 (Tue, 27 Apr 2010)
New Revision: 16820
Modified:
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js
Log:
change api
Modified: root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-04-27 14:07:01 UTC (rev 16819)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-04-27 14:27:33 UTC (rev 16820)
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<facelet-taglib version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" id="a4j">
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+ version="2.0" id="a4j">
<namespace>http://richfaces.org/datascroller</namespace>
<tag>
<tag-name>dataScroller</tag-name>
Modified: root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-04-27 14:07:01 UTC (rev 16819)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/script/datascroller.js 2010-04-27 14:27:33 UTC (rev 16820)
@@ -1,4 +1,4 @@
-(function (jQuery, richfaces) {
+(function ($, richfaces) {
richfaces.ui = richfaces.ui || {};
@@ -6,6 +6,8 @@
$super.constructor.call(this,id);
+ this.attachToDom.call(this, id);
+
this.options = options;
this.currentPage = options.currentPage;
@@ -48,7 +50,7 @@
var $super = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.ui.DataScroller);
- jQuery.extend(richfaces.ui.DataScroller.prototype, (function (options) {
+ $.extend(richfaces.ui.DataScroller.prototype, (function (options) {
var copy = function(data) {
var key;
@@ -105,7 +107,7 @@
for(id in buttons) {
- var element = jQuery(document.getElementById(id));
+ var element = $(document.getElementById(id));
data.id = id;
data.page = buttons[id];
@@ -139,11 +141,11 @@
},
next: function() {
- this.switchToPage("next");
+ this.switchToPage("fastforward");
},
previous: function() {
- this.switchToPage("previous");
+ this.switchToPage("fastrewind");
},
first: function() {
@@ -154,14 +156,6 @@
this.switchToPage("last");
},
- fastForward: function() {
- this.switchToPage("fastforward");
- },
-
- fastRewind: function() {
- this.switchToPage("fastrewind");
- },
-
getScrollEventName: function() {
return scrollEventName;
}
14 years, 8 months
JBoss Rich Faces SVN: r16819 - branches/enterprise/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-04-27 10:07:01 -0400 (Tue, 27 Apr 2010)
New Revision: 16819
Modified:
branches/enterprise/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
Log:
RFPL-553
Modified: branches/enterprise/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- branches/enterprise/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2010-04-27 13:32:45 UTC (rev 16818)
+++ branches/enterprise/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2010-04-27 14:07:01 UTC (rev 16819)
@@ -48,6 +48,9 @@
public class ToolTipRenderer extends AjaxComponentRendererBase {
+ private ToolTipRenderer blockRenderer;
+ private ToolTipRenderer nonblockRenderer;
+
private static final String AJAX_MODE = "ajax";
private final InternetResource[] styles = { getResource("/org/richfaces/renderkit/html/css/tooltip.xcss") };
@@ -399,15 +402,21 @@
}
private ToolTipRenderer getRenderer(UIToolTip toolTip) throws ClassNotFoundException, InstantiationException, IllegalAccessException{
- Class<?> rendererClass;
- if ("block".equals(toolTip.getLayout())) {
- rendererClass = Class.forName("org.richfaces.renderkit.html.HtmlToolTipRendererBlock");
- } else {
- rendererClass = Class.forName("org.richfaces.renderkit.html.HtmlToolTipRenderer");
+ synchronized (this) {
+ if ("block".equals(toolTip.getLayout())) {
+ if (blockRenderer==null){
+ blockRenderer = (ToolTipRenderer)Class.forName("org.richfaces.renderkit.html.HtmlToolTipRendererBlock").newInstance();
+ }
+ return blockRenderer;
+
+ } else {
+ if (nonblockRenderer==null){
+ nonblockRenderer = (ToolTipRenderer)Class.forName("org.richfaces.renderkit.html.HtmlToolTipRenderer").newInstance();
+ }
+ return nonblockRenderer;
+
+ }
}
-
- return (ToolTipRenderer) rendererClass.newInstance();
-
}
}
14 years, 8 months
JBoss Rich Faces SVN: r16818 - in branches/enterprise/3.3.X/ui/scrollableDataTable/src/main: java/org/richfaces/convert/selection and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-04-27 09:32:45 -0400 (Tue, 27 Apr 2010)
New Revision: 16818
Modified:
branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/convert/selection/ClientSelectionConverter.java
branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/model/selection/ClientSelection.java
branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RFPL-557
Modified: branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
===================================================================
--- branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2010-04-27 12:16:15 UTC (rev 16817)
+++ branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2010-04-27 13:32:45 UTC (rev 16818)
@@ -465,6 +465,8 @@
public abstract Object getActiveRowKey();
public abstract void setActiveRowKey(Object activeRowKey);
+ public abstract int getShiftRowIndex();
+ public abstract void setShiftRowIndex(int shiftRowIndex);
/* (non-Javadoc)
* @see org.ajax4jsf.component.UIDataAdaptor#setRowIndex(int)
*/
Modified: branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/convert/selection/ClientSelectionConverter.java
===================================================================
--- branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/convert/selection/ClientSelectionConverter.java 2010-04-27 12:16:15 UTC (rev 16817)
+++ branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/convert/selection/ClientSelectionConverter.java 2010-04-27 13:32:45 UTC (rev 16818)
@@ -89,7 +89,12 @@
clientSelection.setSelectionFlag(selections[length-1]);
length--;
}
- clientSelection.setActiveRowIndex(Integer.parseInt(selections[length-1]));
+ String[] rows = selections[length-1].split("\\|");
+ clientSelection.setActiveRowIndex(Integer.parseInt(rows[0]));
+ String shiftRowIndex = rows[1];
+ if (shiftRowIndex.charAt(0) > '0') {
+ clientSelection.setShiftRowIndex(Integer.parseInt(shiftRowIndex));
+ }
length--;
for (int i = 0; i < length; i++) {
Modified: branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/model/selection/ClientSelection.java
===================================================================
--- branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/model/selection/ClientSelection.java 2010-04-27 12:16:15 UTC (rev 16817)
+++ branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/model/selection/ClientSelection.java 2010-04-27 13:32:45 UTC (rev 16818)
@@ -39,10 +39,16 @@
public static final String FLAG_ALL = "a";
+ public static final String FLAG_ADD2SELECTION_AFTER_RANGE = "d";
+
+ public static final String FLAG_ADD2SELECTION_BEFORE_RANGE = "u";
+
private String selectionFlag;
private int activeRowIndex = -1;
+ private int shiftRowIndex = -1;
+
private List<SelectionRange> ranges = new ArrayList<SelectionRange>();
public ClientSelection() {
@@ -145,17 +151,24 @@
if (FLAG_ALL.equals(selectionFlag)) {
selectAll = true;
- } else if (FLAG_RESET.equals(selectionFlag)) {
+ } else if (FLAG_RESET.equals(selectionFlag) || FLAG_ADD2SELECTION_AFTER_RANGE.equals(selectionFlag)
+ || FLAG_ADD2SELECTION_BEFORE_RANGE.equals(selectionFlag)) {
reset = true;
}
}
+ public int getShiftRowIndex() {
+ return shiftRowIndex;
+ }
+ public void setShiftRowIndex(int shiftRowIndex) {
+ this.shiftRowIndex = shiftRowIndex;
+ }
+
public int getActiveRowIndex() {
return activeRowIndex;
}
-
public void setActiveRowIndex(int activeRowIndex) {
this.activeRowIndex = activeRowIndex;
}
Modified: branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
===================================================================
--- branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2010-04-27 12:16:15 UTC (rev 16817)
+++ branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2010-04-27 13:32:45 UTC (rev 16818)
@@ -81,7 +81,8 @@
.getAsObject(context, grid, value);
final ScrollableDataTableRendererState state = ScrollableDataTableRendererState
.createState(context, grid);
- state.setRowIndex(ScrollableDataTableUtils.getClientRowIndex(grid));
+ int clientRowIndex = ScrollableDataTableUtils.getClientRowIndex(grid);
+ state.setRowIndex(clientRowIndex);
final SimpleSelection simpleSelection = grid.getSelection() == null ? new SimpleSelection()
: (SimpleSelection) grid.getSelection();
if (clientSelection.isReset() || clientSelection.isSelectAll()) {
@@ -117,6 +118,39 @@
} catch (IOException e) {
throw new FacesException(e);
}
+ int shiftRowIndex = clientSelection.getShiftRowIndex();
+ if (shiftRowIndex != -1) {
+ int rows = grid.getRows();
+ grid.setShiftRowIndex(grid.getFirst() + (rows + shiftRowIndex - clientRowIndex) % rows);
+ }
+ int oldFirst = grid.getFirst();
+ int oldRows = grid.getRows();
+ int newFirst = -1;
+ int newRows = -1;
+
+ if (ClientSelection.FLAG_ADD2SELECTION_BEFORE_RANGE.equals(clientSelection.getSelectionFlag())) {
+ newFirst = grid.getShiftRowIndex();
+ newRows = oldFirst - newFirst;
+ } else if (ClientSelection.FLAG_ADD2SELECTION_AFTER_RANGE.equals(clientSelection.getSelectionFlag())) {
+ newFirst = oldFirst + oldRows;
+ newRows = grid.getShiftRowIndex() - newFirst + 1;
+ }
+ if (newFirst != -1) {
+ grid.setFirst(newFirst);
+ grid.setRows(newRows);
+ try {
+ grid.walk(context, new DataVisitor() {
+ public void process(FacesContext context, Object rowKey,
+ Object argument) throws IOException {
+ simpleSelection.addKey(rowKey);
+ }
+ }, null);
+ } catch (IOException e) {
+ throw new FacesException(e);
+ }
+ grid.setFirst(oldFirst);
+ grid.setRows(oldRows);
+ }
grid.setSelection(simpleSelection);
ValueExpression selectionBinding = grid
.getValueExpression("selection");
@@ -277,7 +311,20 @@
string = "";
}
- string += selection.getActiveRowIndex();
+ int first = grid.getFirst();
+ int rows = grid.getRows();
+ int shiftRowIndex = grid.getShiftRowIndex();
+ String shiftRow = "|.";
+ if (shiftRowIndex > 0) {
+ if (shiftRowIndex < first) {
+ shiftRow = "|-";
+ } else if (shiftRowIndex > first + rows) {
+ shiftRow = "|+";
+ } else {
+ shiftRow = "|" + (rows + shiftRowIndex - first + ScrollableDataTableUtils.getClientRowIndex(grid)) % rows;
+ }
+ }
+ string += selection.getActiveRowIndex() + shiftRow;
String id = getSelectionInputName(context, grid);
Modified: branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2010-04-27 12:16:15 UTC (rev 16817)
+++ branches/enterprise/3.3.X/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2010-04-27 13:32:45 UTC (rev 16818)
@@ -248,11 +248,21 @@
restoreState: function() {
this.selectionFlag = null;
var selStrAr = $(this.inputElement).value.split(";");
- var activeRow = NaN;
- while (selStrAr.length != 0 && selStrAr[selStrAr.length - 1].indexOf(",") == -1 &&
- isNaN(activeRow = Number(selStrAr.pop())));
- if (!isNaN(activeRow)) {
- this.setActiveRow(activeRow);
+ var rowsString = "";
+ while (selStrAr.length != 0 && (rowsString = selStrAr.pop()).indexOf("|") == -1);
+ var rows = rowsString.split("|");
+ if (rows.length == 2) {
+ var activeRow = Number(rows[0]);
+ if (!isNaN(activeRow)) {
+ this.setActiveRow(activeRow);
+ }
+ var shiftRowString = rows[1];
+ var shiftRow = Number(shiftRowString);
+ if (!isNaN(shiftRow)) {
+ this.shiftRow = shiftRow;
+ } else if ("+-".indexOf(shiftRowString) != -1 ) {
+ this.shiftRow = shiftRowString;
+ }
}
this.selection.initRanges(selStrAr);
// this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
@@ -321,7 +331,7 @@
processKeyDown: function(event) {
if ($(this.prefix + ":n").rows.length > 0) {
- if(!event.shiftKey) {
+ if(!event.shiftKey && (event.keyCode || event.charCode) != 16) {
this.shiftRow = null;
}
var range, rowIndex;
@@ -407,13 +417,25 @@
var range;
if ( event.shiftKey && !event.ctrlKey && !event.altKey && !this.isSingleMode) {
this.firstIndex = Number($(this.prefix + ":n").rows[0].id.split(this.prefix)[1].split(":")[2]);;
- this.selectionFlag = "x";
if(!this.shiftRow) {
- this.shiftRow = this.activeRow;
+ if (this.activeRow == -1) {
+ this.shiftRow = rowIndex;
+ } else {
+ this.shiftRow = this.activeRow;
+ }
}
- this.startRow = this.shiftRow;
+ if (this.shiftRow == "-") {
+ this.selectionFlag = "u";
+ this.startRow = this.firstIndex;
+ } else if (this.shiftRow == "+") {
+ this.selectionFlag = "d";
+ this.startRow = this.firstIndex ? this.firstIndex - 1 : this.rowCount - 1;
+ } else {
+ this.selectionFlag = "x";
+ this.startRow = this.shiftRow;
+ }
if (((this.startRow <= rowIndex) && (this.firstIndex <= this.startRow || rowIndex < this.firstIndex))
- || (this.startRow > rowIndex && this.firstIndex < this.startRow && rowIndex < this.firstIndex)) {
+ || (this.startRow > rowIndex && this.firstIndex <= this.startRow && rowIndex < this.firstIndex)) {
this.endRow = rowIndex;
} else {
this.endRow = this.startRow;
@@ -444,7 +466,8 @@
},
selectionChanged: function(event) {
- $(this.inputElement).value = this.selection.inspectRanges() + this.activeRow + ";" + (this.selectionFlag ? this.selectionFlag : "") ;
+ $(this.inputElement).value = this.selection.inspectRanges() + this.activeRow + "|"
+ + (this.shiftRow ? this.shiftRow : this.activeRow) + ";" + (this.selectionFlag ? this.selectionFlag : "") ;
var state = this.selection.getState();
event.oldSelection = this.oldState;
event.newSelection = state;
14 years, 8 months
JBoss Rich Faces SVN: r16817 - root/framework/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-04-27 08:16:15 -0400 (Tue, 27 Apr 2010)
New Revision: 16817
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
Log:
bugfix
Modified: root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-27 12:07:19 UTC (rev 16816)
+++ root/framework/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-04-27 12:16:15 UTC (rev 16817)
@@ -112,7 +112,8 @@
* @return {DOMElement}
* */
attachToDom: function(source) {
- var element = richfaces.getDomElement(source);
+ source = source || this.id;
+ var element = RichFaces.getDomElement(source);
if (element) {
element["richfaces"] = element["richfaces"] || {};
element.richfaces.component = this;
14 years, 8 months
JBoss Rich Faces SVN: r16816 - in root: cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-04-27 08:07:19 -0400 (Tue, 27 Apr 2010)
New Revision: 16816
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ProcessorBase.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/TagTemplateModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClientBehavior.java
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/taghandler.ftl
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java
root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/generate/java/GeneratedTagHandler.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAttachQueue.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandButton.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandLink.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractOutputPanel.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractQueue.java
Log:
RF-7826 Migrate A1 components to new CDK
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/AttributesProcessorImpl.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -68,6 +68,7 @@
if (attributeAnnotarion == null) {
attribute.setGenerate(!beanProperty.isExists());
attribute.setDescription(beanProperty.getDocComment());
+ attribute.setHidden(true);
if (attribute.getType().isPrimitive()) {
String value = getPimitiveDefaultValue(attribute.getType().getName());
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ProcessorBase.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ProcessorBase.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/apt/processors/ProcessorBase.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -25,6 +25,11 @@
public abstract class ProcessorBase {
+ private static final String COMPONENT_HANDLER_NAME = ComponentHandler.class.getName();
+ private static final String VALIDATOR_HANDLER_NAME = ValidatorHandler.class.getName();
+ private static final String CONVERTER_HANDLER_NAME = ConverterHandler.class.getName();
+ private static final String BEHAVIOR_HANDLER_NAME = BehaviorHandler.class.getName();
+
@Inject
private Provider<SourceUtils> sourceUtils;
@@ -66,16 +71,16 @@
}
if (model instanceof ComponentModel) {
- return ComponentHandler.class.getName();
+ return COMPONENT_HANDLER_NAME;
} else if (model instanceof ValidatorModel) {
- return ValidatorHandler.class.getName();
+ return VALIDATOR_HANDLER_NAME;
} else if (model instanceof ConverterModel) {
- return ConverterHandler.class.getName();
+ return CONVERTER_HANDLER_NAME;
} else if (model instanceof BehaviorModel) {
- return BehaviorHandler.class.getName();
+ return BEHAVIOR_HANDLER_NAME;
} else {
throw new IllegalStateException("Unknown model class.");
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/ModelElementBaseTemplateModel.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -70,6 +70,8 @@
public TemplateModel get(String key) throws TemplateModelException {
if ("attributes".equals(key)) {
return attributes();
+ } else if ("requiredAttributes".equals(key)) {
+ return requiredAttributes();
} else if ("generatedAttributes".equals(key)) {
return generatedAttributes();
} else if ("eventNames".equals(key)) {
@@ -82,7 +84,7 @@
return super.get(key);
}
-
+
public TemplateModel getImportClasses() throws TemplateModelException {
Set<String> result = new TreeSet<String>();
@@ -141,6 +143,18 @@
return eventNames;
}
+ private TemplateModel requiredAttributes() throws TemplateModelException {
+ Collection<PropertyBase> attributes = model.getAttributes();
+ Collection<PropertyModel> models = new ArrayList<PropertyModel>(attributes.size());
+ for (PropertyBase entry : attributes) {
+ if (entry.isGenerate() && entry.isRequired()) {
+ PropertyModel propertyModel = new PropertyModel(entry, wrapper);
+ models.add(propertyModel);
+ }
+ }
+ return wrapper.wrap(models);
+ }
+
private TemplateModel generatedAttributes() throws TemplateModelException {
Collection<PropertyBase> attributes = model.getAttributes();
Collection<PropertyModel> models = new ArrayList<PropertyModel>(attributes.size());
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/TagTemplateModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/TagTemplateModel.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/freemarker/TagTemplateModel.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -60,6 +60,8 @@
public TemplateModel get(String key) throws TemplateModelException {
if ("attributes".equals(key)) {
return attributes();
+ } else if ("requiredAttributes".equals(key)) {
+ return requiredAttributes();
} else if ("generatedAttributes".equals(key)) {
return generatedAttributes();
} else if ("eventNames".equals(key)) {
@@ -127,6 +129,18 @@
return eventNames;
}
+ private TemplateModel requiredAttributes() throws TemplateModelException {
+ Collection<PropertyBase> attributes = model.getModel().getAttributes();
+ Collection<PropertyModel> models = new ArrayList<PropertyModel>(attributes.size());
+ for (PropertyBase entry : attributes) {
+ if (entry.isGenerate() && entry.isRequired()) {
+ PropertyModel propertyModel = new PropertyModel(entry, wrapper);
+ models.add(propertyModel);
+ }
+ }
+ return wrapper.wrap(models);
+ }
+
private TemplateModel generatedAttributes() throws TemplateModelException {
Collection<PropertyBase> attributes = model.getModel().getAttributes();
Collection<PropertyModel> models = new ArrayList<PropertyModel>(attributes.size());
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -76,6 +76,8 @@
this.componentLibrary = model;
faceletTaglib = document.addElement("facelet-taglib", "http://java.sun.com/xml/ns/javaee");
+ faceletTaglib.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+ faceletTaglib.addAttribute("xsi:schemaLocation", "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd");
faceletTaglib.addAttribute("version", "2.0");
faceletTaglib.addAttribute("id", id); // TODO do it as param param
@@ -177,10 +179,10 @@
* */
private Element createAttributeElement(Element tag, String name, PropertyBase attribute) {
Element attr = tag.addElement("attribute");
- attr.addElement("name").addText(name);
if (attribute.getDescription() != null) {
attr.addElement("description").addText(attribute.getDescription());
}
+ attr.addElement("name").addText(name);
attr.addElement("type").addText(attribute.getType().toString());
return attr;
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClientBehavior.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClientBehavior.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/ClientBehavior.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -29,10 +29,8 @@
*/
public class ClientBehavior {
- @XmlAttribute
private String event;
- @XmlAttribute(name = "default")
private boolean defaultEvent;
/**
@@ -40,6 +38,7 @@
*
* @return the event
*/
+ @XmlAttribute
public String getEvent() {
return event;
}
@@ -58,6 +57,7 @@
*
* @return the default
*/
+ @XmlAttribute(name = "default")
public boolean isDefaultEvent() {
return defaultEvent;
}
@@ -65,7 +65,7 @@
/**
* <p class="changed_added_4_0"></p>
*
- * @param default the default to set
+ * @param defaultEvent the default to set
*/
public void setDefaultEvent(boolean defaultEvent) {
this.defaultEvent = defaultEvent;
Modified: root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/taghandler.ftl
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/taghandler.ftl 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/taghandler.ftl 2010-04-27 12:07:19 UTC (rev 16816)
@@ -15,6 +15,9 @@
public ${targetClass.simpleName}(${objectType}Config config) {
super(config);
+ <#list requiredAttributes as prop>getRequiredAttribute("${prop.name}");
+ </#list>
+
}
protected MetaRuleset createMetaRuleset(Class type) {
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/generate/java/ComponentClassGeneratorTest.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -100,6 +100,7 @@
attribute = component.getOrCreateAttribute("testFlag");
attribute.setType(new ClassName(Boolean.class));
+ attribute.setRequired(true);
attribute.setGenerate(true);
attribute = component.getOrCreateAttribute("testBinding");
Modified: root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/generate/java/GeneratedTagHandler.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/generate/java/GeneratedTagHandler.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/cdk/trunk/plugins/generator/src/test/resources/org/richfaces/cdk/generate/java/GeneratedTagHandler.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -34,6 +34,8 @@
public GeneratedTagHandler(ComponentConfig config) {
super(config);
+ getRequiredAttribute("testFlag");
+
}
protected MetaRuleset createMetaRuleset(Class type) {
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAjaxFunction.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -44,15 +44,21 @@
public static final String COMPONENT_TYPE = "org.richfaces.Function";
+ public static final String HELLO = "Hello, World!!!";
+
+ @Attribute
public abstract boolean isLimitRender();
@Attribute(required = true)
public abstract String getName();
+ @Attribute
public abstract Object getExecute();
+ @Attribute
public abstract Object getRender();
+ @Attribute
public abstract String getStatus();
@Attribute(events = @EventName("begin"))
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAttachQueue.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAttachQueue.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractAttachQueue.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -26,6 +26,7 @@
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.cdk.annotations.Attribute;
/**
* @author Nick Belaevski
@@ -40,16 +41,22 @@
public static final String COMPONENT_TYPE = "org.richfaces.AttachQueue";
+ @Attribute
public abstract String getRequestSimilarityId();
+ @Attribute
public abstract int getRequestDelay();
+ @Attribute
public abstract int getTimeout();
+ @Attribute
public abstract boolean isIgnoreDupresponses();
+ @Attribute
public abstract String getOnrequestqueue();
+ @Attribute
public abstract String getOnrequestdequeue();
@Override
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandButton.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandButton.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandButton.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -76,5 +76,6 @@
@Attribute(defaultValue = "")
public abstract String getStyleClass();
+ @Attribute
public abstract boolean isLimitRender();
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandLink.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandLink.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractCommandLink.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -74,5 +74,6 @@
@Attribute(defaultValue = "")
public abstract String getStyleClass();
+ @Attribute
public abstract boolean isLimitRender();
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -59,27 +59,17 @@
* Get URI attribute for resource ( src for images, href for links etc ).
* @return
*/
+ @Attribute
public abstract String getUriAttribute();
/**
- * Set URI attribute for resource ( src for images, href for links etc ).
- * @param newvalue
- */
- public abstract void setUriAttribute(String newvalue);
-
- /**
* Get Element name for rendering ( imj , a , object, applet ).
* @return
*/
+ @Attribute
public abstract String getElement();
/**
- * Set Element name for rendering ( imj , a , object, applet ).
- * @param newvalue
- */
- public abstract void setElement(String newvalue);
-
- /**
* Get EL binding to method in user bean to send resource. Method will
* called with two parameters - restored data object and servlet output
* stream.
@@ -137,70 +127,99 @@
return resource;
}
+ @Attribute
public abstract String getAccesskey();
+ @Attribute
public abstract String getAlign();
+ @Attribute
public abstract String getArchive();
+ @Attribute
public abstract String getBorder();
+ @Attribute
public abstract boolean isCacheable();
+ @Attribute
public abstract String getCharset();
+ @Attribute
public abstract String getClassid();
+ @Attribute
public abstract String getCodebase();
+ @Attribute
public abstract String getCodetype();
+ @Attribute
public abstract String getCoords();
- public abstract void setCoords(String coords);
-
public abstract MethodExpression getCreateContentExpression();
+ @Attribute
public abstract String getDeclare();
+ @Attribute
public abstract String getDir();
+ @Attribute
public abstract Date getExpires();
+ @Attribute
public abstract String getHreflang();
+ @Attribute
public abstract String getHspace();
+ @Attribute
public abstract boolean isIsmap();
+ @Attribute
public abstract String getLang();
+ @Attribute
public abstract Date getLastModified();
+ @Attribute
public abstract String getMimeType();
+ @Attribute
public abstract String getRel();
+ @Attribute
public abstract String getRev();
+ @Attribute
public abstract String getShape();
+ @Attribute
public abstract String getStandby();
+ @Attribute
public abstract String getStyle();
+ @Attribute
public abstract String getStyleClass();
+ @Attribute
public abstract String getTabindex();
+ @Attribute
public abstract String getTarget();
+ @Attribute
public abstract String getTitle();
+ @Attribute
public abstract String getType();
+ @Attribute
public abstract String getUsemap();
+ @Attribute
public abstract String getVspace();
@Attribute(events = @EventName("blur"))
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractOutputPanel.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractOutputPanel.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractOutputPanel.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -42,8 +42,10 @@
public static final String COMPONENT_FAMILY = "javax.faces.Panel";
+ @Attribute
public abstract boolean isAjaxRendered();
+ @Attribute
public abstract boolean isKeepTransient();
@Attribute(defaultValue = "inline")
@@ -79,13 +81,18 @@
@Attribute(events = @EventName("mouseup"))
public abstract String getOnmouseup();
+ @Attribute
public abstract String getStyle();
+ @Attribute
public abstract String getStyleClass();
+ @Attribute
public abstract String getTitle();
+ @Attribute
public abstract String getDir();
+ @Attribute
public abstract String getLang();
}
Modified: root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractQueue.java
===================================================================
--- root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractQueue.java 2010-04-26 23:29:05 UTC (rev 16815)
+++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/AbstractQueue.java 2010-04-27 12:07:19 UTC (rev 16816)
@@ -22,6 +22,7 @@
package org.richfaces.component;
import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.Attribute;
import javax.faces.component.UIComponentBase;
@@ -38,21 +39,30 @@
public static final String COMPONENT_FAMILY = "org.richfaces.Queue";
+ @Attribute
public abstract int getRequestDelay();
+ @Attribute
public abstract String getStatus();
+ @Attribute
public abstract String getOnsubmit();
+ @Attribute
public abstract String getOncomplete();
+ @Attribute
public abstract String getOnbeforedomupdate();
+ @Attribute
public abstract String getOnerror();
+ @Attribute
public abstract String getOnevent();
+ @Attribute
public abstract String getOnrequestqueue();
+ @Attribute
public abstract String getOnrequestdequeue();
}
14 years, 8 months
JBoss Rich Faces SVN: r16815 - root/cdk/trunk/bom.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-04-26 19:29:05 -0400 (Mon, 26 Apr 2010)
New Revision: 16815
Modified:
root/cdk/trunk/bom/pom.xml
Log:
fix dependencies version
Modified: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml 2010-04-26 23:16:09 UTC (rev 16814)
+++ root/cdk/trunk/bom/pom.xml 2010-04-26 23:29:05 UTC (rev 16815)
@@ -155,6 +155,7 @@
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.5.2</version>
+ <scope>test</scope>
</dependency>
<!-- Maven -->
<dependency>
14 years, 8 months