JBoss Rich Faces SVN: r9250 - trunk/test-applications/jsp/src/main/webapp/HotKey.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-26 11:16:06 -0400 (Thu, 26 Jun 2008)
New Revision: 9250
Modified:
trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp 2008-06-26 15:14:12 UTC (rev 9249)
+++ trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp 2008-06-26 15:16:06 UTC (rev 9250)
@@ -71,8 +71,8 @@
<h:commandButton id="jsAddCCID" value="add hotkey: alt+z"></h:commandButton>
<h:commandButton id="jsRemoveCCID" value="remove hotkey: alt+z"></h:commandButton>
- <h:commandLink id="jsAddJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.add({selector:'#formID\\\\:hotKeySubviewID\\\\:commandButtonID', key:'alt+x',handler:function(){alert('alt+x');}}); alert('hi'); return false;" value="add js: alt+x"></h:commandLink>
- <h:commandLink id="jsRemoveJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').remove(); */return false;" value="remove js: alt+x"></h:commandLink>
+ <h:commandLink id="jsAddJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.add({selector:'#formID\\:hotKeySubviewID\\:commandButtonID', key:'alt+x',handler:function(){alert('alt+x');}}); return false;" value="add js: alt+x"></h:commandLink>
+ <h:commandLink id="jsRemoveJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.remove(); return false;" value="remove js: alt+x"></h:commandLink>
<h:commandButton onclick="#{rich:component('jsID')}.enable(); return false;" value="enable"></h:commandButton>
<h:commandButton onclick="#{rich:component('jsID')}.disable(); return false;" value="disable"></h:commandButton>
16 years, 6 months
JBoss Rich Faces SVN: r9249 - in trunk/test-applications/jsp/src/main: java/dataTable and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-06-26 11:14:12 -0400 (Thu, 26 Jun 2008)
New Revision: 9249
Modified:
trunk/test-applications/jsp/src/main/java/custom/Custom.java
trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java
trunk/test-applications/jsp/src/main/java/tree/Bean.java
trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp
Log:
Tree: adviseNodeOpened + adviseNodeSelected
Custom: RF-3792 test
Modified: trunk/test-applications/jsp/src/main/java/custom/Custom.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/custom/Custom.java 2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/custom/Custom.java 2008-06-26 15:14:12 UTC (rev 9249)
@@ -1,5 +1,10 @@
package custom;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
public class Custom {
private int index;
@@ -12,7 +17,19 @@
private int i0;
private int i1;
private int i2;
+ private List<String> results;
+ private ArrayList<SelectItem> itemsList;
+ public List<String> getResults() {
+ return results;
+ }
+
+ public void setResults(List<String> results) {
+ System.out.println("PickListBean.setResults()");
+ System.out.println(results.size());
+ this.results = results;
+ }
+
public Custom() {
this.index = 0;
this.b0 = true;
@@ -24,6 +41,12 @@
this.i0 = 0;
this.i1 = 1;
this.i2 = 2;
+ results = new ArrayList();
+ itemsList = new ArrayList();
+
+ for(int i=0;i<10;i++){
+ itemsList.add(new SelectItem("item #" + i));
+ }
}
public Custom(int index) {
@@ -148,4 +171,12 @@
this.index = index;
}
+ public ArrayList<SelectItem> getItemsList() {
+ return itemsList;
+ }
+
+ public void setItemsList(ArrayList<SelectItem> itemsList) {
+ this.itemsList = itemsList;
+ }
+
}
Modified: trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java 2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/dataTable/DataTable.java 2008-06-26 15:14:12 UTC (rev 9249)
@@ -39,7 +39,8 @@
Enumeration keys = properties.keys();
for(int i=0;i<7;i++){
Data bean = new Data();
- int l = (int)(Math.random()*8)+1;
+ //int l = (int)(Math.random()*8)+1;
+ int l = 1;
bean.setTotal(0);
bean.setMounth(DataTable.mNames[i]);
bean.setDay(DataTable.mDay[i]);
@@ -54,7 +55,7 @@
bean.getDetail().add(child);
}
}
- for(int i=0;i<16;i++){
+ for(int i=0;i<1;i++){
numbers.add(new Integer(i));
}
}
Modified: trunk/test-applications/jsp/src/main/java/tree/Bean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/tree/Bean.java 2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/java/tree/Bean.java 2008-06-26 15:14:12 UTC (rev 9249)
@@ -43,7 +43,9 @@
private int counter = 0;
private String expandPath;
private UITree tree;
-
+ private Boolean adviseNodeSelected;
+ private Boolean adviseNodeOpened;
+
public Bean() {
try {
FacesContext context = FacesContext.getCurrentInstance();
@@ -62,8 +64,10 @@
e.printStackTrace();
}
+
+
data1 = new TreeNodeImpl();
- data1.setData("Root node");
+ data1.setData("Root node");
for (int i = 0; i < 10; i++) {
TreeNodeImpl child = new TreeNodeImpl() {
@@ -91,6 +95,14 @@
}
}
+ public Boolean adviseNodeSelected(UITree tree){
+ System.out.println("Bean.adviseNodeSelected()");
+ return Boolean.FALSE;
+ }
+ public Boolean adviseNodeOpened(UITree tree){
+ System.out.println("Bean.adviseNodeOpened()");
+ return Boolean.FALSE;
+ }
public String getIcon() {
return icon;
}
@@ -330,5 +342,7 @@
public void setRenderFacets(boolean renderFacets) {
this.renderFacets = renderFacets;
}
+
+
}
Modified: trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp 2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/webapp/CustomizePage/CustomizePage.jsp 2008-06-26 15:14:12 UTC (rev 9249)
@@ -10,18 +10,20 @@
</head>
<body>
<rich:modalPanel id="modalPanel2ID" minHeight="100" minWidth="200"
- resizeable="true" keepVisualState="true" showWhenRendered="true" binding="#{modalPanel.myModalPanel}">
+ resizeable="true" keepVisualState="true" showWhenRendered="true"
+ binding="#{modalPanel.myModalPanel}">
<h:form>
-
- <h:commandButton actionListener="#{modalPanel.checkBinding}" value="Binding"></h:commandButton>
- <h:outputText value="#{modalPanel.bindLabel}"/>
-
- <h:outputLink
- onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;"
- value="Close">
- <f:verbatim>Close</f:verbatim>
- </h:outputLink>
- </h:form>
+
+ <h:commandButton actionListener="#{modalPanel.checkBinding}"
+ value="Binding"></h:commandButton>
+ <h:outputText value="#{modalPanel.bindLabel}" />
+
+ <h:outputLink
+ onclick="Richfaces.hideModalPanel('modalPanel2ID');return false;"
+ value="Close">
+ <f:verbatim>Close</f:verbatim>
+ </h:outputLink>
+ </h:form>
</rich:modalPanel>
<rich:modalPanel id="mpm" width="500" height="300">
@@ -55,11 +57,18 @@
<a onclick="Richfaces.showModalPanel('modalPanel2ID');" href="#">Show
MP(binding)</a>
- <br/>
+ <br />
<a onclick="Richfaces.showModalPanel('mpm');" href="#">Show
MP(fileUpload)</a>
</h:form>
+ <br />
+ <h:form>
+ <h:selectManyListbox value="#{custom.results}">
+ <f:selectItems value="#{custom.itemsList}" />
+ <a4j:support event="onchange"></a4j:support>
+ </h:selectManyListbox>
+ </h:form>
</body>
</f:view>
</html>
Modified: trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp 2008-06-26 15:10:52 UTC (rev 9248)
+++ trunk/test-applications/jsp/src/main/webapp/Tree/Tree.jsp 2008-06-26 15:14:12 UTC (rev 9249)
@@ -60,7 +60,8 @@
onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
onbeforedomupdate="#{event.onbeforedomupdate}"
oncomplete="#{event.oncomplete}" ondropout="#{event.ondropout}"
- ondropover="#{event.ondropover}">
+ ondropover="#{event.ondropover}" adviseNodeOpened="#{bean.adviseNodeOpened}"
+ adviseNodeSelected="#{bean.adviseNodeSelected}">
<!--
<f:facet name="icon">
<h:outputText value="icon" rendered="#{bean.renderFacets}" />
16 years, 6 months
JBoss Rich Faces SVN: r9248 - in trunk/ui/fileUpload: src/main and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-06-26 11:10:52 -0400 (Thu, 26 Jun 2008)
New Revision: 9248
Added:
trunk/ui/fileUpload/build.properties.template
trunk/ui/fileUpload/build.xml
trunk/ui/fileUpload/src/main/flash/
trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as
Modified:
trunk/ui/fileUpload/
Log:
http://jira.jboss.com/jira/browse/RF-3549
flash src files added
Property changes on: trunk/ui/fileUpload
___________________________________________________________________
Name: svn:ignore
- .settings
target
.project
.classpath
.clover
+ .settings
target
.project
.classpath
.clover
build.properties
Added: trunk/ui/fileUpload/build.properties.template
===================================================================
--- trunk/ui/fileUpload/build.properties.template (rev 0)
+++ trunk/ui/fileUpload/build.properties.template 2008-06-26 15:10:52 UTC (rev 9248)
@@ -0,0 +1 @@
+mtasc.path=D:/eclipse/plugins/org.asdt.mtasc_1.0.0/dist
\ No newline at end of file
Added: trunk/ui/fileUpload/build.xml
===================================================================
--- trunk/ui/fileUpload/build.xml (rev 0)
+++ trunk/ui/fileUpload/build.xml 2008-06-26 15:10:52 UTC (rev 9248)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ======================================================================
+ 26.06.2008 15:33:20
+
+ project
+ description
+
+ pyaschenko
+ ====================================================================== -->
+<project name="FlashFileUploadComponent" default="default">
+ <description>
+ description
+ </description>
+
+ <property file="build.properties" />
+ <!-- =================================
+ target: default
+ ================================= -->
+ <target name="default" description="--> description">
+ <exec executable="${mtasc.path}\mtasc" dir="">
+ <arg line="-cp ${basedir}\src\main\flash -cp ${mtasc.path}\std8 -swf ${basedir}\src\main\resources\org\richfaces\renderkit\html\swf\fileUploadComponent.swf -trace no -header 640:480:12:0080c0 -version 8 -main FileUploadComponent"/>
+ </exec>
+ </target>
+</project>
Added: trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as
===================================================================
--- trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as (rev 0)
+++ trunk/ui/fileUpload/src/main/flash/FileUploadComponent.as 2008-06-26 15:10:52 UTC (rev 9248)
@@ -0,0 +1,180 @@
+/**
+ * FlashUploadComponent for Richfaces.ui.flashupload
+ */
+/**
+ *
+ */
+import flash.external.*;
+import flash.net.FileReference;
+import flash.net.FileReferenceList;
+
+// _root variables (from flashVars):
+// fileUploadId:String
+
+class FileUploadComponent {
+
+ public static var app : FileUploadComponent;
+
+ private var fileDataList: Array;
+ private var fileRefList: Array;
+ private var acceptedTypes: Object;
+ private var noDuplicate: Boolean;
+ private var maxFiles: Number;
+ private var fileTypes: Array;
+
+ public function FileUploadComponent() {
+ this.fileDataList = new Array();
+ this.fileRefList = new Array();
+ this.acceptedTypes = new Object();
+ this.noDuplicate = true;
+ this.maxFiles = 5;
+ this.fileTypes = null;
+
+ ExternalInterface.addCallback("browse", this, browse);
+ ExternalInterface.addCallback("setProperties", this, setProperties);
+ ExternalInterface.addCallback("removeFile", this, removeFile);
+ ExternalInterface.addCallback("uploadFile", this, uploadFile);
+ ExternalInterface.addCallback("cancelUploadFile", this, cancelUploadFile);
+ }
+
+ public function setProperties(properties:Object)
+ {
+
+ this.acceptedTypes = properties.acceptedTypes;
+ this.noDuplicate = properties.noDuplicate;
+ this.maxFiles = properties.maxFiles;
+ if (!this.acceptedTypes['*'])
+ {
+ var types:String = "";
+ for (var type in this.acceptedTypes)
+ {
+ types += "*."+type+";";
+ }
+ this.fileTypes = [{description: types, extension: types}];
+ }
+ }
+
+ public function removeFile(index:Number)
+ {
+ this.fileRefList.splice(index, 1);
+ this.fileDataList.splice(index, 1);
+ }
+
+ public function uploadFile(index, actionURL)
+ {
+ var item: FileReference = fileRefList[index];
+ if (item)
+ {
+ item.upload(actionURL);
+ return item.size;
+ }
+ return -1;
+ }
+
+ public function cancelUploadFile(index) {
+ var item: FileReference = fileRefList[index];
+ if (item)
+ {
+ item.cancel();
+ }
+ }
+
+
+ public function onSelect (frl: FileReferenceList) {
+
+ var list: Array = frl.fileList;
+ var item: FileReference;
+ for (var i:Number = 0; i < list.length; i++) {
+ if (this.fileRefList.length==this.maxFiles) break;
+ item = list[i];
+
+ if (!this.checkFileType(item.type) || !this.checkDuplicated(item.name)) {
+ ExternalInterface.call(this.getComponentString()+"._flashFireEvent('ontyperejected', {})");
+ continue;
+ }
+ item.addListener(this);
+ this.fileRefList.push(item);
+ this.fileDataList.push("{creationDate: "+this.getJSDateString(item.creationDate)+", creator: '"+item.creator+"', modificationDate: "+this.getJSDateString(item.modificationDate)+", name: '"+item.name+"', size: "+item.size+", type: '"+item.type+"'}");
+ }
+
+ ExternalInterface.call(this.getComponentString()+"._flashAdd(["+this.fileDataList.join(",")+"])");
+ }
+
+ public function onCancel() {
+ }
+
+ public function onProgress (file:FileReference, bytesLoaded:Number, bytesTotal:Number) {
+ ExternalInterface.call(this.getComponentString()+"._flashOnProgress("+bytesLoaded+", "+bytesTotal+")");
+ }
+
+ public function onComplete (file:FileReference) {
+ ExternalInterface.call(this.getComponentString()+"._flashOnComplete()");
+ }
+
+ public function onHTTPError (fileRef:FileReference, httpError:Number) {
+ ExternalInterface.call(this.getComponentString()+"._flashHTTPError("+httpError+")");
+ }
+ public function onIOError (file:FileReference) {
+ ExternalInterface.call(this.getComponentString()+"._flashIOError()");
+ }
+ public function onSecurityError (fileRef:FileReference, errorString:String) {
+ ExternalInterface.call(this.getComponentString()+"._flashOnSecurityError('"+errorString+"')");
+ }
+
+ public function browse() {
+ var fileRef:FileReferenceList = new FileReferenceList();
+ fileRef.addListener(this);
+ //[{description: "Image files", extension: "*.jpg;*.gif;*.png", macType: "JPEG;jp2_;GIFf;PNGf"}, {description: "Flash Movies", extension: "*.swf", macType: "SWFL"}]
+ if (this.fileTypes) fileRef.browse(this.fileTypes); else fileRef.browse();
+ }
+
+ public function getComponentString()
+ {
+ return "FlashFileUpload.getComponent('"+_root.fileUploadId+"')";
+ }
+
+ private function checkFileType (fileType) {
+ if (fileType.charAt(0)=='.') fileType = fileType.substr(1);
+ if (!this.acceptedTypes || this.acceptedTypes['*']) { return true; }
+ var type = fileType.toLowerCase();
+ if (this.acceptedTypes[type]) {
+ return true;
+ }
+ return false;
+ }
+
+ private function checkDuplicated (fileName) {
+ if (!this.noDuplicate) return true;
+ for (var i = 0; i < this.fileDataList.length; i++) {
+ if (fileName == this.fileDataList[i].name) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private function getJSDateString(d:Date) {
+ var result:String = "new Date(";
+ result+=d.getFullYear()+","+d.getMonth()+","+d.getDate()+","+d.getHours()+","+d.getMinutes()+","+d.getSeconds()+","+d.getMilliseconds()+")";
+ return result;
+ }
+
+ private function jstrace (msg: String)
+ {
+ ExternalInterface.call("FlashFileUpload.ASTrace", msg);
+ }
+
+ private function jsalert (msg: String)
+ {
+ ExternalInterface.call("FlashFileUpload.ASAlert", msg);
+ }
+
+ public static function main(mc) {
+ app = new FileUploadComponent();
+ ExternalInterface.call(app.getComponentString()+"._flashSetComponent()");
+ mc.gotoAndStop(1);
+ mc.onEnterFrame = function ()
+ {
+ };
+ }
+}
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9247 - trunk/docs/userguide/en/src/main/resources/css.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-06-26 10:47:08 -0400 (Thu, 26 Jun 2008)
New Revision: 9247
Modified:
trunk/docs/userguide/en/src/main/resources/css/html.css
Log:
http://jira.jboss.com/jira/browse/RF-3189 - images was aligned left. Line height in CSS, JAVA roles for IE7 fixed. Font-size in IE6 fixed
http://jira.jboss.com/jira/browse/RF-3744 - Short backgrounds in docs was fixed
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-06-26 14:44:43 UTC (rev 9246)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-06-26 14:47:08 UTC (rev 9247)
@@ -6,6 +6,7 @@
color:#6699CC;
cursor:pointer;
}
+
body {
background-image:url(../images/community/bkg_gradient.gif);
background-repeat:repeat-x;
@@ -13,16 +14,28 @@
font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;
font-size:12px;
line-height:150%;
-margin:0pt auto;
-max-width:80em;
+max-width:1000px;
padding:0em 2em;
-text-align:justify;
+text-align:center;
}
+
+div.book, div.chapter, div.section{
+ width:1000px;
+ margin:0 auto;
+ text-align:justify;
+}
+
+#title, ul.docnav{
+ margin:0 auto;
+ width:1000px;
+
+}
+
/* Center all images and Figure/Table titles */
-div.mediaobject img {margin:auto;}
+div.mediaobject img {margin:left;}
-p.title {text-align:center;}
+p.title {text-align:left;}
pre.CSS {line-height:8px;}
@@ -85,4 +98,17 @@
padding-right:70px;
}
.tbi {color: #aaaaaa;}
-.tbi p {color: #333333;}
\ No newline at end of file
+.tbi p {color: #333333;}
+
+div.note, div.tip, div.important{
+ height:100%;
+}
+
+pre.JAVA {
+line-height:10px;
+!line-height:15px;
+}
+
+div.table-contents table{
+ font-size:12px;
+}
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9246 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-06-26 10:44:43 -0400 (Thu, 26 Jun 2008)
New Revision: 9246
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java
Log:
ajax support test
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-06-26 14:40:59 UTC (rev 9245)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-06-26 14:44:43 UTC (rev 9246)
@@ -51,6 +51,8 @@
@Test
public void testAjaxSupportComponent() throws Exception {
_testAjaxSupportComponent(Template.SIMPLE);
+ _testAjaxSupportComponent(Template.DATA_TABLE);
+ _testAjaxSupportComponent(Template.MODAL_PANEL);
}
private void _testAjaxSupportComponent(Template template) {
16 years, 6 months
JBoss Rich Faces SVN: r9245 - in trunk/test-applications/seleniumTest/src/main: webapp and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-06-26 10:40:59 -0400 (Thu, 26 Jun 2008)
New Revision: 9245
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
trunk/test-applications/seleniumTest/src/main/webapp/index.jsp
trunk/test-applications/seleniumTest/src/main/webapp/index.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml
Log:
index page refactoring
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-06-26 14:35:08 UTC (rev 9244)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-06-26 14:40:59 UTC (rev 9245)
@@ -62,7 +62,6 @@
list.add(new ComponentItem("<rich:dropDownMenu>", "dropDownMenu/dropDownMenuTest.xhtml"));
list.add(new ComponentItem("<rich:inplaceSelect>", "inplaceSelect/inplaceSelectTest.xhtml"));
list.add(new ComponentItem("<rich:inputNumberSpinner>", "inputNumberSpinner/inputNumberSpinnerTest.xhtml"));
- list.add(new ComponentItem("<rich:jsFunction>", "jsFunction/jsFunctionTest.xhtml"));
list.add(new ComponentItem("<a4j:keepAlive>", "keepAlive/keepAliveTest.xhtml"));
list.add(new ComponentItem("<a4j:loadScript>", "loadScript/loadScriptTest.xhtml"));
list.add(new ComponentItem("<a4j:loadStyle>", "loadStyle/loadStyleTest.xhtml"));
@@ -74,6 +73,13 @@
list.add(new ComponentItem("<rich:simpleTogglePanel>", "simpleTogglePanel/simpleTogglePanel.xhtml"));
list.add(new ComponentItem("<rich:tabPanel>", "tabPanel/tabPanelTest.xhtml"));
list.add(new ComponentItem("<rich:togglePanel>", "togglePanel/togglePanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:actionParam>", "actionParam/actionParam.xhtml"));
+ list.add(new ComponentItem("<a4j:form>", "ajaxForm/ajaxFormTest.xhtml"));
+ list.add(new ComponentItem("<a4j:ajaxListener>", "ajaxListener/ajaxListenerTest.xhtml"));
+ list.add(new ComponentItem("<a4j:outputPanel>", "ajaxOutputPanel/ajaxOutputPanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:support>", "ajaxOutputPanel/ajaxOutputPanelTest.xhtml"));
+ list.add(new ComponentItem("<a4j:jsFunction>", "jsFunction/jsFunctionTest.xhtml"));
+ list.add(new ComponentItem("<rich:spacer>", "spacer/spacerTest.xhtml"));
sortList();
Modified: trunk/test-applications/seleniumTest/src/main/webapp/index.jsp
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/index.jsp 2008-06-26 14:35:08 UTC (rev 9244)
+++ trunk/test-applications/seleniumTest/src/main/webapp/index.jsp 2008-06-26 14:40:59 UTC (rev 9245)
@@ -1 +1 @@
-<jsp:forward page="faces/index.xhtml"></jsp:forward>
+<jsp:forward page="faces/TIDY/index.xhtml"></jsp:forward>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/index.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/index.xhtml 2008-06-26 14:35:08 UTC (rev 9244)
+++ trunk/test-applications/seleniumTest/src/main/webapp/index.xhtml 2008-06-26 14:40:59 UTC (rev 9245)
@@ -16,7 +16,7 @@
<f:facet name="header">
<h:outputText value="Link"></h:outputText>
</f:facet>
- <h:outputLink value="#{facesContext.externalContext.requestContextPath}/faces/pages/#{var.link}">test</h:outputLink>
+ <h:outputLink value="#{facesContext.externalContext.requestContextPath}/faces/TIDY/pages/#{var.link}">test</h:outputLink>
</h:column>
</h:dataTable>
</body>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml 2008-06-26 14:35:08 UTC (rev 9244)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/controlLayout.xhtml 2008-06-26 14:40:59 UTC (rev 9245)
@@ -23,7 +23,7 @@
</h:form>
<h:form id="_Selenium_Test_ReRender_Form">
<div>
- <a href="#{facesContext.externalContext.requestContextPath}/faces/index.xhtml">Home</a>
+ <a href="#{facesContext.externalContext.requestContextPath}/faces/TIDY/index.xhtml">Home</a>
</div>
<div>
<a4j:commandLink ajaxSingle="true" reRender="_Selenium_Test_Common_Grid" value="ReRenderAll" id="_reRender"/>
16 years, 6 months
JBoss Rich Faces SVN: r9244 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/ajaxLog and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-06-26 10:35:08 -0400 (Thu, 26 Jun 2008)
New Revision: 9244
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxLog/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxLogTest.java
Log:
http://jira.jboss.com/jira/browse/RF-3775
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxLog/ajaxLogTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxLogTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxLogTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxLogTest.java 2008-06-26 14:35:08 UTC (rev 9244)
@@ -0,0 +1,66 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class AjaxLogTest extends SeleniumTestBase {
+
+ @Test(dataProvider = "templates")
+ public void testAjaxLogLayout(Template template) {
+ renderPage(template);
+
+ String parentId = getParentId() + "_form:";
+
+ String inputElemId = parentId + "input";
+ String logElemId = "logConsole";
+
+ writeStatus("Type smth. All typing is being logged");
+
+ type(inputElemId, "typing");
+ waitForAjaxCompletion();
+
+ writeStatus("test that log element is present");
+ AssertRendered(logElemId);
+
+ writeStatus("test that clear button is present and has proper label");
+
+ if (selenium.isElementPresent("//div[@id='logConsole']/button")) {
+ String clearBtnLabel = selenium.getText("//div[@id='logConsole']/button");
+ if (null == clearBtnLabel || !clearBtnLabel.trim().equalsIgnoreCase("Clear")) {
+ Assert.fail("Clear button has obscure label");
+ }
+ } else {
+ Assert.fail("Clear button is not rendered");
+ }
+
+ writeStatus("at least dozen messages have to be logged");
+ int logCount = selenium.getXpathCount("//div[@id='logConsole']/div").intValue();
+ if (logCount < 12) {
+ Assert.fail("There are suspiciously few log messages here");
+ }
+
+ writeStatus("check clear button");
+ selenium.click("//div[@id='logConsole']/button");
+
+ logCount = selenium.getXpathCount("//div[@id='logConsole']/div").intValue();
+ if (logCount > 0) {
+ Assert.fail("log must be empty");
+ }
+
+ writeStatus("test style attribute");
+
+ String style = selenium.getAttribute("//div[@id='logConsole']@style");
+
+ if (!style.contains("WIDTH: 800px; HEIGHT: 300px")) {
+ Assert.fail("Style does not affect ajax log component");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxLog/ajaxLogTest.xhtml";
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxLogTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 6 months
JBoss Rich Faces SVN: r9243 - trunk/docs/cdkguide/en/src/main/docbook/includes.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-06-26 10:20:09 -0400 (Thu, 26 Jun 2008)
New Revision: 9243
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
Log:
http://jira.jboss.com/jira/browse/RF-3692 - 'Dynamic images generation' was added to TOC
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-06-26 14:18:54 UTC (rev 9242)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-06-26 14:20:09 UTC (rev 9243)
@@ -18,8 +18,11 @@
<para>
XCSS
</para>
+ </section>
+ <section>
+ <title>Dynamic images generation</title>
<para>
- Dynamic images
+ XCSS
</para>
</section>
</section>
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9242 - in trunk/test-applications/seleniumTest/src: main/webapp/WEB-INF and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-06-26 10:18:54 -0400 (Thu, 26 Jun 2008)
New Revision: 9242
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JSupport.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxSupport/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
Log:
ajax support test
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JSupport.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JSupport.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JSupport.java 2008-06-26 14:18:54 UTC (rev 9242)
@@ -0,0 +1,52 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JSupport {
+
+ private String data = null;
+
+ public static class Messages {
+ public static final String FOR_LINK = "Link onclick passed";
+
+ public static final String FOR_CHECKBOX = "Checkbox onchange passed";
+
+ public static final String FOR_COMMAND = "Command onclick passed";
+
+ public static final String FOR_SUBMIT = "Default listener";
+
+ public static final String NO_DATA = "nodata";
+ }
+
+ public void linkListener (ActionEvent event) {
+ data = Messages.FOR_LINK;
+ }
+
+ public void checkBoxListener (ActionEvent event) {
+ data = Messages.FOR_CHECKBOX;
+ }
+
+ public void commandListener (ActionEvent event) {
+ data = Messages.FOR_COMMAND;
+ }
+
+ public void listener (ActionEvent event) {
+ data = Messages.FOR_SUBMIT;
+ }
+
+
+ /**
+ * @return the data
+ */
+ public String getData() {
+ return (data != null) ? data : Messages.NO_DATA;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(String data) {
+ this.data = data;
+ }
+
+}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-26 14:07:34 UTC (rev 9241)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-26 14:18:54 UTC (rev 9242)
@@ -155,4 +155,9 @@
<managed-bean-class>org.ajax4jsf.bean.A4JActionParam</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>ajaxSupport</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JSupport</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
</faces-config>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxSupport/ajaxSupport.xhtml 2008-06-26 14:18:54 UTC (rev 9242)
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+ <ui:define name="style">
+
+ </ui:define>
+ <ui:define name="component">
+ <h:form id="_form">
+ <table>
+ <tr>
+ <td><i>ReRender Area:</i></td>
+ <td>
+ <h:outputText style="font-weight: bold; border: 1px solid green" value="#{ajaxSupport.data}" id="data"></h:outputText>
+ </td>
+ </tr>
+ </table>
+
+ <br/>
+ <br/>
+
+ <table border="1" cellpadding="2" cellspacing="0">
+ <tr>
+ <th>Controls</th><th>Event</th>
+ </tr>
+ <tr>
+ <td>
+ <h:outputLink value="#" id="link" style="text-decoration: none; color: blue;">
+ <h:outputText value="Link"></h:outputText>
+ <a4j:support event="onclick" reRender="data" actionListener="#{ajaxSupport.linkListener}"></a4j:support>
+ </h:outputLink>
+ </td>
+ <td>
+ onclick
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:selectBooleanCheckbox value="true" id="checkbox">
+ <a4j:support event="onchange" reRender="data" actionListener="#{ajaxSupport.checkBoxListener}"></a4j:support>
+ </h:selectBooleanCheckbox>
+ </td>
+ <td>
+ onchange
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:commandLink value="Submit" id="command" actionListener="#{ajaxSupport.listener}" style="text-decoration: none; color: blue;">
+ <a4j:support event="onclick" actionListener="#{ajaxSupport.commandListener}" reRender="data" disableDefault="true" requestDelay="2000"></a4j:support>
+ </h:commandLink>
+ </td>
+ <td>
+ onclick
+ </td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-06-26 14:18:54 UTC (rev 9242)
@@ -0,0 +1,110 @@
+/**
+ *
+ */
+package org.richfaces.testng;
+
+import org.ajax4jsf.bean.A4JSupport;
+import org.ajax4jsf.template.Template;
+import org.richfaces.RichSeleniumTest;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * @author Andrey Markavstov
+ *
+ */
+public class AjaxSupportTest extends SeleniumTestBase implements
+ RichSeleniumTest {
+
+ public AjaxSupportTest() {
+ super("http", "localhost", serverPort);
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeMethod
+ @Parameters( { "browser", "filterPrefix" })
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
+ }
+
+ @BeforeMethod
+ @Parameters( { "loadStyleStrategy", "loadScriptStrategy" })
+ protected void loadConfiguration(String loadStyleStrategy,
+ String loadScriptStrategy) throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterMethod(alwaysRun = true)
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testAjaxSupportComponent() throws Exception {
+ _testAjaxSupportComponent(Template.SIMPLE);
+ }
+
+ private void _testAjaxSupportComponent(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+
+ String dataId = parentId + "data";
+ String linkId = parentId + "link";
+ String checkBoxId = parentId + "checkbox";
+ String command = parentId + "command";
+
+ clickById(linkId);
+ waitForAjaxCompletion();
+ String data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_LINK, "'onclick' ajax support for link[id='_form:link'] failed.", A4JSupport.Messages.FOR_LINK + " successful");
+
+ clickById(checkBoxId);
+ waitForAjaxCompletion();
+ data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_CHECKBOX, "'onchange' ajax support for checkbox[id='_form:checkbox'] failed.", A4JSupport.Messages.FOR_CHECKBOX+ " successful");
+
+ clickById(command);
+ pause(1000, command);
+ if (!data.equals(getTextById(dataId))) {
+ writeStatus("<a4j:support failed. 'requestDelay' attribute does not work.");
+ Assert.fail("<a4j:support failed. 'requestDelay' attribute does not work.");
+ }
+ waitForAjaxCompletion();
+ data = getTextById(dataId);
+ checkMessage(data, A4JSupport.Messages.FOR_COMMAND, "'onclick' ajax support for command link[id='_form:command'] failed.", A4JSupport.Messages.FOR_COMMAND+ " successful");
+
+ if (A4JSupport.Messages.FOR_SUBMIT.equals(data)) {
+ writeStatus("<a4j:support failed. 'disableDefault' attribute does not work");
+ Assert.fail("<a4j:support failed. 'disableDefault' attribute does not work.");
+ }
+
+
+ }
+
+ private void checkMessage(String data, String message, String errorMessage, String okMessage) {
+ if (message.equals(data)) {
+ writeStatus(okMessage);
+ }else if (A4JSupport.Messages.NO_DATA.equals(data)) {
+ writeStatus(errorMessage + " Caused by: action listener for <a4j:support> skipped", true);
+ Assert.fail(errorMessage + " Caused by: action listener for <a4j:support> skipped");
+ }else if ("".equals(data)) {
+ writeStatus(errorMessage + "Caused by: no ajax request has been sent.", true);
+ Assert.fail(errorMessage + "Caused by: no ajax request has been sent.");
+ }
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxSupport/ajaxSupport.xhtml";
+ }
+
+}
16 years, 6 months
JBoss Rich Faces SVN: r9241 - trunk/test-applications/jsp/src/main/webapp/HotKey.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-06-26 10:07:34 -0400 (Thu, 26 Jun 2008)
New Revision: 9241
Modified:
trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp 2008-06-26 13:46:39 UTC (rev 9240)
+++ trunk/test-applications/jsp/src/main/webapp/HotKey/HotKey.jsp 2008-06-26 14:07:34 UTC (rev 9241)
@@ -70,13 +70,15 @@
<h:panelGrid columns="2">
<h:commandButton id="jsAddCCID" value="add hotkey: alt+z"></h:commandButton>
<h:commandButton id="jsRemoveCCID" value="remove hotkey: alt+z"></h:commandButton>
- <h:commandLink id="jsAddJSID" onclick="document.getElementById('jsID').component.add({handler:function(){alert('alt+x');}, selector:'#formID\:commandButtonID', key:'alt+x'}); alert('hi'); return false;" value="add js: alt+x"></h:commandLink>
- <h:commandLink id="jsRemoveJSID" onclick="document.getElementById('jsID').remove(); return false;" value="remove js: alt+x"></h:commandLink>
+
+ <h:commandLink id="jsAddJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.add({selector:'#formID\\\\:hotKeySubviewID\\\\:commandButtonID', key:'alt+x',handler:function(){alert('alt+x');}}); alert('hi'); return false;" value="add js: alt+x"></h:commandLink>
+ <h:commandLink id="jsRemoveJSID" onclick="document.getElementById('formID:hotKeySubviewID:jsID').remove(); */return false;" value="remove js: alt+x"></h:commandLink>
+
<h:commandButton onclick="#{rich:component('jsID')}.enable(); return false;" value="enable"></h:commandButton>
<h:commandButton onclick="#{rich:component('jsID')}.disable(); return false;" value="disable"></h:commandButton>
<rich:componentControl disableDefault="true" attachTo="jsAddCCID" for="jsID" event="onclick" operation="add">
- <f:param name="selector" value="#formID\:commandButtonID" />
+ <f:param name="selector" value="#formID\:hotKeySubviewID\:commandButtonID" />
<f:param name="key" value="alt+z" />
<f:param name="handler" value="alert('alt+z')" />
</rich:componentControl>
16 years, 6 months