JBoss Rich Faces SVN: r12500 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-29 12:24:46 -0500 (Thu, 29 Jan 2009)
New Revision: 12500
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-29 …
[View More]17:24:09 UTC (rev 12499)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-29 17:24:46 UTC (rev 12500)
@@ -1291,31 +1291,31 @@
}
}
- public Object assertEvents(String id, List<SeleniumEvent> eventsExpected) {
+ public Object assertEvents(String locator, List<SeleniumEvent> eventsExpected) {
for (SeleniumEvent ev : eventsExpected) {
if (ev == SeleniumEvent.ONCLICK) {
- selenium.click(id);
+ selenium.click(locator);
}else if (ev == SeleniumEvent.ONDBLCLICK) {
- selenium.doubleClick(id);
+ selenium.doubleClick(locator);
} else if (ev == SeleniumEvent.ONMOUSEDOWN) {
- selenium.mouseDown(id);
+ selenium.mouseDown(locator);
}else if (ev == SeleniumEvent.ONMOUSEMOVE) {
- selenium.mouseMove(id);
+ selenium.mouseMove(locator);
}else if (ev == SeleniumEvent.ONMOUSEUP) {
- selenium.mouseUp(id);
+ selenium.mouseUp(locator);
}else if (ev == SeleniumEvent.ONMOUSEOVER) {
- selenium.mouseOver(id);
+ selenium.mouseOver(locator);
}else if (ev == SeleniumEvent.ONMOUSEOUT) {
- selenium.mouseOut(id);
+ selenium.mouseOut(locator);
}else if (ev == SeleniumEvent.ONKEYDOWN) {
- selenium.keyDown(id, "a");
+ selenium.keyDown(locator, "a");
}else if (ev == SeleniumEvent.ONKEYUP) {
- selenium.keyUp(id, "a");
+ selenium.keyUp(locator, "a");
}else if (ev == SeleniumEvent.ONKEYPRESS) {
- selenium.keyPress(id, "a");
+ selenium.keyPress(locator, "a");
}else if (ev == SeleniumEvent.ONFOCUS) {
- selenium.focus(id);
+ selenium.focus(locator);
}
}
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12499 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-29 12:24:09 -0500 (Thu, 29 Jan 2009)
New Revision: 12499
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5894
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/…
[View More]inputNumberSpinnerTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-29 17:15:16 UTC (rev 12498)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-29 17:24:09 UTC (rev 12499)
@@ -20,8 +20,12 @@
*/
package org.richfaces.testng;
+import java.util.ArrayList;
+import java.util.List;
+
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
+import org.richfaces.SeleniumEvent;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -159,6 +163,49 @@
Assert.assertFalse(selenium.isEditable("name=" + spinnerId), "Spinner has to be read only");
}
+ @Test
+ public void testStandardHTMLAttributesAreOutputToClient(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ writeStatus("Check standard HTML attributes are output to client");
+
+ String spinnerId = getParentId() + FORM_ID + "componentId";
+ String spinnerInputXpath ="//*[@name='" + spinnerId + "']";
+
+ writeStatus("Check standart HTML attributes");
+ List<SeleniumEvent> events = new ArrayList<SeleniumEvent>();
+ events.add(SeleniumEvent.ONMOUSEMOVE);
+ events.add(SeleniumEvent.ONMOUSEOUT);
+ events.add(SeleniumEvent.ONMOUSEOVER);
+ events.add(SeleniumEvent.ONMOUSEUP);
+ events.add(SeleniumEvent.ONMOUSEDOWN);
+ events.add(SeleniumEvent.ONDBLCLICK);
+ events.add(SeleniumEvent.ONKEYUP);
+ events.add(SeleniumEvent.ONKEYPRESS);
+
+ assertEvents(spinnerInputXpath, events);
+ }
+
+ @Test
+ public void testStylesAndStyleClassesAreOutputToClient(Template template) {
+ renderPage(template);
+
+ writeStatus("Check styles and classes are output to client");
+
+ String spinnerId = getParentId() + FORM_ID + "componentId";
+ assertClassNames(spinnerId, new String[] { "noclass" }, "Class attribute was not output to client", true);
+ assertStyleAttribute(spinnerId, "font-size: 10px", "Style attribute was not output to client");
+
+ String spinnerInputXpath ="//*[@name='" + spinnerId + "']";
+
+ writeStatus("Check inputSize attribute");
+ Assert.assertEquals(selenium.getAttribute(spinnerInputXpath + "@size"), "20");
+
+ writeStatus("Check inputClass/inputStyle attributes");
+ assertClassNames(spinnerInputXpath, new String[] { "input-class" }, "inputClass attribute was not output to client", false);
+ //assertStyleAttributeContains(spinnerInputXpath, "color: blue", "inputStyle attribute was not output to client");
+ }
+
private void clickUp() {
String id = getParentId() + FORM_ID + "componentIdButtons";
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[1]/td", "mousedown");
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12498 - in trunk/framework: test and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-01-29 12:15:16 -0500 (Thu, 29 Jan 2009)
New Revision: 12498
Modified:
trunk/framework/impl/pom.xml
trunk/framework/test/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-5943
Modified: trunk/framework/impl/pom.xml
===================================================================
--- trunk/framework/impl/pom.xml 2009-01-29 17:08:12 UTC (rev 12497)
+++ trunk/framework/impl/pom.xml 2009-01-29 17:15:16 UTC (rev 12498)
@@ -149,7 +149,7 @@
<…
[View More]dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
- <version>1.8</version>
+ <version>2.0</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
Modified: trunk/framework/test/pom.xml
===================================================================
--- trunk/framework/test/pom.xml 2009-01-29 17:08:12 UTC (rev 12497)
+++ trunk/framework/test/pom.xml 2009-01-29 17:15:16 UTC (rev 12498)
@@ -53,8 +53,19 @@
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>1.14</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ <dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.2</version>
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12497 - trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-01-29 12:08:12 -0500 (Thu, 29 Jan 2009)
New Revision: 12497
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
Log:
Fix some bugs in Realworld
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
16 years, 2 months
JBoss Rich Faces SVN: r12496 - in trunk/test-applications/realworld/web/src/main/webapp: scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-29 11:31:22 -0500 (Thu, 29 Jan 2009)
New Revision: 12496
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/scripts/realworld.js
Log:
Select all checkbox
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
===================================================================
(Binary files differ)
…
[View More]Modified: trunk/test-applications/realworld/web/src/main/webapp/scripts/realworld.js
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/scripts/realworld.js 2009-01-29 16:21:20 UTC (rev 12495)
+++ trunk/test-applications/realworld/web/src/main/webapp/scripts/realworld.js 2009-01-29 16:31:22 UTC (rev 12496)
@@ -10,4 +10,33 @@
}
}
return disabled;
- }
\ No newline at end of file
+ }
+
+function selectAllFiles(f) {
+ for (var i = 0; i < filesCount; i++) {
+ var b = $('mainform:files:'+i+':file_selected');
+ if (b) {
+ b.checked = f;
+ }
+
+ }
+}
+
+function onselectFileClick(el) {
+ if (!el.checked) {
+ $('select_all').checked = false;
+ }else {
+ var b = true;
+ for (var i = 0; i < filesCount; i++) {
+ var d = $('mainform:files:'+i+':file_selected');
+ if (!d.checked) {
+ b = false;
+ break;
+ }
+ }
+ if (b) {
+ $('select_all').checked = true;
+ }
+
+ }
+}
\ No newline at end of file
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12495 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/dataGrid and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-01-29 11:21:20 -0500 (Thu, 29 Jan 2009)
New Revision: 12495
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
Log:
RF-5681
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/…
[View More]ajax4jsf/bean/DataGridBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java 2009-01-29 16:09:10 UTC (rev 12494)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java 2009-01-29 16:21:20 UTC (rev 12495)
@@ -55,6 +55,7 @@
private int elements;
private String trace;
private Set<Integer> ajaxKeys;
+ private Boolean rendered;
public DataGridBean() {
init();
@@ -73,6 +74,7 @@
ajaxKeys.add(i);
}
}
+ rendered = true;
}
public void submit(ActionEvent event) {
@@ -123,4 +125,12 @@
public Set<Integer> getAjaxKeys() {
return ajaxKeys;
}
+
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public Boolean getRendered() {
+ return rendered;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-29 16:09:10 UTC (rev 12494)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-29 16:21:20 UTC (rev 12495)
@@ -11,37 +11,36 @@
<h:form id="attrForm">
<h:outputText value="elements" />
<h:inputText id="elements" value="#{dataGrid.elements}">
- <a4j:support event="onchange" reRender="dataGrid"/>
+ <a4j:support event="onchange" reRender="panelGroup"/>
</h:inputText>
- <!--h:outputText value="includedNode" />
- <h:selectBooleanCheckbox id="includedNode" value="#{treeNodesAdaptor.includedNode}">
- <a4j:support event="onchange" reRender="tree"/>
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox id="rendered" value="#{dataGrid.rendered}">
+ <a4j:support event="onchange" reRender="panelGroup"/>
</h:selectBooleanCheckbox>
- <h:outputText value="includedRoot" />
- <h:selectBooleanCheckbox id="includedRoot" value="#{treeNodesAdaptor.includedRoot}">
- <a4j:support event="onchange" reRender="tree"/>
- </h:selectBooleanCheckbox-->
</h:form>
<h:form id="mainForm">
- <rich:dataGrid id="dataGrid" value="#{dataGrid.model}" var="element"
- elements="#{dataGrid.elements}" ajaxKeys="#{dataGrid.ajaxKeys}"
- stateVar="stateVar" rowKeyVar="rowKeyVar"
- componentState="#{componentState}">
- <h:panelGroup>
- <h:outputText id="rowKeyVar" value="#{rowKeyVar} "></h:outputText>
- <h:outputText id="first" value="#{stateVar.range.firstRow} "></h:outputText>
- <h:outputText id="rows" value="#{stateVar.range.rows} "></h:outputText>
- <h:outputText id="firstState" value="#{componentState.range.firstRow} "></h:outputText>
- <h:outputText id="rowsState" value="#{componentState.range.rows} "></h:outputText>
- <h:outputText value="#{element.cell1}"></h:outputText>
- <h:inputText id="inputText" value="#{element.cell2}" validator="#{dataGrid.validate}"></h:inputText>
- <h:outputText value="#{element.cell3}"></h:outputText>
- <h:commandButton id="submit" value="submit" actionListener="#{dataGrid.submit}"></h:commandButton>
- <a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{dataGrid.submit}"></a4j:commandButton>
- <a4j:commandButton id="ajaxSingleSubmit" value="ajaxSingleSubmit" actionListener="#{dataGrid.submit}" ajaxSingle="true"></a4j:commandButton>
- </h:panelGroup>
- </rich:dataGrid>
- <a4j:commandButton id="reRender" value="reRender" reRender="inputText" actionListener="#{dataGrid.reRender}"></a4j:commandButton>
+ <h:panelGroup id="panelGroup">
+ <rich:dataGrid id="dataGrid" value="#{dataGrid.model}" var="element"
+ elements="#{dataGrid.elements}" ajaxKeys="#{dataGrid.ajaxKeys}"
+ stateVar="stateVar" rowKeyVar="rowKeyVar"
+ componentState="#{componentState}"
+ rendered="#{dataGrid.rendered}">
+ <h:panelGroup>
+ <h:outputText id="rowKeyVar" value="#{rowKeyVar} "></h:outputText>
+ <h:outputText id="first" value="#{stateVar.range.firstRow} "></h:outputText>
+ <h:outputText id="rows" value="#{stateVar.range.rows} "></h:outputText>
+ <h:outputText id="firstState" value="#{componentState.range.firstRow} "></h:outputText>
+ <h:outputText id="rowsState" value="#{componentState.range.rows} "></h:outputText>
+ <h:outputText value="#{element.cell1}"></h:outputText>
+ <h:inputText id="inputText" value="#{element.cell2}" validator="#{dataGrid.validate}"></h:inputText>
+ <h:outputText value="#{element.cell3}"></h:outputText>
+ <h:commandButton id="submit" value="submit" actionListener="#{dataGrid.submit}"></h:commandButton>
+ <a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{dataGrid.submit}"></a4j:commandButton>
+ <a4j:commandButton id="ajaxSingleSubmit" value="ajaxSingleSubmit" actionListener="#{dataGrid.submit}" ajaxSingle="true"></a4j:commandButton>
+ </h:panelGroup>
+ </rich:dataGrid>
+ <a4j:commandButton id="reRender" value="reRender" reRender="inputText" actionListener="#{dataGrid.reRender}"></a4j:commandButton>
+ </h:panelGroup>
</h:form>
<a4j:outputPanel ajaxRendered="true">
<h:outputText id="outputText" value="#{dataGrid.trace}"></h:outputText>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-29 16:09:10 UTC (rev 12494)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-29 16:21:20 UTC (rev 12495)
@@ -11,6 +11,8 @@
private String elements;
+ private String rendered;
+
private String dataGrid;
private String reRender;
@@ -23,6 +25,7 @@
renderPage(null, template, "#{dataGrid.init}");
String attrForm = getParentId() + "attrForm";
elements = attrForm + ":elements";
+ rendered = attrForm + ":rendered";
String mainForm = getParentId() + "mainForm";
dataGrid = mainForm + ":dataGrid";
reRender = mainForm + ":reRender";
@@ -109,6 +112,17 @@
Assert.assertEquals(selenium.getText(dataGrid + ":2:rowsState"), "0", "Attribute 'componentState' works wrong.");
}
+ /**
+ * component with rendered = false is not present on the page
+ */
+ @Test
+ public void testRendered(Template template) {
+ init(template);
+ Assert.assertTrue(selenium.isElementPresent(dataGrid));
+ clickAjaxCommandAndWait(rendered);
+ Assert.assertFalse(selenium.isElementPresent(dataGrid));
+ }
+
private void chekStructure(int ... notEqualRows) {
String dataTableRowLocator = "id('"+ dataTable + "')/tbody/tr";
int count = selenium.getXpathCount(dataTableRowLocator).intValue();
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12494 - in trunk/test-applications/realworld/web/src/main/webapp: includes/fileUpload and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-01-29 11:09:10 -0500 (Thu, 29 Jan 2009)
New Revision: 12494
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
Log:
Fix some bugs in Realworld
Modified: trunk/test-…
[View More]applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
===================================================================
(Binary files differ)
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12493 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-01-29 11:06:47 -0500 (Thu, 29 Jan 2009)
New Revision: 12493
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
RF-5418, RF-5284
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js …
[View More]2009-01-29 16:06:21 UTC (rev 12492)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2009-01-29 16:06:47 UTC (rev 12493)
@@ -22,10 +22,9 @@
initHandlers : function($super) {
$super();
this.tempValueKeeper.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
- //this.button.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
+ this.button.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
+ this.button.observe("blur", function(e){this.tmpValueBlurHandler(e);}.bindAsEventListener(this));
- this.button.observe("mousedown", function(e){this.buttonClickHandler(e);}.bindAsEventListener(this));
-
this.comboList.listParent.observe("mousedown", function(e){this.listMousedownHandler(e);}.bindAsEventListener(this));
this.comboList.listParent.observe("mousemove", function(e){this.listMouseMoveHandler(e)}.bindAsEventListener(this));
this.comboList.listParent.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
@@ -78,12 +77,6 @@
if (this.comboList.activeItem) {
this.comboList.doNormalItem(this.comboList.activeItem);
}
- /*if (!this.attributes.closeOnSelect && !this.attributes.showControls && this.comboList.isListOpened) {
- this.comboList.hideWithDelay();
- this.comboList.isList = false;
- this.tempValueKeeper.focus();
- return;
- }*/
this.comboList.hideWithDelay();
}
@@ -93,7 +86,7 @@
this.clickOnScroll = false;
this.tempValueKeeper.focus();
this.comboList.isList = false;
- return;
+ return;
}
if (!this.attributes.showControls) {
@@ -105,7 +98,6 @@
},
listClickHandler : function(event) {
- //this.tempValueKeeper.focus();
this.comboList.hideWithDelay();
},
@@ -180,11 +172,7 @@
this.comboList.hide();
if (((this.attributes.closeOnSelect && !this.attributes.showControls) && this.comboList.isList)
|| (this.clickOnBar || !this.comboList.isList)) {
- //bug : http://jira.jboss.com/jira/browse/RF-2810,
- //will be corrected in a future version (http://jira.jboss.com/jira/browse/RF-2814)
var unescapedValue = this.currentItemValue;
- // var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
-// var unescapeText = this.tempValueKeeper.value.unescapeHTML();
this.setValue(unescapedValue);
}
},
@@ -201,6 +189,7 @@
setValue : function(e, param) {
var item = {};
item.itemValue = this.getParameters(e,param,"value");
+
if(this.showValueInView) {
item.itemLabel = item.itemValue;
} else {
@@ -214,32 +203,41 @@
var value = this.valueKeeper.value;
if (Richfaces.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : item.itemValue})) {
- this.endEditableState();
- if (item.itemValue == "") {
- this.setDefaultText();
- this.valueKeeper.value = "";
- //this.startViewState();
- } else {
- if (item.itemLabel == "") {
- this.setDefaultText();
- } else {
- this.currentText = item.itemLabel;
+ var proceed = true;
+
+ if(item.itemLabel && value != item.itemValue) {
+ proceed = Richfaces.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
+ }
+
+ if(proceed) {
+ this.endEditableState();
+
+ if(item.itemValue && item.itemValue.blank()) {
+ item.itemValue = "";
+ }
+
+ if(item.itemLabel && item.itemLabel.blank()) {
+ item.itemLabel = this.attributes.defaultLabel;
}
+
this.valueKeeper.value = item.itemValue;
- }
- if (item.itemValue != this.value) {
- this.startChangedState();
- if (item.itemLabel && value != item.itemValue) {
- this.tempValueKeeper.value = item.itemLabel;
- Richfaces.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
+ this.currentText = item.itemLabel;
+ this.tempValueKeeper.value = item.itemLabel;
+
+ if (item.itemValue != this.value) {
+ this.startChangedState();
+ } else {
+ this.startViewState();
}
+
+ if (this.events.onviewactivated) {
+ this.inplaceInput.fire("rich:onviewactivated", {oldValue : value, value : this.valueKeeper.value});
+ }
+
} else {
- this.startViewState();
+ this.cancel();
}
-
- if (this.events.onviewactivated) {
- this.inplaceInput.fire("rich:onviewactivated", {oldValue : value, value : this.valueKeeper.value});
- }
+
}
},
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12492 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-01-29 11:06:21 -0500 (Thu, 29 Jan 2009)
New Revision: 12492
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
RF-5418, RF-5284
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-01-…
[View More]29 15:55:41 UTC (rev 12491)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-01-29 16:06:21 UTC (rev 12492)
@@ -324,26 +324,31 @@
setValue : function(e, param) {
var value = this.valueKeeper.value;
var userValue = this.getParameters(e,param,"value");
- this.endEditableState();
-
- if (userValue.blank()) {
- this.setDefaultText();
- this.valueKeeper.value = "";
- } else {
- this.currentText = userValue;
- this.valueKeeper.value = userValue;
- }
-
- if (userValue != this.value) {
- this.startChangedState();
- if (value != userValue) {
- this.tempValueKeeper.value = userValue;
- Richfaces.invokeEvent(this.events.onchange, this.inplaceInput, "onchange", userValue);
+ var proceed = true;
+
+ if(value != userValue) {
+ proceed = Richfaces.invokeEvent(this.events.onchange, this.inplaceInput, "onchange", userValue);
+ }
+
+ if (proceed) {
+ this.tempValueKeeper.value = userValue;
+ this.endEditableState();
+ if (userValue.blank()) {
+ this.setDefaultText();
+ this.valueKeeper.value = "";
+ } else {
+ this.currentText = userValue;
+ this.valueKeeper.value = userValue;
}
+ if (userValue != this.value) {
+ this.startChangedState();
+ } else {
+ this.startViewState();
+ }
} else {
- this.startViewState();
- }
+ this.cancel();
+ }
},
getValue : function() {
[View Less]
16 years, 2 months
JBoss Rich Faces SVN: r12491 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-01-29 10:55:41 -0500 (Thu, 29 Jan 2009)
New Revision: 12491
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-5951
jQuery is updated to 1.3.1 version
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-01-29 15:51:57 …
[View More]UTC (rev 12490)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-01-29 15:55:41 UTC (rev 12491)
@@ -126,7 +126,7 @@
</listitem>
<listitem>
<para>
- <ulink url="http://jquery.com">jQuery 1.2.6</ulink>
+ <ulink url="http://jquery.com">jQuery 1.3.1</ulink>
</para>
</listitem>
<listitem>
[View Less]
16 years, 2 months