JBoss Rich Faces SVN: r14663 - in branches/community/3.3.X: cdk/generator/src/main/resources/META-INF/templates12 and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-06-19 15:17:57 -0400 (Fri, 19 Jun 2009)
New Revision: 14663
Modified:
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
Modified: branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
===================================================================
--- branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2009-06-19 17:56:05 UTC (rev 14662)
+++ branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2009-06-19 19:17:57 UTC (rev 14663)
@@ -4,15 +4,14 @@
<taglib>
<tlib-version>${taglib.tlibversion}</tlib-version>
<jsp-version>${taglib.jspversion}</jsp-version>
+#if(${taglib.description})
+ <description>${taglib.description}</description>
+#end
#if(${taglib.shortname})
<short-name>${taglib.shortname}</short-name>
#end
<uri>${taglib.uri}</uri>
-#if(${taglib.description})
- <description>${taglib.description}</description>
-#end
${taglib.includeContent}
-
#foreach( $component in ${components})
#if($component.tag)
<tag>
Modified: branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
===================================================================
--- branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2009-06-19 17:56:05 UTC (rev 14662)
+++ branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2009-06-19 19:17:57 UTC (rev 14663)
@@ -76,13 +76,14 @@
version="${taglib.jspversion}">
<tlib-version>${taglib.tlibversion}</tlib-version>
## <jsp-version>${taglib.jspversion}</jsp-version>
+#if(${taglib.description})
+ <description>${taglib.description}</description>
+#end
+
#if(${taglib.shortname})
<short-name>${taglib.shortname}</short-name>
#end
<uri>${taglib.uri}</uri>
-#if(${taglib.description})
- <description>${taglib.description}</description>
-#end
${taglib.includeContent}
Modified: branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
--- branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-06-19 17:56:05 UTC (rev 14662)
+++ branches/community/3.3.X/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-06-19 19:17:57 UTC (rev 14663)
@@ -174,7 +174,8 @@
StringBuilder format = new StringBuilder(
".rich-page{margin:auto;text-align:left;");
format.append("width:").append(nonIeWidth).append("em;");
- format.append("*width:").append(ieWidth).append("em;}\n");
+ format.append("*width:").append(ieWidth).append("em;\n");
+ format.append("}\n");
writer.write(format.toString());
} else {
writer.write(".rich-page{margin:auto 10px;width:auto;}\n");
Modified: branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2009-06-19 17:56:05 UTC (rev 14662)
+++ branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2009-06-19 19:17:57 UTC (rev 14663)
@@ -480,14 +480,21 @@
var horizontalDirection = match[2];
var verticalDirection = match[1];
- var coords = this.fitToolTip(e.clientX, e.clientY, elementDim, horizontalDirection, verticalDirection,
+ var clientX = isNaN(e.clientX) ? Element.cumulativeOffset(this.parent).left + this.toolTip.horizontalOffset : e.clientX;
+ var clientY = isNaN(e.clientY) ? Element.cumulativeOffset(this.parent).top + this.toolTip.verticalOffset : e.clientY;
+ var coords = this.fitToolTip(clientX, clientY, elementDim, horizontalDirection, verticalDirection,
{'x':this.horizontalOffset, 'y':this.verticalOffset});
var offsets = jQuery(this.toolTip).offset();
-
- var x = coords.x - offsets.left + (event.pageX - event.clientX) + oldLeft;
- var y = coords.y - offsets.top + (event.pageY - event.clientY) + oldTop;
-
+ var x;
+ var y;
+ if(isNaN(event.clientX)){
+ x = coords.x - offsets.left + oldLeft + this.toolTip.horizontalOffset;
+ y = coords.y - offsets.top + oldTop + this.toolTip.verticalOffset;
+ }else{
+ x = coords.x - offsets.left + (event.pageX - event.clientX) + oldLeft;
+ y = coords.y - offsets.top + (event.pageY - event.clientY) + oldTop;
+ }
Element.setStyle(this.toolTip, {"left": x + "px", "top": y + "px"});
if(this.iframe)
{
15 years, 8 months
JBoss Rich Faces SVN: r14662 - in branches/community/3.3.X/ui: inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-06-19 13:56:05 -0400 (Fri, 19 Jun 2009)
New Revision: 14662
Modified:
branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
small fix
Modified: branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-06-19 11:55:50 UTC (rev 14661)
+++ branches/community/3.3.X/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2009-06-19 17:56:05 UTC (rev 14662)
@@ -426,6 +426,9 @@
acceptedTypes: {"*" : true},
initialize: function(id, actionUrl, stopScript, getFileSizeScript, progressBarId, sessionId, options) {
+ if(!options) {
+ options = {};
+ }
//default values of classes
this.classes = {
ADD : {
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-19 11:55:50 UTC (rev 14661)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-19 17:56:05 UTC (rev 14662)
@@ -9,6 +9,9 @@
Richfaces.InplaceInput.prototype = {
//TODO: remove $$$$$
initialize: function(clientId, options) {
+ if(!options) {
+ options = {};
+ }
this.inplaceInput = $(clientId);
this.inplaceInput.component = this;
15 years, 8 months
JBoss Rich Faces SVN: r14661 - in branches/community/3.3.X/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-06-19 07:55:50 -0400 (Fri, 19 Jun 2009)
New Revision: 14661
Modified:
branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
RF-7397
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-18 17:50:41 UTC (rev 14660)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-19 11:55:50 UTC (rev 14661)
@@ -15,6 +15,7 @@
this.tempValueKeeper = $(clientId + "tempValue");
this.valueKeeper = $(clientId + "value");
this.attributes = {
+ defaultLabel : "\u00a0\u00a0\u00a0",
editEvent : "onclick",
verticalPosition : "center",
horizontalPosition : "right",
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2009-06-18 17:50:41 UTC (rev 14660)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2009-06-19 11:55:50 UTC (rev 14661)
@@ -177,7 +177,7 @@
]]>
</jsp:scriptlet>
<c:scriptObject var="attributes">
- <c:scriptOption name="defaultLabel" value="#{this:getDefaultLabel(context, component)}" />
+ <c:scriptOption name="defaultLabel" value="#{this:getDefaultLabel(context, component)}" defaultValue="\u00a0\u00a0\u00a0" />
<c:scriptOption attributes="showControls, selectOnEdit, inputWidth" />
<c:scriptOption attributes="editEvent" defaultValue="onclick"/>
<c:scriptOption name="verticalPosition" value="#{component.attributes['controlsVerticalPosition']}" defaultValue="center" />
15 years, 8 months
JBoss Rich Faces SVN: r14660 - in branches/community/3.3.X/ui/inplaceInput/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-06-18 13:50:41 -0400 (Thu, 18 Jun 2009)
New Revision: 14660
Modified:
branches/community/3.3.X/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
RF-7397
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2009-06-18 12:02:43 UTC (rev 14659)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2009-06-18 17:50:41 UTC (rev 14660)
@@ -108,47 +108,14 @@
return false;
}
- public String encodeScriptAttributes(FacesContext context, UIComponent component) {
- StringBuilder attributes = new StringBuilder();
- attributes.append("var attributes = ");
-
- ScriptOptions options = new ScriptOptions(component);
-
+ public String getDefaultLabel(FacesContext context, UIComponent component) {
String defaultLabel = (String)component.getAttributes().get("defaultLabel");
-
if (defaultLabel == null || defaultLabel.trim().equals("")) {
- defaultLabel = EMPTY_DEFAULT_LABEL;
+ defaultLabel = EMPTY_DEFAULT_LABEL;
}
-
- options.addOption("defaultLabel", defaultLabel);
- options.addOption("showControls");
- options.addOption("editEvent");
- options.addOption("selectOnEdit");
- options.addOption("verticalPosition", component.getAttributes().get("controlsVerticalPosition"));
- options.addOption("horizontalPosition", component.getAttributes().get("controlsHorizontalPosition"));
- options.addOption("inputWidth");
- options.addOption("minInputWidth");
- options.addOption("maxInputWidth");
- attributes.append(options.toScript());
-
- return attributes.toString();
+ return defaultLabel;
}
-
- public String encodeScriptEvents(FacesContext context, UIComponent component) {
- StringBuilder events = new StringBuilder();
-
- events.append("var events = ");
- ScriptOptions options = new ScriptOptions(component);
- options.addEventHandler("oneditactivation");
- options.addEventHandler("onviewactivation");
- options.addEventHandler("oneditactivated");
- options.addEventHandler("onviewactivated");
- options.addEventHandler("onchange");
- events.append(options.toScript());
-
- return events.toString();
- }
-
+
public String getAsEventHandler(FacesContext context, UIComponent component, String attributeName) {
JSFunctionDefinition script = getUtils().getAsEventHandler(context, component, attributeName, null);
return ScriptUtils.toScript(script);
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-18 12:02:43 UTC (rev 14659)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-06-18 17:50:41 UTC (rev 14660)
@@ -8,15 +8,21 @@
Richfaces.InplaceInput.prototype = {
//TODO: remove $$$$$
- initialize: function(clientId, temValueKeepId, valueKeepId, tabberId, attributes, events, userStyles, commonStyles, barParams) {
- //TODO: delete tabberId from parameters
+ initialize: function(clientId, options) {
this.inplaceInput = $(clientId);
this.inplaceInput.component = this;
- this.tempValueKeeper = $(temValueKeepId);
- this.valueKeeper = $(valueKeepId);
- this.attributes = attributes;
- this.events = events;
+ this.tempValueKeeper = $(clientId + "tempValue");
+ this.valueKeeper = $(clientId + "value");
+ this.attributes = {
+ editEvent : "onclick",
+ verticalPosition : "center",
+ horizontalPosition : "right",
+ minInputWidth : "40px",
+ maxInputWidth : "500px"
+ };
+ Object.extend(this.attributes, options.attributes);
+ this.events = options.events || {};
//TODO: static methods are preferred to be called within constructor
this.currentText = this.getCurrentText();
@@ -26,9 +32,7 @@
this.prevState = Richfaces.InplaceInput.STATES[0];
if (this.attributes.showControls) {
- //TODO: Consider passing attributes by name instead of by index
- this.bar = new Richfaces.InplaceInputBar(barParams[0], barParams[1], barParams[2], barParams[3], barParams[4],
- this.attributes.verticalPosition, this.attributes.horizontalPosition);
+ this.bar = new Richfaces.InplaceInputBar(clientId, this.attributes.verticalPosition, this.attributes.horizontalPosition);
}
//TODO: move converting 'on'-event to prototype style to utils
@@ -38,7 +42,7 @@
this.initHandlers();
this.initEvents();
- this.classes = Richfaces.mergeStyles(userStyles,commonStyles.getCommonStyles());
+ this.classes = Richfaces.mergeStyles(options.userStyles,new Richfaces.InplaceInputStyles().getCommonStyles());
this["rich:destructor"] = "destroy";
this.skipSwitching = false;
@@ -391,12 +395,12 @@
Richfaces.InplaceInputBar = Class.create();
Richfaces.InplaceInputBar.prototype = {
- initialize : function(barId, okId, cancelId, buttonsPanelId, buttonsShadowId, verticalPosition, horizontalPosition) {
- this.bar = $(barId);
- this.ok = $(okId);
- this.cancel = $(cancelId);
- this.bsPanel = $(buttonsPanelId);
- this.buttonsShadow = $(buttonsShadowId);
+ initialize : function(id, verticalPosition, horizontalPosition) {
+ this.bar = $(id + "bar");
+ this.ok = $(id + "ok");
+ this.cancel = $(id + "cancel");
+ this.bsPanel = $(id + "buttons");
+ this.buttonsShadow = $(id + "btns_shadow");
this.verticalPosition = verticalPosition;
this.horizontalPosition = horizontalPosition;
Modified: branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2009-06-18 12:02:43 UTC (rev 14659)
+++ branches/community/3.3.X/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2009-06-18 17:50:41 UTC (rev 14660)
@@ -64,19 +64,19 @@
String styleClass = (String)component.getAttributes().get("styleClass");
styleClass = styleClass != null ? styleClass.trim() : "";
- variables.setVariable("styleClass", styleClass);
+ variables.setVariable("styleClass", styleClass.trim());
String changedClass = (String)component.getAttributes().get("changedClass");
changedClass = (changedClass != null ? changedClass.trim() : "") + " " + styleClass;
- variables.setVariable("changedClass", changedClass);
+ variables.setVariable("changedClass", changedClass.trim());
String viewClass = (String)component.getAttributes().get("viewClass");
viewClass = (viewClass != null ? viewClass.trim() : "") + " " + styleClass;
- variables.setVariable("viewClass", viewClass);
+ variables.setVariable("viewClass", viewClass.trim());
String editClass = (String)component.getAttributes().get("editClass");
editClass = (editClass != null ? editClass.trim() : "") + " " + styleClass;
- variables.setVariable("editClass", editClass);
+ variables.setVariable("editClass", editClass.trim());
String layout = (String)component.getAttributes().get("layout");
if (layout != null && layout.length() != 0) {
@@ -176,29 +176,43 @@
}
]]>
</jsp:scriptlet>
+ <c:scriptObject var="attributes">
+ <c:scriptOption name="defaultLabel" value="#{this:getDefaultLabel(context, component)}" />
+ <c:scriptOption attributes="showControls, selectOnEdit, inputWidth" />
+ <c:scriptOption attributes="editEvent" defaultValue="onclick"/>
+ <c:scriptOption name="verticalPosition" value="#{component.attributes['controlsVerticalPosition']}" defaultValue="center" />
+ <c:scriptOption name="horizontalPosition" value="#{component.attributes['controlsHorizontalPosition']}" defaultValue="right" />
+ <c:scriptOption attributes="minInputWidth" defaultValue="40px"/>
+ <c:scriptOption attributes="maxInputWidth" defaultValue="500px"/>
+ </c:scriptObject>
+ <c:scriptObject var="events">
+ <c:scriptOption attributes="oneditactivation, onviewactivation, oneditactivated, onviewactivated, onchange" wrapper="eventHandler" />
+ </c:scriptObject>
+ <c:scriptObject var="view">
+ <c:scriptOption name="normal" value="#{viewClass}" />
+ <c:scriptOption name="hovered" value="#{component.attributes['viewHoverClass']}" />
+ </c:scriptObject>
+ <c:scriptObject var="changed">
+ <c:scriptOption name="normal" value="#{changedClass}" />
+ <c:scriptOption name="hovered" value="#{component.attributes['changedHoverClass']}" />
+ </c:scriptObject>
+ <c:scriptObject var="componentStyles">
+ <c:scriptOption variables="view, changed" />
+ <c:scriptOption name="editable" value="#{editClass}" />
+ </c:scriptObject>
+ <c:scriptObject var="userStyles">
+ <c:scriptOption name="component" value="#{componentStyles}" />
+ </c:scriptObject>
+ <c:scriptObject var="options">
+ <c:scriptOption variables="attributes, events, userStyles" />
+ </c:scriptObject>
<script type="text/javascript">
- #{this:encodeScriptAttributes(context, component)};
- #{this:encodeScriptEvents(context, component)};
-
- var inplaceInputUserStyles = {
- component:{
- view :{
- normal:'#{viewClass}',
- hovered:'#{component.attributes["viewHoverClass"]}'
- },
- changed:{
- normal:'#{changedClass}',
- hovered:'#{component.attributes["changedHoverClass"]}'
- },
- editable:'#{editClass}'
-
- }
- };
-
- var inplaceInput = new Richfaces.InplaceInput('#{clientId}', '#{clientId}tempValue', '#{clientId}value', '#{clientId}tabber',
- attributes, events, inplaceInputUserStyles, new Richfaces.InplaceInputStyles(), ['#{clientId}bar',
- '#{clientId}ok', '#{clientId}cancel', '#{clientId}buttons','#{clientId}btns_shadow']);
+ var inplaceInput = new Richfaces.InplaceInput('#{clientId}'
+ <c:if test="#{not empty options}">
+ , <f:writeAsScript value="#{options}" />
+ </c:if>
+ );
</script>
</div>
15 years, 9 months
JBoss Rich Faces SVN: r14659 - branches/community/3.3.X/samples/scrollableDataTableDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 08:02:43 -0400 (Thu, 18 Jun 2009)
New Revision: 14659
Modified:
branches/community/3.3.X/samples/scrollableDataTableDemo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
scrollableDataTable: style attribute is not encoded into html rendered
https://jira.jboss.org/jira/browse/RF-4977
Modified: branches/community/3.3.X/samples/scrollableDataTableDemo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
--- branches/community/3.3.X/samples/scrollableDataTableDemo/src/main/webapp/pages/scrollable-grid.xhtml 2009-06-18 12:02:13 UTC (rev 14658)
+++ branches/community/3.3.X/samples/scrollableDataTableDemo/src/main/webapp/pages/scrollable-grid.xhtml 2009-06-18 12:02:43 UTC (rev 14659)
@@ -58,6 +58,7 @@
first="0"
rows="40"
width="800px"
+ style="color:green;"
columnClasses="col"
height="500px" hideWhenScrolling="false">
15 years, 9 months
JBoss Rich Faces SVN: r14658 - in branches/community/3.3.X/ui/scrollableDataTable/src: test/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 08:02:13 -0400 (Thu, 18 Jun 2009)
New Revision: 14658
Modified:
branches/community/3.3.X/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
branches/community/3.3.X/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
Log:
scrollableDataTable: style attribute is not encoded into html rendered
https://jira.jboss.org/jira/browse/RF-4977
Modified: branches/community/3.3.X/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
--- branches/community/3.3.X/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2009-06-18 10:57:47 UTC (rev 14657)
+++ branches/community/3.3.X/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2009-06-18 12:02:13 UTC (rev 14658)
@@ -67,7 +67,7 @@
]]>
</jsp:scriptlet>
- <table id="#{clientId}" cellpadding="0" cellspacing="0" style="width: #{component.attributes['width']};height: #{component.attributes['height']};" class="rich-sdt #{component.attributes['styleClass']}" >
+ <table id="#{clientId}" cellpadding="0" cellspacing="0" style="width: #{component.attributes['width']}; height: #{component.attributes['height']}; #{component.attributes['style']}" class="rich-sdt #{component.attributes['styleClass']}">
<tbody>
<jsp:scriptlet>
<![CDATA[
Modified: branches/community/3.3.X/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java
===================================================================
--- branches/community/3.3.X/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2009-06-18 10:57:47 UTC (rev 14657)
+++ branches/community/3.3.X/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableRendererTest.java 2009-06-18 12:02:13 UTC (rev 14658)
@@ -45,9 +45,11 @@
*/
public class ScrollableDataTableRendererTest extends AbstractAjax4JsfTestCase{
- UIScrollableDataTable grid;
+ private static final String STYLE = "color:green;";
+ private static final String MY_CLASS = "myClass";
+ UIScrollableDataTable grid;
int columns = 7;
- private static Set javaScripts = new HashSet();
+ private static Set<String> javaScripts = new HashSet<String>();
private static final boolean IS_PAGE_AVAILABILITY_CHECK = true;
static {
@@ -70,6 +72,8 @@
grid = (UIScrollableDataTable)application.createComponent("org.richfaces.component.ScrollableDataTable");
grid.setId("grid");
grid.getAttributes().put("frozenColCount", new Integer(3));
+ grid.getAttributes().put("style", STYLE);
+ grid.getAttributes().put("styleClass", MY_CLASS);
// add columns
for (int i = 0; i < columns; i++) {
@@ -120,46 +124,36 @@
assertEquals(getCountValidScripts(page, javaScripts, IS_PAGE_AVAILABILITY_CHECK).intValue(), javaScripts.size());
}
- static final Set tagNames = new HashSet();
+ static final Set<String> tagNames = new HashSet<String>();
static final String [] names = {"input","div","script", "table", "tbody", "tr", "td", "thead", "tfoot", "th"};
static {
Collections.addAll(tagNames, names);
}
public void testRenderingFrozenNormalColumns()throws Exception{
-
HtmlPage page = renderView();
assertNotNull(page);
+ HtmlElement table = page.getHtmlElementById(grid.getClientId(facesContext));
+ assertNotNull(table);
+ assertEquals("table", table.getNodeName());
- HtmlElement div = page.getHtmlElementById(grid.getClientId(facesContext));
- assertNotNull(div);
- assertEquals("table", div.getNodeName());
-
- String classAttr = div.getAttributeValue("class");
+ String id = grid.getId();
+ assertNotNull(page.getHtmlElementById(id + "_hc"));
+ assertNotNull(page.getHtmlElementById(id + "_state_input"));
+ assertNotNull(page.getHtmlElementById(id + "_options_input"));
+ assertNotNull(page.getHtmlElementById(id + "_rows_input"));
+ assertNotNull(page.getHtmlElementById(id + "_submit_input"));
+
+ String classAttr = table.getAttributeValue("class");
assertTrue(classAttr.contains("rich-sdt"));
- Iterator childIter= div.getChildElementsIterator();
-
- String id = grid.getId();
-
- HtmlElement input = page.getHtmlElementById(id+"_hc");
- assertNotNull(input);
- input = null;
- input = page.getHtmlElementById(id + "_state_input");
- assertNotNull(input);
- input = null;
- input = page.getHtmlElementById(id + "_options_input");
- assertNotNull(input);
- input = null;
- input = page.getHtmlElementById(id + "_rows_input");
- assertNotNull(input);
- input = null;
- input = page.getHtmlElementById(id + "_submit_input");
- assertNotNull(input);
- input = null;
+ assertTrue(classAttr.contains(MY_CLASS));
+
+ String style = table.getAttributeValue("style");
+ assertTrue(style.contains(STYLE));
- for (; childIter.hasNext();) {
-
+ Iterator<?> childIter= table.getChildElementsIterator();
+ while (childIter.hasNext()) {
HtmlElement elem = (HtmlElement) childIter.next();
assertNotNull(elem);
@@ -182,7 +176,7 @@
boolean templates = elem.getId().equals(grid.getId()+ "_GridBodyTemplate") || elem.getId().equals(grid.getId()+ "_GridFooterTemplate") || elem.getId().equals(grid.getId()+ "_GridHeaderTemplate");
assertTrue(templates);
- Iterator divIter = elem.getChildElementsIterator();
+ Iterator<?> divIter = elem.getChildElementsIterator();
HtmlElement inDiv = (HtmlElement) divIter.next();
assertNotNull(inDiv);
boolean test = false;
@@ -194,7 +188,7 @@
assertTrue(test);
- Iterator spanIter = inDiv.getChildElementsIterator();
+ Iterator<?> spanIter = inDiv.getChildElementsIterator();
for (;spanIter.hasNext();) {
15 years, 9 months
JBoss Rich Faces SVN: r14657 - branches/community/3.3.X/samples/extendedDataTable-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 06:57:47 -0400 (Thu, 18 Jun 2009)
New Revision: 14657
Added:
branches/community/3.3.X/samples/extendedDataTable-sample/src/main/webapp/pages/RF-5310.xhtml
Log:
extendedDataTable: selectionMode="single" doesn't work.
https://jira.jboss.org/jira/browse/RF-5310
Added: branches/community/3.3.X/samples/extendedDataTable-sample/src/main/webapp/pages/RF-5310.xhtml
===================================================================
--- branches/community/3.3.X/samples/extendedDataTable-sample/src/main/webapp/pages/RF-5310.xhtml (rev 0)
+++ branches/community/3.3.X/samples/extendedDataTable-sample/src/main/webapp/pages/RF-5310.xhtml 2009-06-18 10:57:47 UTC (rev 14657)
@@ -0,0 +1,48 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:extdt="http://labs.jboss.com/jbossrichfaces/ui/extendedDataTable"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+ <h:form id="productionsForm">
+
+ <rich:extendedDataTable id="productionsTable"
+ value="#{extendedDataTableBean.dataModel}"
+ var="patient"
+ rows="10"
+
+ width="#{extendedDataTableControlBean.width}"
+ height="#{extendedDataTableControlBean.height}"
+ selection="#{extendedDataTableBean.selection}"
+
+ onRowMouseOver="this.style.backgroundColor='#{a4jSkin.additionalBackgroundColor}'"
+ onRowMouseOut="this.style.backgroundColor=''"
+ selectionMode="single"
+
+ selectedClass="rich-sdt-row-selected"
+ rowClasses="rvgRowOne,rvgRowTwo">
+
+ <rich:column width="150px" id="col1">
+ <f:facet name="header">First</f:facet>
+
+ <h:outputText value="#{patient.lastName}" />
+ </rich:column>
+
+ <rich:column width="150px" id="col2">
+ <f:facet name="header">Second</f:facet>
+
+ <h:outputText id="text" value="#{patient.firstName}" />
+ </rich:column>
+ </rich:extendedDataTable>
+ </h:form>
+</f:view>
+</body>
+</html>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r14656 - branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 06:57:14 -0400 (Thu, 18 Jun 2009)
New Revision: 14656
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
Log:
extendedDataTable: selectionMode="single" doesn't work.
https://jira.jboss.org/jira/browse/RF-5310
Modified: branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2009-06-18 10:24:25 UTC (rev 14655)
+++ branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2009-06-18 10:57:14 UTC (rev 14656)
@@ -492,7 +492,8 @@
}
break;
case 65: case 97: // Ctrl-A
- if (this.inFocus && event.ctrlKey && !event.altKey) {
+ if (this.inFocus && event.ctrlKey && !event.altKey
+ && this.options.selectionMode == "multi") {
this.selectionFlag = "a";
for (var i = 0; i < this.rowCount; i++) {
this.addRowToSelection(i);
15 years, 9 months
JBoss Rich Faces SVN: r14655 - in branches/community/3.3.X/samples/tabPanelDemo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 06:24:25 -0400 (Thu, 18 Jun 2009)
New Revision: 14655
Added:
branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java
branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp
Modified:
branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml
Log:
TabPanel: value evaluated at phase1
https://jira.jboss.org/jira/browse/RF-7353
Added: branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java (rev 0)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/java/org/richfaces/PersonBean.java 2009-06-18 10:24:25 UTC (rev 14655)
@@ -0,0 +1,52 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * 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;
+
+
+/**
+ * @author Alex.Kolonitsky
+ *
+ */
+public class PersonBean {
+ private String firstName;
+ private String secondName;
+ private String selectedTab;
+
+ public String getFirstName() {
+ return firstName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ public String getSecondName() {
+ return secondName;
+ }
+ public void setSecondName(String secondName) {
+ this.secondName = secondName;
+ }
+ public String getSelectedTab() {
+ return selectedTab;
+ }
+ public void setSelectedTab(String selectedTab) {
+ this.selectedTab = selectedTab;
+ }
+}
\ No newline at end of file
Modified: branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml 2009-06-18 10:19:43 UTC (rev 14654)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/WEB-INF/faces-config.xml 2009-06-18 10:24:25 UTC (rev 14655)
@@ -2,12 +2,17 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>org.richfaces.Bean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
<managed-bean>
+ <managed-bean-name>personBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.PersonBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>skinBean</managed-bean-name>
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Added: branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp
===================================================================
--- branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp (rev 0)
+++ branches/community/3.3.X/samples/tabPanelDemo/src/main/webapp/pages/RF-7353.jsp 2009-06-18 10:24:25 UTC (rev 14655)
@@ -0,0 +1,38 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/tabPanel" prefix="tabs"%>
+
+<html>
+<head>
+<title></title>
+<style type="text/css">
+</style>
+</head>
+<body bgcolor="white">
+<f:view>
+ <h:form id="formID">
+ <a4j:keepAlive beanName="personBean" />
+
+ <a4j:form>
+ <tabs:tabPanel switchType="ajax" selectedTab="#{personBean.selectedTab}">
+ <tabs:tab id="tab1" label="firstname">
+ <a4j:region>
+ <h:inputText value="#{personBean.firstName}" />
+ </a4j:region>
+ </tabs:tab>
+ <tabs:tab id="tab2" label="lastname">
+ <a4j:region>
+ <h:inputText value="#{personBean.secondName}" />
+ </a4j:region>
+ </tabs:tab>
+ </tabs:tabPanel>
+ </a4j:form>
+ <br />
+ <a4j:status startText="Work" stopText="Stop"></a4j:status>
+ </h:form>
+</f:view>
+</body>
+</html>
15 years, 9 months
JBoss Rich Faces SVN: r14654 - branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-06-18 06:19:43 -0400 (Thu, 18 Jun 2009)
New Revision: 14654
Modified:
branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
Log:
TabPanel: value evaluated at phase1
https://jira.jboss.org/jira/browse/RF-7353
Modified: branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
===================================================================
--- branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2009-06-17 17:02:20 UTC (rev 14653)
+++ branches/community/3.3.X/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2009-06-18 10:19:43 UTC (rev 14654)
@@ -52,7 +52,7 @@
protected Iterator getSwitchedFacetsAndChildren() {
- final Object renderedValue = getRenderedValue();
+ final Object renderedValue = this.restoredRenderedValue;
return new IteratorChain(new FilterIterator(getRenderedTabs(), new Predicate() {
@@ -138,21 +138,21 @@
private transient Object restoredRenderedValue;
public void processDecodes(FacesContext context) {
- if (context == null) {
- throw new NullPointerException("FacesContext is null!");
- }
-
- if (!isRendered()) {
- return ;
- }
-
- //RF-1047 - retry to obtain restoredRenderedValue. Seam conversations are absent on 1st phase thus
- //value is absent also
- if (restoredRenderedValue == null) {
- this.restoredRenderedValue = getRenderedValue();
- }
-
- super.processDecodes(context);
+ if (context == null) {
+ throw new NullPointerException("FacesContext is null!");
+ }
+
+ if (!isRendered()) {
+ return ;
+ }
+
+ //RF-1047 - retry to obtain restoredRenderedValue. Seam conversations are absent on 1st phase thus
+ //value is absent also
+ if (restoredRenderedValue == null) {
+ this.restoredRenderedValue = getRenderedValue();
+ }
+
+ super.processDecodes(context);
}
public Object saveState(FacesContext context) {
15 years, 9 months