JBoss Rich Faces SVN: r6358 - in trunk/sandbox/ui/fileUpload/src: test/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-02-26 14:08:23 -0500 (Tue, 26 Feb 2008)
New Revision: 6358
Modified:
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
trunk/sandbox/ui/fileUpload/src/test/java/org/richfaces/component/FileUploadComponentTest.java
Log:
added some FUC's properties and tests for them
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-26 18:54:45 UTC (rev 6357)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-26 19:08:23 UTC (rev 6358)
@@ -145,10 +145,14 @@
this.localInputStream = localInputStream;
}
- public abstract void setAccept(String accept);
+ public abstract void setAcceptedTypes(String acceptedTypes);
- public abstract String getAccept();
+ public abstract String getAcceptedTypes();
+ public abstract Integer getMaxFilesQuantity();
+
+ public abstract void setMaxFilesQuantity(Integer maxFilesQuantity);
+
public abstract String getStyleClass();
public abstract String getStyle();
Modified: trunk/sandbox/ui/fileUpload/src/test/java/org/richfaces/component/FileUploadComponentTest.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/test/java/org/richfaces/component/FileUploadComponentTest.java 2008-02-26 18:54:45 UTC (rev 6357)
+++ trunk/sandbox/ui/fileUpload/src/test/java/org/richfaces/component/FileUploadComponentTest.java 2008-02-26 19:08:23 UTC (rev 6358)
@@ -64,7 +64,8 @@
form.setId("form");
facesContext.getViewRoot().getChildren().add(form);
fileUpload = (UIFileUpload) application.createComponent(UIFileUpload.COMPONENT_TYPE);
- fileUpload.setAccept("application/zip,image/jpeg,video/mpeg");
+ fileUpload.setAcceptedTypes("application/zip,image/jpeg,video/mpeg");
+ fileUpload.setMaxFilesQuantity(5);
Map<String, UIComponent> facets = fileUpload.getFacets();
UIProgressBar progressBar = (UIProgressBar) application.createComponent(UIProgressBar.COMPONENT_TYPE);
facets.put("progress", progressBar);
@@ -104,16 +105,31 @@
if (item.getFirstChild() != null) {
String scriptBodyString = item.getFirstChild().toString();
if (scriptBodyString.contains("new FileUpload")) {
-// assertTrue(scriptBodyString.contains("application/zip"));
-// assertTrue(scriptBodyString.contains("image/jpeg"));
-// assertTrue(scriptBodyString.contains("video/mpeg"));
-// assertFalse(scriptBodyString.contains("image/png"));
+ assertTrue(scriptBodyString.contains("application/zip"));
+ assertTrue(scriptBodyString.contains("image/jpeg"));
+ assertTrue(scriptBodyString.contains("video/mpeg"));
+ assertFalse(scriptBodyString.contains("image/png"));
assertTrue(scriptBodyString.contains("FileUpload.CLASSES"));
}
}
}
}
+ public void testButtonState() throws Exception {
+ String clientId = fileUpload.getClientId(facesContext);
+ String testScript = "<script type='text/javascript'> var fileUpload = $(" + clientId + ").component; var input = $(" + clientId + ":file);input.value = 'D:/TEST.txt';" +
+ "for( var i = 0; i <= 5; i++ ) { fileUpload.add(input); } </script>";
+ UIOutput testScriptOutput = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ testScriptOutput.setValue(testScript);
+ form.getChildren().add(testScriptOutput);
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ HtmlElement addButtonDiv = page.getHtmlElementById(clientId + ":add1");
+ assertNotNull(addButtonDiv);
+ //assertEquals("display: none", addButtonDiv.getAttributeValue("style"));
+ form.getChildren().remove(testScriptOutput);
+ }
+
/**
* @see AbstractAjax4JsfTestCase#tearDown()
*/
16 years, 10 months
JBoss Rich Faces SVN: r6357 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-02-26 13:54:45 -0500 (Tue, 26 Feb 2008)
New Revision: 6357
Modified:
trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
trunk/docs/userguide/en/src/main/resources/images/pickList2.png
trunk/docs/userguide/en/src/main/resources/images/pickListClass.png
trunk/docs/userguide/en/src/main/resources/images/pickListStyle.png
Log:
http://jira.jboss.com/jira/browse/RF-2174 Made changes in code samples and styleclasses screenshot.
Modified: trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-02-26 18:54:37 UTC (rev 6356)
+++ trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-02-26 18:54:45 UTC (rev 6357)
@@ -79,7 +79,7 @@
<para>The <emphasis role="bold">
<property><rich:pickList></property>
</emphasis> component consists of <itemizedlist>
- <listitem>2 <property>Item lists</property> and every item has three different representations: common, selected, active.
+ <listitem>2 <property>item lists</property>. Every item has three different representations: common, selected, active.
Combination of these states is possible.</listitem>
<listitem>
<property>Move controls set</property> is a set of controls, which performs moving items between lists.
@@ -93,8 +93,19 @@
The <emphasis>
<property> "value"</property>
</emphasis>
- attribute is used to access the values of a list.
+ attribute is used to access the values of a target list. The <emphasis>
+ <property> "selectItems"</property></emphasis> facet is used to access the values of a source list.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
</para>
+ <programlisting role="XML"><![CDATA[...
+<rich:pickList value="#{pickBean.listValues}">
+ <f:selectItem itemValue="Bentley" itemLabel="Bentley"/>
+ <f:selectItem itemValue="Audi" itemLabel="Audi"/>
+ <f:selectItems value="#{pickBean.testList}"/>
+</rich:pickList>
+ ...]]></programlisting>
<para>
The <emphasis role="bold">
<property><rich:pickList></property></emphasis>
@@ -751,7 +762,7 @@
</para>
<programlisting role="CSS"><![CDATA[...
.myClass{
- font-style:italic;
+ font-weight:bold;
}
...]]></programlisting>
<para>The <emphasis><property>"styleClass"</property></emphasis> attribute for <emphasis role="bold"
Modified: trunk/docs/userguide/en/src/main/resources/images/pickList2.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/pickListClass.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/pickListStyle.png
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6356 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-26 13:54:37 -0500 (Tue, 26 Feb 2008)
New Revision: 6356
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
latest changes
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 18:01:15 UTC (rev 6355)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 18:54:37 UTC (rev 6356)
@@ -17,13 +17,16 @@
},
switchingStatesHandler : function($super, e) {
- $super(e);
- this.tempValueKeeper.focus();
+ var el = (e.srcElement) ? e.srcElement : e.target;
+ if (el.id == this.inplaceInput.id) {
+ $super(e);
+ } else {
+ this.tempValueKeeper.focus();
+ }
},
tempKeeperClickHandler : function() {
this.comboList.isList = false;
- this.clickOnField = true;
this.comboList.showWithDelay();
},
@@ -90,6 +93,7 @@
var userValue = this.comboList.activeItem.innerHTML;
this.tempValueKeeper.value = userValue;
this.comboList.selectedItem = this.comboList.activeItem;
+ //this.clickOnField = false;
}
if (!this.comboList.isList || this.clickOnBar) {
$super();
@@ -108,11 +112,4 @@
},
setStrutWidth : function() {},
-
- switchingStatesHandler : function($super, e) {
- if (!this.clickOnField) {
- $super(e);
- }
- this.clickOnField = false;
- }
});
16 years, 10 months
JBoss Rich Faces SVN: r6355 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-26 13:01:15 -0500 (Tue, 26 Feb 2008)
New Revision: 6355
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 18:01:01 UTC (rev 6354)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 18:01:15 UTC (rev 6355)
@@ -23,6 +23,7 @@
tempKeeperClickHandler : function() {
this.comboList.isList = false;
+ this.clickOnField = true;
this.comboList.showWithDelay();
},
@@ -106,5 +107,12 @@
return this.inplaceInput.childNodes[6];
},
- setStrutWidth : function() {}
+ setStrutWidth : function() {},
+
+ switchingStatesHandler : function($super, e) {
+ if (!this.clickOnField) {
+ $super(e);
+ }
+ this.clickOnField = false;
+ }
});
16 years, 10 months
JBoss Rich Faces SVN: r6354 - trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-26 13:01:01 -0500 (Tue, 26 Feb 2008)
New Revision: 6354
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 17:27:52 UTC (rev 6353)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 18:01:01 UTC (rev 6354)
@@ -218,6 +218,9 @@
*/
setInputWidth : function(textSize) {
+ if (this.currentState != 1) {
+ return;
+ }
var width = parseInt(this.attributes.inputWidth);
if (!width) {
var max = parseInt(this.attributes.inputMaxWidth);
16 years, 10 months
JBoss Rich Faces SVN: r6353 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-02-26 12:27:52 -0500 (Tue, 26 Feb 2008)
New Revision: 6353
Modified:
trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
Log:
Parameters were added
http://jira.jboss.com/jira/browse/RF-1690
Modified: trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-02-26 17:09:22 UTC (rev 6352)
+++ trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-02-26 17:27:52 UTC (rev 6353)
@@ -68,10 +68,7 @@
HtmlColumns myColumns = new progressBar();
...]]></programlisting>
</section>
-
-
<!-- Start Details of Usage-->
-
<section>
<title>Details of Usage</title>
<para>
@@ -127,7 +124,19 @@
. . .
</rich:progressBar>
...]]> </programlisting>
- <para>
+
+ <para> The <emphasis><property>"parameters"</property></emphasis>attribute allows to send some
+ dynamical data to the component which is displayed in the informational part.
+ Parameters can be passed through <emphasis><property>"parameters"</property></emphasis> attribute, or from component control.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:progressBar ... progressVar="progress" parameters="param1:'1'" >
+ <h:outputText="{param1} task #{progress} %"/>
+</rich:progressBar>
+...]]> </programlisting>
+ <para>
The component can also employ the following facets to display the <property> "initial"</property> and <property> "complete"</property> states of the process:
</para>
<para>
@@ -173,7 +182,7 @@
<!-- JavaScript API-->
<section>
<title>JavaScript API</title>
- <table>
+ <table>
<title>JavaScript API</title>
<tgroup cols="2">
<thead>
16 years, 10 months
JBoss Rich Faces SVN: r6352 - trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-26 12:09:22 -0500 (Tue, 26 Feb 2008)
New Revision: 6352
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
strut width
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 17:09:19 UTC (rev 6351)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 17:09:22 UTC (rev 6352)
@@ -176,10 +176,8 @@
var inputSize = this.setInputWidth(textSize);
this.inplaceInput.className = this.classes.COMPONENT.EDITABLE;
+ this.setStrutWidth();
this.tempValueKeeper.show();
- this.strut.style.width = this.tempValueKeeper.offsetWidth + "px";
- this.strut.show();
- this.tempValueKeeper.show();
if (this.bar) {
this.bar.show(inputSize, this.tempValueKeeper.offsetHeight);
@@ -191,6 +189,12 @@
this.tempValueKeeper.focus();
},
+ setStrutWidth : function() {
+ this.tempValueKeeper.show();
+ this.strut.style.width = this.tempValueKeeper.offsetWidth + "px";
+ this.strut.show();
+ },
+
startViewState : function() {
this.changeState(Richfaces.InplaceInput.STATES[0]);
16 years, 10 months
JBoss Rich Faces SVN: r6351 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-26 12:09:19 -0500 (Tue, 26 Feb 2008)
New Revision: 6351
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
strut width
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 16:16:08 UTC (rev 6350)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-26 17:09:19 UTC (rev 6351)
@@ -104,5 +104,7 @@
getCurrentText : function() {
return this.inplaceInput.childNodes[6];
- }
+ },
+
+ setStrutWidth : function() {}
});
16 years, 10 months
JBoss Rich Faces SVN: r6350 - in trunk: ui/dataTable/src/main/java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-26 11:16:08 -0500 (Tue, 26 Feb 2008)
New Revision: 6350
Modified:
trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js
trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
Log:
Inplace inputs in headers with filter. Correct RETURN key handling added.
Modified: trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml 2008-02-26 13:50:20 UTC (rev 6349)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml 2008-02-26 16:16:08 UTC (rev 6350)
@@ -13,6 +13,10 @@
<context-param>
<param-name>org.richfaces.demo.MAX_ISSUES</param-name>
<param-value>1000</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
</context-param>
<!--
-->
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-26 13:50:20 UTC (rev 6349)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-26 16:16:08 UTC (rev 6350)
@@ -553,19 +553,23 @@
protected void addInplaceInput(FacesContext context, UIComponent column, StringBuffer buffer)
throws IOException {
UIInput filterValueInput = (UIInput)column.getFacet(FILTER_INPUT_FACET_NAME);
- String event = "onviewactivated";
+ boolean inplaceInput = true;
if (null == filterValueInput) {
try {
filterValueInput = (UIInput) context.getApplication().createComponent("org.richfaces.InplaceInput");
} catch (FacesException e) {
filterValueInput = (UIInput) context.getApplication().createComponent(UIInput.COMPONENT_TYPE);
- event = "onchange";
+ inplaceInput = false;
}
filterValueInput.setId(column.getId() + SORT_FILTER_PARAMETER);
filterValueInput.setImmediate(true);
column.getFacets().put(FILTER_INPUT_FACET_NAME, filterValueInput);
}
+ String event = inplaceInput ? "onviewactivated" : "onchange";
+ String onkeydownEvent = inplaceInput ? "oninputkeydown" : "onkeydown";
+
filterValueInput.getAttributes().put(event, buffer.toString());
+ filterValueInput.getAttributes().put(onkeydownEvent, "RichFaces.blurFilterInput(event);");
filterValueInput.setValue(column.getAttributes().get("filterValue"));
getUtils().encodeBeginFormIfNessesary(context, column);
Modified: trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js
===================================================================
--- trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js 2008-02-26 13:50:20 UTC (rev 6349)
+++ trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js 2008-02-26 16:16:08 UTC (rev 6350)
@@ -292,3 +292,9 @@
}
});
+RichFaces.blurFilterInput = function(event) {
+ if (event.keyCode == Event.KEY_RETURN && Event.element(event)) {
+ Event.element(event).blur();
+ return false;
+ }
+};
Modified: trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx
===================================================================
--- trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-26 13:50:20 UTC (rev 6349)
+++ trunk/ui/dataTable/src/main/templates/org/richfaces/htmlDataTable.jspx 2008-02-26 16:16:08 UTC (rev 6350)
@@ -16,7 +16,8 @@
<h:scripts>
new org.ajax4jsf.javascript.AjaxScript(),
new org.ajax4jsf.javascript.PrototypeScript(),
- /org/richfaces/renderkit/html/scripts/inplaceinput.js
+ /org/richfaces/renderkit/html/scripts/inplaceinput.js,
+ /org/richfaces/renderkit/html/scripts/data-table.js
</h:scripts>
<f:clientid var="clientId"/>
<table id="#{clientId}"
16 years, 10 months
JBoss Rich Faces SVN: r6349 - trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-26 08:50:20 -0500 (Tue, 26 Feb 2008)
New Revision: 6349
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
latest changes
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 13:49:28 UTC (rev 6348)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-26 13:50:20 UTC (rev 6349)
@@ -176,7 +176,8 @@
var inputSize = this.setInputWidth(textSize);
this.inplaceInput.className = this.classes.COMPONENT.EDITABLE;
- this.strut.style.width = this.inplaceInput.offsetWidth + "px";
+ this.tempValueKeeper.show();
+ this.strut.style.width = this.tempValueKeeper.offsetWidth + "px";
this.strut.show();
this.tempValueKeeper.show();
16 years, 10 months