JBoss Rich Faces SVN: r11833 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-16 13:08:02 -0500 (Tue, 16 Dec 2008)
New Revision: 11833
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
Log:
https://jira.jboss.org/jira/browse/RF-5351
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-16 18:05:49 UTC (rev 11832)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-16 18:08:02 UTC (rev 11833)
@@ -235,6 +235,7 @@
enableManualInput = false;
NULLModel = false;
firstWeekDay = 0;
+ disabled = false;
}
public String resetAction() {
@@ -454,6 +455,7 @@
showWeekDaysBar = true;
showWeeksBar = true;
firstWeekDay = 0;
+ disabled = false;
}
private String todayControlMode = "select";
@@ -551,5 +553,23 @@
public void setFirstWeekDay(int firstWeekDay) {
this.firstWeekDay = firstWeekDay;
}
-
+
+ private boolean disabled;
+
+ /**
+ * Gets value of disabled field.
+ * @return value of disabled field
+ */
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ /**
+ * Set a new value for disabled field.
+ * @param disabled a new value for disabled field
+ */
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
}
16 years, 9 months
JBoss Rich Faces SVN: r11832 - 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: 2008-12-16 13:05:49 -0500 (Tue, 16 Dec 2008)
New Revision: 11832
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5351
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 17:31:52 UTC (rev 11831)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 18:05:49 UTC (rev 11832)
@@ -168,6 +168,8 @@
String firstWeekDayId;
+ String isDisabledId;
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
calendarHeaderId = calendarId + "Header";
@@ -209,7 +211,8 @@
applyButtonXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[6]";
cleanButtonXPath = "//td[@id='"+calendarFooterId+"']/table/tbody/tr/td[2]";
calendarMessageId = parentId + FORM_ID + "calendarMsg";
- firstWeekDayId =parentId + FORM_ID + "firstWeekDay";
+ firstWeekDayId = parentId + FORM_ID + "firstWeekDay";
+ isDisabledId = parentId + FORM_ID + "isDisabled";
}
String getStatus() {
@@ -403,7 +406,7 @@
Assert.fail("Calendar displays invalid date. It should contain ["+expected+"]. But was ["+headerDate+"]");
}
}
-
+
@Test
public void testAjaxSingle(Template template) {
AutoTester tester = getAutoTester(this);
@@ -423,8 +426,7 @@
tester.testProcessAttribute();
}
-
-
+
// Erroneous test case.
/* @Test
public void testNULLModel(Template template) {
@@ -440,8 +442,7 @@
}*/
-
-
+
@Test
public void testJSAPI(Template template) {
renderPage(template, RESET_METHOD);
@@ -1176,9 +1177,58 @@
showPopup();
AssertTextEquals(firstWeekDayCellId, weekDayShortName, "It looks as if 'firstWeekDay' attribute doesn't work");
- }
+ }
@Test
+ public void testDisabledAttribute(Template template) {
+ renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
+ initIds(getParentId());
+
+ writeStatus("Check 'disabled' attribute");
+ check(isDisabledId, true);
+
+ writeStatus("Popup mode");
+ check(showPopupId, true);
+
+ writeStatus("Check date input is disabled");
+ //Assert.assertFalse(selenium.isEditable(inputDateId), "Date input is not disabled");
+ //Assert.assertTrue(Boolean.parseBoolean(selenium.getAttribute(inputDateId + "@disabled")), "Date input is not disabled");
+ if(selenium.getXpathCount("//*[@id='" + inputDateId + "' and @disabled='true']").intValue() == 0) {
+ Assert.fail("Date input is not disabled");
+ }
+ writeStatus("button does not trigger popup calendar");
+ showPopup();
+ Assert.assertFalse(isVisible(calendarId), "Calendar popup should not be shown up");
+ writeStatus("and decorated with disabled icon");
+ testIcon(popupButtonId, "Disabled");
+
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+ writeStatus("All stuff is disabled");
+ Assert.assertFalse(isPresent("//td[@id='" + calendarHeaderId + "']/table/tbody/tr/td[@class='rich-calendar-tool'][1]/div"), "Previous year button has NOT to be present");
+ Assert.assertFalse(isPresent("//td[@id='" + calendarHeaderId + "']/table/tbody/tr/td[@class='rich-calendar-tool'][2]/div"), "Previous month button has NOT to be present");
+ Assert.assertFalse(isPresent("//td[@id='" + calendarHeaderId + "']/table/tbody/tr/td[@class='rich-calendar-tool'][3]/div"), "Next month button has NOT to be present");
+ Assert.assertFalse(isPresent("//td[@id='" + calendarHeaderId + "']/table/tbody/tr/td[@class='rich-calendar-tool'][4]/div"), "Next year button has NOT to be present");
+
+ String footerText = selenium.getText("//td[@id='" + calendarFooterId + "']/table/tbody/tr");
+ Assert.assertFalse(footerText.matches(".*Today.*"), "Today button should NOT be present");
+ Assert.assertFalse(footerText.matches(".*Clean.*"), "Clean button should NOT be present");
+
+ String expectedHTML = getHTMLById(calendarId);
+ writeStatus("Convulsively click all over the calendar. The component has not to be changed it is disabled, remember?!");
+ clickById(calendarId + "DayCell6");
+ String actualHTML = getHTMLById(calendarId);
+ Assert.assertEquals(actualHTML, expectedHTML);
+ clickById(calendarId + "DayCell17");
+ actualHTML = getHTMLById(calendarId);
+ Assert.assertEquals(actualHTML, expectedHTML);
+
+ clickById(calendarId + "DayCell26");
+ actualHTML = getHTMLById(calendarId);
+ Assert.assertEquals(actualHTML, expectedHTML);
+ }
+
+ @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
16 years, 9 months
JBoss Rich Faces SVN: r11831 - in trunk/ui/core/src/test: resources/org/ajax4jsf/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-16 12:31:52 -0500 (Tue, 16 Dec 2008)
New Revision: 11831
Added:
trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll-drop.xhtml
Modified:
trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java
trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml
trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js
Log:
https://jira.jboss.org/jira/browse/RF-5375
Modified: trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java 2008-12-16 17:30:45 UTC (rev 11830)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java 2008-12-16 17:31:52 UTC (rev 11831)
@@ -52,7 +52,7 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 600, 1600, false);
+ checkRequestData(dataList.get(0), "firstForm:queuedDefaultPoll", 600, 1600, false);
}
public void testQueuedPollRequestDelay() throws Exception {
@@ -63,7 +63,7 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 300, 1300, false);
+ checkRequestData(dataList.get(0), "firstForm:queuedDelayedPoll", 300, 1300, false);
}
public void testDelayedQueueDefaultPollRequestDelay() throws Exception {
@@ -74,7 +74,7 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 1500, 2500, false);
+ checkRequestData(dataList.get(0), "secondForm:delayedQueueDefaultPoll", 1500, 2500, false);
}
public void testDelayedQueuePollRequestDelay() throws Exception {
@@ -85,7 +85,7 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 2400, 3400, false);
+ checkRequestData(dataList.get(0), "secondForm:delayedQueueDelayedPoll", 2400, 3400, false);
}
public void testUnqueuedDefaultPollRequestDelay() throws Exception {
@@ -96,7 +96,7 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 700, 1700, false);
+ checkRequestData(dataList.get(0), "thirdForm:unqueuedDefaultPoll", 700, 1700, false);
}
public void testunQueuedPollRequestDelay() throws Exception {
@@ -107,6 +107,65 @@
List<RequestData> dataList = result.getDataList();
assertEquals(1, dataList.size());
- checkRequestData(dataList.get(0), null, 950, 1950, false);
+ checkRequestData(dataList.get(0), "thirdForm:unqueuedDelayedPoll", 950, 1950, false);
}
+
+ public void testDropNextDroppedPoll() throws Exception {
+ setFlag("renderDropNext");
+ renderView("/queue-poll-drop.xhtml");
+
+ ParametersBuilder parametersBuilder = createAjaxParameters().eventsQueue("dropNextQueue").
+ requestDelay(0);
+
+ ajax(0, "a", parametersBuilder.similarityGroupingId(1).requestTime(3000));
+
+ //poll has 2000 interval, so ajax request at 2100 will make queue drop it from list
+ ajax(2500, "b", parametersBuilder.similarityGroupingId(2).requestTime(500));
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+ assertEquals(3, dataList.size());
+
+ checkRequestData(dataList.get(0), "a", 0, 3000, false);
+ checkRequestData(dataList.get(1), "b", 3000, 3500, false);
+
+ //poll has been kicked from queue at 2500, requeued in 2000
+ checkRequestData(dataList.get(2), "firstForm:poll", 2500 + 2000, 2500 + 2000 + 1000 /* default request time */,
+ false);
+ }
+
+ public void testDropNextDroppedPollSingle() throws Exception {
+ setFlag("renderDropNextSingle");
+ renderView("/queue-poll-drop.xhtml");
+
+ ajax(0, "a", createAjaxParameters().requestTime(3000).requestDelay(0).eventsQueue("dropNextQueueSingle"));
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+ assertEquals(2, dataList.size());
+
+ checkRequestData(dataList.get(0), "a", 0, 3000, false);
+ checkRequestData(dataList.get(1), "thirdForm:poll", 4000, 5000, false);
+ }
+
+ public void testDropNewDroppedPoll() throws Exception {
+ setFlag("renderDropNew");
+ renderView("/queue-poll-drop.xhtml");
+
+ ParametersBuilder parametersBuilder = createAjaxParameters().eventsQueue("dropNewQueue").
+ requestDelay(0);
+
+ ajax(0, "a", parametersBuilder.similarityGroupingId(1).requestTime(3000));
+
+ //poll has 2500 interval, so ajax request at 2000 will make queue drop it from the list
+ ajax(2000, "b", parametersBuilder.similarityGroupingId(2).requestTime(500));
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+ assertEquals(3, dataList.size());
+
+ checkRequestData(dataList.get(0), "a", 0, 3000, false);
+ checkRequestData(dataList.get(1), "b", 3000, 3500, false);
+ checkRequestData(dataList.get(2), "secondForm:poll", 5000, 6000, false);
+ }
}
Added: trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll-drop.xhtml
===================================================================
--- trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll-drop.xhtml (rev 0)
+++ trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll-drop.xhtml 2008-12-16 17:31:52 UTC (rev 11831)
@@ -0,0 +1,26 @@
+<html
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j">
+ <body>
+ <f:view>
+ <a4j:queue size="2" name="dropNextQueue" sizeExceededBehavior="dropNext" />
+ <a4j:queue size="2" name="dropNewQueue" sizeExceededBehavior="dropNew" />
+ <a4j:queue size="1" name="dropNextQueueSingle" sizeExceededBehavior="dropNext" />
+
+ <h:form id="firstForm" rendered="#{renderDropNext}">
+ <a4j:poll interval="2000" id="poll" eventsQueue="dropNextQueue" />
+ </h:form>
+
+ <h:form id="secondForm" rendered="#{renderDropNew}">
+ <a4j:poll interval="2500" id="poll" eventsQueue="dropNewQueue" />
+ </h:form>
+
+ <h:form id="thirdForm" rendered="#{renderDropNextSingle}">
+ <a4j:poll interval="2000" id="poll" eventsQueue="dropNextQueueSingle" />
+ </h:form>
+
+ </f:view>
+ </body>
+</html>
Modified: trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml
===================================================================
--- trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml 2008-12-16 17:30:45 UTC (rev 11830)
+++ trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml 2008-12-16 17:31:52 UTC (rev 11831)
@@ -6,21 +6,21 @@
<body>
<f:view>
- <h:form>
+ <h:form id="firstForm">
<a4j:queue />
<a4j:poll id="queuedDefaultPoll" enabled="#{queuedDefaultPollEnabled}" interval="600" />
<a4j:poll id="queuedDelayedPoll" enabled="#{queuedDelayedPollEnabled}" interval="200" requestDelay="100" />
</h:form>
- <h:form>
+ <h:form id="secondForm">
<a4j:queue requestDelay="10000" />
<a4j:poll id="delayedQueueDefaultPoll" enabled="#{delayedQueueDefaultPollEnabled}" interval="1500" />
<a4j:poll id="delayedQueueDelayedPoll" enabled="#{delayedQueueDelayedPollEnabled}" interval="2000" requestDelay="400" />
</h:form>
- <h:form>
+ <h:form id="thirdForm">
<a4j:poll id="unqueuedDefaultPoll" enabled="#{unqueuedDefaultPollEnabled}" interval="700" />
<a4j:poll id="unqueuedDelayedPoll" enabled="#{unqueuedDelayedPollEnabled}" interval="900" requestDelay="50" />
</h:form>
Modified: trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js
===================================================================
--- trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js 2008-12-16 17:30:45 UTC (rev 11830)
+++ trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js 2008-12-16 17:31:52 UTC (rev 11831)
@@ -203,7 +203,7 @@
}
XMLHttpRequest.requestTime = options.requestTime || defaultRequestTime || DEFAULT_REQUEST_TIME;
- XMLHttpRequest.data = options.data || (event && event.srcElement.id);
+ XMLHttpRequest.data = options.data || (event && event.srcElement.id) || options.pollId;
try {
var req = oldSubmitQuery.apply(this, arguments);
16 years, 9 months
JBoss Rich Faces SVN: r11830 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-16 12:30:45 -0500 (Tue, 16 Dec 2008)
New Revision: 11830
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
Log:
https://jira.jboss.org/jira/browse/RF-5375
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-12-16 17:09:42 UTC (rev 11829)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-12-16 17:30:45 UTC (rev 11830)
@@ -617,6 +617,12 @@
};
}
+ if (!options.onqueuerequestdrop) {
+ options.onqueuerequestdrop = function() {
+ A4J.AJAX.Poll(containerId,form,options);
+ };
+ }
+
A4J.AJAX.SetZeroRequestDelay(options);
A4J.AJAX._pollers[options.pollId] = window.setTimeout(function(){
@@ -647,6 +653,11 @@
// For error, re-submit request.
A4J.AJAX.Push(containerId,form,options);
};
+
+ options.onqueuerequestdrop = function() {
+ LOG.debug("Push main request dropped from queue");
+ };
+
A4J.AJAX._pollers[options.pushId] = window.setTimeout(function(){
var request = new XMLHttpRequest();
request.onreadystatechange = function(){
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-12-16 17:09:42 UTC (rev 11829)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-12-16 17:30:45 UTC (rev 11830)
@@ -75,6 +75,13 @@
}
},
+ ondrop: function() {
+ var callback = this.options.onqueuerequestdrop;
+ if (callback) {
+ callback.call(this.queue, this.query, this.options, this.event);
+ }
+ },
+
onRequestDelayPassed: function() {
this.readyToSubmit = true;
this.queue.submitFirst();
@@ -263,6 +270,8 @@
if (b == DROP_NEW) {
LOG.debug("Queue '" + this.name + "' is going to drop new item");
+ entry.ondrop();
+
handled = true;
} else if (b == DROP_NEXT) {
LOG.debug("Queue '" + this.name + "' is going to drop [" + nextIdx + "] item that is the next one");
@@ -270,9 +279,15 @@
var nextEntry = this.items.splice(nextIdx, 1)[0];
if (nextEntry) {
LOG.debug("Item dropped from queue");
+
nextEntry.stopTimer();
+
+ nextEntry.ondrop();
} else {
LOG.debug("There's no such item, will handle new request instead");
+
+ entry.ondrop();
+
handled = true;
}
} else if (b == FIRE_NEW) {
16 years, 9 months
JBoss Rich Faces SVN: r11829 - in trunk/test-applications/seleniumTest/richfaces/src/main: webapp/pages/message and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-16 12:09:42 -0500 (Tue, 16 Dec 2008)
New Revision: 11829
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
Log:
Refactor messages test
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-16 17:09:17 UTC (rev 11828)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-16 17:09:42 UTC (rev 11829)
@@ -31,9 +31,9 @@
private String string;
- private String string2;
+ private String secondInputString;
- private String string3;
+ private String thirdInputString;
private Boolean rendered;
@@ -49,8 +49,8 @@
public void init() {
string = "something";
- string2 = "something2";
- string3 = "something3";
+ secondInputString = "something2";
+ thirdInputString = "something3";
rendered = true;
showDetail = true;
showSummary = false;
@@ -124,31 +124,32 @@
}
/**
- * @return the string2
+ * @return the secondInputString
*/
- public String getString2() {
- return string2;
+ public String getSecondInputString() {
+ return secondInputString;
}
/**
- * @param string2 the string2 to set
+ * @param secondInputString the secondInputString to set
*/
- public void setString2(String string2) {
- this.string2 = string2;
+ public void setSecondInputString(String secondInputString) {
+ this.secondInputString = secondInputString;
}
/**
- * @return the string3
+ * @return the thirdInputString
*/
- public String getString3() {
- return string3;
+ public String getThirdInputString() {
+ return thirdInputString;
}
/**
- * @param string3 the string3 to set
+ * @param thirdInputString the thirdInputString to set
*/
- public void setString3(String string3) {
- this.string3 = string3;
+ public void setThirdInputString(String thirdInputString) {
+ this.thirdInputString = thirdInputString;
}
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11828 - trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-16 12:09:17 -0500 (Tue, 16 Dec 2008)
New Revision: 11828
Modified:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11827 - in trunk/test-applications/realworld/web/src/main: java/org/richfaces/realworld/slideshow and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-16 12:07:43 -0500 (Tue, 16 Dec 2008)
New Revision: 11827
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -1,6 +1,7 @@
package org.richfaces.realworld.session;
import java.io.IOException;
+import java.io.Serializable;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
@@ -30,7 +31,7 @@
@Name("authenticator")
@Scope(ScopeType.CONVERSATION)
-public class Authenticator
+public class Authenticator implements Serializable
{
@Logger Log log;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -1,5 +1,7 @@
package org.richfaces.realworld.slideshow;
+import java.io.Serializable;
+
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -10,7 +12,7 @@
@Name("slideshow")
@Scope(ScopeType.CONVERSATION)
-public class SlideshowBean {
+public class SlideshowBean implements Serializable{
@In(required=false) @Out(required=false)
SlideshowHelper slideshowHelper;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -15,6 +15,8 @@
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.FriendshipRequest;
@@ -83,7 +85,7 @@
public void setSelectedAlbumName(String selectedAlbumName) {
this.selectedAlbumName = selectedAlbumName;
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void addAlbum(){
albumAction.addAlbum(album);
treeRoot.getAvailableAlbums().add(new SelectItem(album.getName()));
@@ -94,12 +96,12 @@
selectedAlbum = albumItem.getAlbum();
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public List<String> availableUserLogins(Object suggest){
List<String> suggestions = userAction.getUsers((String)suggest);
return suggestions;
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void editAlbum(Album album){
boolean nameChanged = !album.getName().equals(album.getChangedName());
if(nameChanged){
@@ -118,7 +120,7 @@
treeRoot.updateChild(album);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void deleteAlbum(Album album){
String albumName = album.getName();
albumAction.deleteAlbum(album);
@@ -129,7 +131,7 @@
selectedAlbum = user.getChildAlbums().get(0);
selectedImage = selectedAlbum.getImages().get(0);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void deleteImage(Image image){
int index = image.getAlbum().getIndex(image);
String albumName = image.getAlbum().getName();
@@ -144,7 +146,7 @@
selectedImage = selectedAlbum.getImages().get(index-1);
}
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void editImage(Image image){
TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
boolean parentChanged = !parent.getAlbum().getName().equals(image.getAlbumName());
@@ -165,17 +167,17 @@
imageItem.setImage(image);
}
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void resetImage(Image image){
image = imageAction.resetImage(image);
selectedImage = image;
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void resetAlbum(Album album){
album = albumAction.resetAlbum(album);
selectedAlbum = album;
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
@Observer("addImage")
public void addImage(Image image) {
imageAction.addImage(image);
@@ -185,15 +187,15 @@
selectedImage = imageItem.getImage();
selectedAlbum = albumItem.getAlbum();
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void editComment(Comment comment) {
imageAction.editComment(comment);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void addComment(Comment comment) {
imageAction.addComment(comment);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void addAutoComment(Image image) {
Comment comment = new Comment();
comment.setAuthor(user);
@@ -202,16 +204,16 @@
comment.setMessage("+1");
imageAction.addComment(comment);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void sendMessage(Message message) {
messageAction.sendMessage(message);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public Long getCountUnreadedMessages() {
Long count = userAction.countNotReadedMessages(user);
return count!= null? count:0;
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void removeFromFriends(User owner, User removed){
userAction.removeFromFriends(owner, removed);
Message message = new Message();
@@ -224,7 +226,7 @@
message.setTheme("You are were removed from friends");
messageAction.sendMessage(message);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void addToFriends(User friend){
FriendshipRequest request = friend.getFriendshipRequest(user, friend);
if(request != null){
@@ -244,20 +246,20 @@
throw new Exception("This user won't be your friend!");
}*/
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void addToSharedAlbums(Image image){
userAction.addSharedAlbum(image.getAlbum());
}
- @Begin(join=true)
+ @Transactional(TransactionPropagationType.REQUIRED)
public void removeFromSharedAlbums(Album album){
userAction.removeFromSharedAlbums(user, album);
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void vote(Image image){
imageAction.vote(image, (Long)Long.valueOf(ratingHelper.getInputSlider().getValue().toString()));
}
-
+ @Transactional(TransactionPropagationType.REQUIRED)
public void showSharedAlbum(Image image){
NavigationEnum mainArea = NavigationEnum.IMAGE_PREVIEW;
treeSelectionManager.setMainArea(mainArea);
@@ -267,7 +269,7 @@
selectedImageIndex.setSelectedImageIndex(1);
}
- @Begin(join=true)
+ @Transactional(TransactionPropagationType.REQUIRED)
public void updateSelectedAlbum(){
selectedAlbum = user.getAlbumByName(this.getSelectedAlbumName());
selectedImage = selectedAlbum.getImages().get(0);
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -28,6 +28,8 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
import org.richfaces.component.UIDatascroller;
import org.richfaces.component.UIDragSupport;
import org.richfaces.component.UITree;
@@ -47,7 +49,7 @@
@Name("treeSelectionManager")
@Scope(ScopeType.CONVERSATION)
-@Synchronized(timeout=2000)
+@Synchronized(timeout=200000)
public class TreeSelectionManager implements Serializable{
@In(required=false)
@@ -61,13 +63,13 @@
@In(required=false) @Out(required=false)
private Album selectedAlbum;
- @In(create=true) @Out(required=false)
+ @In(required=false) @Out(required=false)
private SelectedImageIndex selectedImageIndex;
@In(create=true)
FileManager fileManager;
- @In(create=true)
+ @In(required=false)
TreeActionManager treeActionManager;
private String nodeTitle;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -1,21 +1,25 @@
package org.richfaces.realworld.util;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
@Name("friendHelper")
-(a)Scope(ScopeType.CONVERSATION)
-public class FriendHelper {
+(a)Scope(ScopeType.SESSION)
+public class FriendHelper implements Serializable{
@Out(required=false)
private User selectedUser;
@@ -26,7 +30,7 @@
@In(required=false) @Out(required=false)
private Album selectedAlbum;
- @In(create=true) @Out(required=false)
+ @In(required=false) @Out(required=false)
private SelectedImageIndex selectedImageIndex;
private String albumName;
@@ -47,6 +51,7 @@
return albumNames;
}
+ @Transactional(TransactionPropagationType.REQUIRED)
@Begin(join=true)
public void chooseAlbum(User friend){
selectedUser = friend;
@@ -55,6 +60,7 @@
selectedImageIndex.setSelectedImageIndex(1);
}
+ @Transactional(TransactionPropagationType.REQUIRED)
@Begin(join=true)
public void chooseAlbum(Album album){
selectedUser = album.getOwner();
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -8,6 +8,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.io.Serializable;
import javax.imageio.ImageIO;
@@ -22,7 +23,7 @@
@Name("imageLoader")
@Scope(ScopeType.CONVERSATION)
-public class ImageLoader {
+public class ImageLoader implements Serializable{
@In(create=true)
FileManager fileManager;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -1,12 +1,14 @@
package org.richfaces.realworld.util;
+import java.io.Serializable;
+
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name(value="navigationHelper")
@Scope(ScopeType.CONVERSATION)
-public class NavigationHelper {
+public class NavigationHelper implements Serializable{
private NavigationEnum navigationEnum;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java 2008-12-16 16:36:32 UTC (rev 11826)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java 2008-12-16 17:07:43 UTC (rev 11827)
@@ -1,12 +1,14 @@
package org.richfaces.realworld.util;
+import java.io.Serializable;
+
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@Name("selectedImageIndex")
@Scope(ScopeType.CONVERSATION)
-public class SelectedImageIndex {
+public class SelectedImageIndex implements Serializable{
private Integer selectedImageIndex = 1;
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11826 - in trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes: simple/skins/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-16 11:36:32 -0500 (Tue, 16 Dec 2008)
New Revision: 11826
Modified:
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/content.xcss
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/dialog.xcss
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss
Log:
https://jira.jboss.org/jira/browse/RF-5291
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/content.xcss
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/content.xcss 2008-12-16 16:33:53 UTC (rev 11825)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/content.xcss 2008-12-16 16:36:32 UTC (rev 11826)
@@ -22,7 +22,7 @@
<u:selector name="body, td, pre">
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-family" skin="generalFamilyFont"/>
- <u:style name="font-size" value="10px"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
</u:selector>
<u:selector name="body">
@@ -32,7 +32,7 @@
<u:selector name="body.mceForceColors">
<u:style name="color" skin="generalTextColor"/>
<u:style name="background" skin="tableBackgroundColor"/>
- <u:style name="font-size" value="10px"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
</u:selector>
<u:selector name=".mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid">
@@ -40,7 +40,7 @@
<u:style name="border-style" value="dashed"/>
<u:style name="border-color" skin="tableBorderColor"/>
<u:style name="background" skin="tableBackgroundColor"/>
- <u:style name="font-size" value="10px"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
</u:selector>
<u:selector name="a.mceItemAnchor">
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/dialog.xcss
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/dialog.xcss 2008-12-16 16:33:53 UTC (rev 11825)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/skins/richfaces/dialog.xcss 2008-12-16 16:36:32 UTC (rev 11826)
@@ -154,7 +154,7 @@
<u:selector name="input, select, textarea">
<u:style name="font-family" skin="generalFamilyFont"/>
- <u:style name="font-size" value="10px"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
</u:selector>
<u:selector name="input, select, textarea">
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss 2008-12-16 16:33:53 UTC (rev 11825)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/simple/skins/richfaces/content.xcss 2008-12-16 16:36:32 UTC (rev 11826)
@@ -11,7 +11,7 @@
<u:selector name="body, td, pre">
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-family" skin="generalFamilyFont"/>
- <u:style name="font-size" value="10px"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
</u:selector>
<u:selector name="body">
16 years, 9 months
JBoss Rich Faces SVN: r11825 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-16 11:33:53 -0500 (Tue, 16 Dec 2008)
New Revision: 11825
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11824 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-16 11:23:53 -0500 (Tue, 16 Dec 2008)
New Revision: 11824
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11823 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-12-16 11:23:40 -0500 (Tue, 16 Dec 2008)
New Revision: 11823
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
https://jira.jboss.org/jira/browse/RF-4583
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-12-16 16:08:53 UTC (rev 11822)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-12-16 16:23:40 UTC (rev 11823)
@@ -408,6 +408,7 @@
iframe.style.position = "absolute";
iframe.frameBorder="0";
iframe.scrolling="no";
+ iframe.src="blank.html";
iframe.style.width = width;
16 years, 9 months
JBoss Rich Faces SVN: r11822 - trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-16 11:08:53 -0500 (Tue, 16 Dec 2008)
New Revision: 11822
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
Log:
https://jira.jboss.org/jira/browse/RF-4723
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-12-16 16:04:07 UTC (rev 11821)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-12-16 16:08:53 UTC (rev 11822)
@@ -371,7 +371,7 @@
this.shuttleTable.parentNode.scrollTop += increment;
}
}
- Event.stop(event);
+ if (event) Event.stop(event);
},
setFocus : function() {
16 years, 9 months
JBoss Rich Faces SVN: r11821 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-16 11:04:07 -0500 (Tue, 16 Dec 2008)
New Revision: 11821
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11820 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: editor/examples and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-16 10:50:58 -0500 (Tue, 16 Dec 2008)
New Revision: 11820
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2008-12-16 15:50:26 UTC (rev 11819)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2008-12-16 15:50:58 UTC (rev 11820)
@@ -16,10 +16,11 @@
</style>
<h:form>
<h:panelGrid columns="2" width="100%" columnClasses="column,column">
- <rich:editor configuration="#{editorBean.currentConfiguration}" id="editor" width="400" viewMode = "#{editorBean.viewMode}" value="#{editorBean.value}">
- <a4j:support event="onchange" reRender="result" ajaxSingle="true" requestDelay="1000" rendered="#{editorBean.liveUpdatesEnabled}"/>
- </rich:editor>
-
+ <h:panelGroup style="height:310px;" layout="block">
+ <rich:editor configuration="#{editorBean.currentConfiguration}" id="editor" width="400" height="300" viewMode = "#{editorBean.viewMode}" value="#{editorBean.value}">
+ <a4j:support event="onchange" reRender="result" ajaxSingle="true" requestDelay="1000" rendered="#{editorBean.liveUpdatesEnabled}"/>
+ </rich:editor>
+ </h:panelGroup>
<rich:panel>
<f:facet name="header">
<h:outputText value="Editor Settings"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml 2008-12-16 15:50:26 UTC (rev 11819)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/usage.xhtml 2008-12-16 15:50:58 UTC (rev 11820)
@@ -8,8 +8,24 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- DESCRIPTION
+ <b>RichFaces Editor</b> component provides possibility to use <b>tinyMCE
+ widget </b>as first class citizen within JSF environment.
</p>
+ <p>
+ It has almost all the properties and features of original widget
+ and adds next additional features:
+ </p>
+ <ul>
+ <li>
+ Seam text supported out of the box using built-in converter.
+ </li>
+ <li>
+ RichFaces skinnability
+ </li>
+ <li>
+ Manageable configurations mechanism implemented.
+ </li>
+ </ul>
<fieldset class="demo_fieldset">
<legend class="demo_legend">Editor demo</legend>
@@ -21,7 +37,7 @@
</ui:include>
</div>
</fieldset>
+<a4j:log popup="false"></a4j:log>
</ui:define>
-
</ui:composition>
</html>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml 2008-12-16 15:50:26 UTC (rev 11819)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml 2008-12-16 15:50:58 UTC (rev 11820)
@@ -41,16 +41,6 @@
<h:outputText value="Ignore Duplicated Responces" />
<h:selectBooleanCheckbox value="#{queueBean.ignoreDupResponces}" />
- <h:outputText value="Queue size" />
- <h:inputText value="#{queueBean.size}">
- <f:convertNumber integerOnly="true" maxIntegerDigits="5" />
- </h:inputText>
- <h:outputText value="Size Exceed Behavior" />
- <h:selectOneMenu value="#{queueBean.sizeExceededBehavior}">
- <f:selectItems value="#{queueBean.strategies}" />
- </h:selectOneMenu>
-
-
<h:outputText value="Disable Queue" />
<h:selectBooleanCheckbox value="#{queueBean.disabled}" />
<f:facet name="footer">
16 years, 9 months
JBoss Rich Faces SVN: r11819 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-12-16 10:50:26 -0500 (Tue, 16 Dec 2008)
New Revision: 11819
Added:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.BETA4.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r11818 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-16 10:46:33 -0500 (Tue, 16 Dec 2008)
New Revision: 11818
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Remove erroneous test case (RF-5228)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 15:36:58 UTC (rev 11817)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 15:46:33 UTC (rev 11818)
@@ -424,7 +424,9 @@
tester.testProcessAttribute();
}
- @Test
+
+ // Erroneous test case.
+ /* @Test
public void testNULLModel(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
@@ -437,7 +439,7 @@
Assert.assertTrue(runScript("window.done").equals(Boolean.FALSE.toString().toLowerCase()), "Change of current date should not force ajax request in case of NULL dat model.");
- }
+ }*/
@Test
16 years, 9 months
JBoss Rich Faces SVN: r11817 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/support.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-12-16 10:36:58 -0500 (Tue, 16 Dec 2008)
New Revision: 11817
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5147
language is checked
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-16 15:16:28 UTC (rev 11816)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/dropDowns.xhtml 2008-12-16 15:36:58 UTC (rev 11817)
@@ -10,16 +10,16 @@
<p>
One of the most frequently asked question from the community is about the
- problems while trying to create so called dependent selects.
+ problems occurring while trying to create so called dependent selects.
</p>
<p>
- So there you could explore simple sample of this case and check the source
+ Here you could explore a simple sample of this case and check the source
code used.
</p>
<p>
- After you select the produce type - the second select list will be populated
- and contains the items of this type. And if you change the type it will
- be updated again wih proper values.
+ After you select the produce type, the second select list is populated
+ and contains the items of this type, and if you change the type it will
+ be updated again with proper values.
</p>
<fieldset class="demo_fieldset">
16 years, 9 months
JBoss Rich Faces SVN: r11816 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-16 10:16:28 -0500 (Tue, 16 Dec 2008)
New Revision: 11816
Added:
trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider4.png
Log:
RF-5287: describeInputNumberSlider 2 new features
Added: trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider4.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r11815 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-16 10:12:09 -0500 (Tue, 16 Dec 2008)
New Revision: 11815
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-3426
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-16 14:45:20 UTC (rev 11814)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-16 15:12:09 UTC (rev 11815)
@@ -76,19 +76,19 @@
queuedId : '',
- LMPopUp:function(menuName, isCurrent) {
+ LMPopUp:function(menuName, isCurrent, event) {
if (!this.loaded || ( this.isVisible(menuName) && !isCurrent)) {
return;
}
if (menuName == this.father[this.layerPoppedUp]) {
- this.LMPopUpL(this.layerPoppedUp, false);
+ this.LMPopUpL(this.layerPoppedUp, false, event);
} else if (this.father[menuName] == this.layerPoppedUp) {
- this.LMPopUpL(menuName, true);
+ this.LMPopUpL(menuName, true, event);
} else {
//this.shutdown();
foobar = menuName;
do {
- this.LMPopUpL(foobar, true);
+ this.LMPopUpL(foobar, true, event);
foobar = this.father[foobar];
} while (foobar);
}
@@ -103,7 +103,7 @@
* @param menuName
* @param visibleFlag
*/
- LMPopUpL: function(menuName, visibleFlag) {
+ LMPopUpL: function(menuName, visibleFlag, event) {
if (!this.loaded) {
return;
}
@@ -118,10 +118,10 @@
if (visible && !visibleFlag) {
if (menuLayer) {
if (menuLayer.eventOnClose) {
- menuLayer.eventOnClose();
+ menuLayer.eventOnClose(event);
}
if (menuLayer.eventOnCollapse) {
- menuLayer.eventOnCollapse();
+ menuLayer.eventOnCollapse(event);
}
if (menuLayer.refItem) {
menuLayer.refItem.highLightGroup(false);
@@ -130,10 +130,10 @@
} else if (!visible && visibleFlag) {
if (menuLayer) {
if (menuLayer.eventOnOpen) {
- menuLayer.eventOnOpen();
+ menuLayer.eventOnOpen(event);
}
if (menuLayer.eventOnExpand) {
- menuLayer.eventOnExpand();
+ menuLayer.eventOnExpand(event);
}
if (menuLayer.level>0) {
@@ -142,7 +142,7 @@
} while (menuLayer.level > 0);
if (menuLayer && menuLayer.eventOnGroupActivate) {
- menuLayer.eventOnGroupActivate();
+ menuLayer.eventOnGroupActivate(event);
}
}
}
@@ -431,7 +431,7 @@
this.layer.style.display=layer_display;
this.layer.style.visibility='';
- RichFaces.Menu.Layers.LMPopUp(this.layer.id, false);
+ RichFaces.Menu.Layers.LMPopUp(this.layer.id, false,e);
RichFaces.Menu.Layers.clearLMTO();
}.bind(this);
}
@@ -1052,7 +1052,7 @@
hideMe: function(e){
RichFaces.Menu.Layers.clearPopUpTO();
RichFaces.Menu.Layers.levels[this.level] = null;
- RichFaces.Menu.Layers.LMPopUpL(this.id, false);
+ RichFaces.Menu.Layers.LMPopUpL(this.id, false,e);
// if (this.eventOnClose) this.eventOnClose();
},
asDropDown: function(topLevel, bindElementId, onEvt, offEvt, options){
16 years, 9 months
JBoss Rich Faces SVN: r11814 - in trunk/ui/inplaceInput/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-16 09:45:20 -0500 (Tue, 16 Dec 2008)
New Revision: 11814
Modified:
trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
https://jira.jboss.org/jira/browse/RF-5284
Modified: trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-12-16 14:25:20 UTC (rev 11813)
+++ trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-12-16 14:45:20 UTC (rev 11814)
@@ -143,6 +143,7 @@
options.addEventHandler("onviewactivation");
options.addEventHandler("oneditactivated");
options.addEventHandler("onviewactivated");
+ options.addEventHandler("onchange");
events.append(options.toScript());
return events.toString();
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 2008-12-16 14:25:20 UTC (rev 11813)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-12-16 14:45:20 UTC (rev 11814)
@@ -1,3 +1,7 @@
+if(!window.LOG){
+ window.LOG = {warn:function(){}};
+}
+
if (!window.Richfaces) window.Richfaces = {};
Richfaces.InplaceInput = Class.create();
@@ -335,7 +339,7 @@
if (this.tempValueKeeper != userValue) {
this.tempValueKeeper.value = userValue;
}
- this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", param);
+ this.invokeEvent(this.events.onchange, this.inplaceInput, "onchange", userValue);
} else {
this.startViewState();
}
16 years, 9 months
JBoss Rich Faces SVN: r11813 - trunk/ui/message/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-12-16 09:25:20 -0500 (Tue, 16 Dec 2008)
New Revision: 11813
Modified:
trunk/ui/message/src/main/config/component/message.xml
Log:
https://jira.jboss.org/jira/browse/RF-5282
showdetail is corrected
Modified: trunk/ui/message/src/main/config/component/message.xml
===================================================================
--- trunk/ui/message/src/main/config/component/message.xml 2008-12-16 14:16:06 UTC (rev 11812)
+++ trunk/ui/message/src/main/config/component/message.xml 2008-12-16 14:25:20 UTC (rev 11813)
@@ -68,18 +68,18 @@
<property>
<name>showDetail</name>
<classname>boolean</classname>
- <defaultvalue>false</defaultvalue>
+ <defaultvalue>true</defaultvalue>
<description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "false".
+ Flag indicating whether detailed information of a displayed messages should be included. Default value is "true".
</description>
</property>
<property>
<name>showSummary</name>
<classname>boolean</classname>
- <defaultvalue>true</defaultvalue>
+ <defaultvalue>false</defaultvalue>
<description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "true".
+ Flag indicating whether the summary portion of displayed messages should be included. Default value is "false".
</description>
</property>
@@ -347,7 +347,7 @@
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
<description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "false"
+ Flag indicating whether the detailed information of displayed messages should be included. Default value is "false"
</description>
</property>
16 years, 9 months
JBoss Rich Faces SVN: r11812 - management/design/message/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-12-16 09:16:06 -0500 (Tue, 16 Dec 2008)
New Revision: 11812
Modified:
management/design/message/funcspec/FuncSpec - RF Message Component.doc
management/design/message/funcspec/FuncSpec - RF Messages Component.doc
Log:
https://jira.jboss.org/jira/browse/RF-5282
description of showsummary and showdetail is corrected
Modified: management/design/message/funcspec/FuncSpec - RF Message Component.doc
===================================================================
(Binary files differ)
Modified: management/design/message/funcspec/FuncSpec - RF Messages Component.doc
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11811 - in trunk/samples/richfaces-demo/src/main/webapp: richfaces/queue and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-16 08:56:27 -0500 (Tue, 16 Dec 2008)
New Revision: 11811
Added:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_Editor.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_Queue.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_Editor.gif
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
Log:
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Editor.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Editor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Queue.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Queue.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_Editor.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_Editor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2008-12-16 13:53:24 UTC (rev 11810)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2008-12-16 13:56:27 UTC (rev 11811)
@@ -88,6 +88,10 @@
to all the requests from the particular queue.
</li>
</ul>
+ <p>
+ Full attributes table and usage ways you could explore at our
+ queue documentation.
+ </p>
<p><i>
Also pay your attention to the queue definition. As it mentioned in
16 years, 9 months
JBoss Rich Faces SVN: r11810 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-16 08:53:24 -0500 (Tue, 16 Dec 2008)
New Revision: 11810
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/queue/QueueBean.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml
trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js
Log:
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/queue/QueueBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/queue/QueueBean.java 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/queue/QueueBean.java 2008-12-16 13:53:24 UTC (rev 11810)
@@ -2,14 +2,9 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
-import org.ajax4jsf.event.AjaxEvent;
-
public class QueueBean {
public int requestDelay = 500;
public boolean ignoreDupResponces = false;
@@ -19,7 +14,6 @@
public String text="";
public int requests=0;
public int events=0;
- private static final String AJAX_REQUESTS_COUNT_ATTRIBUTE = "ajaxRequestsCount";
public List<SelectItem> strategies = new ArrayList<SelectItem>();
@@ -35,21 +29,13 @@
}
public void waitDelay() throws InterruptedException {
- System.out.println("QueueBean.waitDelay()");
Thread.sleep(1000);
}
- public void processAjax(AjaxEvent event) {
- ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
- Map<String, Object> sessionMap = externalContext.getSessionMap();
- Long count = (Long) sessionMap.get(AJAX_REQUESTS_COUNT_ATTRIBUTE);
- if (count == null) {
- count = Long.valueOf(0);
- }
- sessionMap.put(AJAX_REQUESTS_COUNT_ATTRIBUTE, ++count);
+ public void resetText() {
+ setText("");
}
-
public int getRequestDelay() {
return requestDelay;
}
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-16 13:53:24 UTC (rev 11810)
@@ -90,4 +90,4 @@
stateAPI=richMisc, \t State Manager API, \t\t/images/ico_StateManagerAPI.gif, \t\t/images/cn_StateManagerAPI.gif, ArchitectureOverview.html\#statemanagerapi, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
extendedDataTable= richDataIterators, Extended Data Table, /images/ico_ExtendedDataTable.gif, /images/cn_ExtendedDataTable.gif, extendedDataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/extendedDataTable.jsf
editor= richInputs, Editor, /images/ico_Editor.gif, /images/cn_Editor.gif, editor.html, jbossrichfaces/freezone/docs/tlddoc/rich/editor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEditor.html, /richfaces/editor.jsf
-queue= ajaxSupport, Queue, /images/ico_Queue.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf
+queue= ajaxSupport, Queue, /images/ico_common.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-16 13:53:24 UTC (rev 11810)
@@ -481,6 +481,14 @@
<to-view-id>/richfaces/stateAPI/examples/simple.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <display-name>ajaxOptimization</display-name>
+ <from-view-id>/richfaces/queue.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>ajaxOptimization</from-outcome>
+ <to-view-id>/richfaces/ajaxAttributes.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
<application>
<navigation-handler>org.richfaces.ui.application.StateNavigationHandler</navigation-handler>
<el-resolver>org.richfaces.el.StateELResolver</el-resolver>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/customization.xhtml 2008-12-16 13:53:24 UTC (rev 11810)
@@ -8,8 +8,35 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- Description
+ There you could explore <b>optimization </b>parameters of the <b>queue
+ </b>and learn how them influence the <b>Ajax requests</b>. This example
+ is a good start to learn about Ajax requests flood protection.
</p>
+
+ <p>
+ Pay attention to some points in the example:
+ </p>
+ <ul>
+ <li>
+ Setting ignoreDupResponces to true - will reduce the count of DOM updates on typing inside input.
+ (in initial state - count of updates will be equals to count of requests)
+ </li>
+ <li>
+ Disabling the queue will causes fully asynchronous updates. Note
+ that updates could appears not in the right order and you could get
+ wrong string in the result.
+ </li>
+ <li>
+ Setting request delay to greater value will reduce the requests count
+ on fast typing. (More similar requests will be combined in the result)
+ </li>
+ </ul>
+ <p><i>
+
+ Also pay your attention to the queue definition. As it mentioned in
+ our documentation such definition (inside some form without name)
+ means that the queue becomes global for the form.
+ </i></p>
<fieldset class="demo_fieldset">
<legend class="demo_legend">Queue demo</legend>
<div class="sample-container">
@@ -18,8 +45,64 @@
<ui:param name="sourcepath" value="/richfaces/queue/examples/repeater.xhtml"/>
<ui:param name="openlabel" value="View Source" />
</ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/queue/QueueBean.java"/>
+ <ui:param name="openlabel" value="View QueueBean.java code" />
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
</div>
</fieldset>
+ <h:form>
+ <p>
+ <b>Queue</b> provides subset of common <b>Ajax requests optimization attributes</b>
+ (<i>requestDelay, ignoreDupResponse and timeout</i>)
+ which you could explore at <h:commandLink value="Queue and Traffic Flood Protection" immediate="true" action="ajaxOptimization"/> section.
+ These attributes defined within the queue will be used for all the request
+ in case concrete components do not override them.
+ </p>
+ </h:form>
+ <p>The queue component also provides some additional attributes in order to
+ control queue itself:
+ </p>
+ <ul>
+ <li>
+ <b>name</b> attribute which defines name for the queue.
+ </li>
+ <li>
+ <b>disabled</b> - attribute which allows to disable the queue.
+ Could be used in order to disable the global queue for particular
+ views or in order to switch between same named queues with different
+ parameters.
+ </li>
+ <li>
+ <b>size</b> - Defines the count of requests which could be queued
+ at the moment. -1 value means that queue has no size limit.
+ </li>
+ <li>
+ <b>sizeExceededBehavior</b> - defines the behavior for the queue
+ if size already exceeded and new request tried to be added to
+ the queue. (dropNew, dropNext, fireNew, fireNext values allowed)
+ </li>
+ <li>
+ <b>status</b> - attribute which allows to point status component
+ to all the requests from the particular queue.
+ </li>
+ </ul>
+ <p><i>
+
+ Also pay your attention to the queue definition. As it mentioned in
+ our documentation such definition (inside some form without name)
+ means that the queue becomes global for the form.
+ </i></p>
+ <p class="note">
+ <i><b>Note:</b></i> queue component could get its parameters from
+ EL bindings. But the component isn't designed to be updated via
+ ajax requests. (There are no useful cases where the developers
+ need to change the timeouts or request delays on the fly). So
+ as you could see the example below uses <b>h:commandButton</b> in order to
+ reebuild all the view and reinitialize the queue with new parameter
+ values.
+ </p>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/queue.xhtml 2008-12-16 13:53:24 UTC (rev 11810)
@@ -10,7 +10,7 @@
<h:form id="form1" prependId="false">
<a4j:queue requestDelay="1000" ignoreDupResponce="true"/>
- <h:panelGrid columns="2" cellspacing="5">
+ <h:panelGrid columns="1" cellspacing="5">
<h:panelGrid id="board1" columns="6" border="1">
<f:facet name="header">
<h:outputText value="Ajax Requests" styleClass="keytitle" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/queue/examples/repeater.xhtml 2008-12-16 13:53:24 UTC (rev 11810)
@@ -15,7 +15,7 @@
<h:panelGrid columns="2">
<h:outputText value="Type here:" />
<h:inputText id="myinput" value="#{queueBean.text}">
- <a4j:support event="onkeyup" reRender="outtext,reqs"
+ <a4j:support event="onkeyup" reRender="outtext"
onsubmit="addEvent();" ajaxSingle="true"
oncomplete="printCounts()"
onbeforedomupdate="addUpdate()" action="#{queueBean.waitDelay}"/>
@@ -54,15 +54,11 @@
<h:outputText value="Disable Queue" />
<h:selectBooleanCheckbox value="#{queueBean.disabled}" />
<f:facet name="footer">
- <h:panelGroup>
- <h:commandButton value="Apply"/>
- <h:commandButton value="Reset"/>
- </h:panelGroup>
+ <h:commandButton value="Apply" action="#{queueBean.resetText}"/>
</f:facet>
</h:panelGrid>
</rich:panel>
</h:panelGrid>
- <a4j:log popup="false" style="width:800px; height:400px; overflow:auto;"/>
</h:form>
<script type="text/javascript">
var events=0;
Modified: trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js 2008-12-16 13:41:37 UTC (rev 11809)
+++ trunk/samples/richfaces-demo/src/main/webapp/scripts/queueUi.js 2008-12-16 13:53:24 UTC (rev 11810)
@@ -41,19 +41,27 @@
function removeCell(cellData) {
var row = document.getElementById("tr1");
var cells = row.getElementsByTagName("td");
+ var deletedCellIndex=-1;
if (cells.length==1) {
lastButtonActivated=undefined;
lastButtonCounter=undefined;
}
if (typeof cells != 'undefined' || cells != null) {
- for (var i=0; i<cells.length; i++) {
+ for (var i=cells.length-1; i>=0; i--) {
if (cells[i].firstChild.nodeValue.indexOf(cellData.nodeValue)==0) {
- row.deleteCell(i);
+ if (deletedCellIndex==-1){
+ deletedCellIndex=i;
+ row.deleteCell(i);
+ }else{
+ deletedCellIndex=-1;
+ break;
+ }
+ }
+ }
+ if (deletedCellIndex!=-1){
var button = document.getElementById(cellData.nodeValue);
button.value = 'submit';
button.src = enabledImage;
- break;
- }
}
}
}
16 years, 9 months
JBoss Rich Faces SVN: r11809 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/calendar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-12-16 08:41:37 -0500 (Tue, 16 Dec 2008)
New Revision: 11809
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5352
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-16 13:30:13 UTC (rev 11808)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/CalendarTestBean.java 2008-12-16 13:41:37 UTC (rev 11809)
@@ -234,6 +234,7 @@
required = false;
enableManualInput = false;
NULLModel = false;
+ firstWeekDay = 0;
}
public String resetAction() {
@@ -452,6 +453,7 @@
showInput = true;
showWeekDaysBar = true;
showWeeksBar = true;
+ firstWeekDay = 0;
}
private String todayControlMode = "select";
@@ -532,4 +534,22 @@
this.enableManualInput = enableManualInput;
}
+ private int firstWeekDay = 0;
+
+ /**
+ * Gets value of firstWeekDay field.
+ * @return value of firstWeekDay field
+ */
+ public int getFirstWeekDay() {
+ return firstWeekDay;
+ }
+
+ /**
+ * Set a new value for firstWeekDay field.
+ * @param firstWeekDay a new value for firstWeekDay field
+ */
+ public void setFirstWeekDay(int firstWeekDay) {
+ this.firstWeekDay = firstWeekDay;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/showAttributesTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 13:30:13 UTC (rev 11808)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-16 13:41:37 UTC (rev 11809)
@@ -166,6 +166,8 @@
String calendarMessageId;
+ String firstWeekDayId;
+
void initIds(String parentId) {
calendarId = parentId + FORM_ID + "calendar";
calendarHeaderId = calendarId + "Header";
@@ -207,6 +209,7 @@
applyButtonXpath = "//td[@id='" + calendarFooterId + "']/table/tbody/tr/td[6]";
cleanButtonXPath = "//td[@id='"+calendarFooterId+"']/table/tbody/tr/td[2]";
calendarMessageId = parentId + FORM_ID + "calendarMsg";
+ firstWeekDayId =parentId + FORM_ID + "firstWeekDay";
}
String getStatus() {
@@ -1146,6 +1149,34 @@
}
@Test
+ public void testFirstWeekDay(Template template) {
+ renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
+ initIds(getParentId());
+
+ String firstWeekDayCellId = calendarId + "WeekDayCell0";
+ Locale locale = new Locale(selenium.getText(getParentId() + FORM_ID + "locale"));
+ DateFormatSymbols symbols = new DateFormatSymbols(locale);
+ Calendar cal = Calendar.getInstance(locale);
+
+ writeStatus("Check 'firstWeekDay' attribute");
+ writeStatus("Set first firstWeekDay to 5 day. 'FirstWeekDay' ranges from 0 to 6 for instance it is Friday in USA and Saturday (samedi) in France");
+ selenium.type(firstWeekDayId, "5");
+
+ int weekday = Integer.parseInt(selenium.getValue(firstWeekDayId));
+ String weekDayShortName = symbols.getShortWeekdays()[weekday + cal.getFirstDayOfWeek()];
+
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+ AssertTextEquals(firstWeekDayCellId, weekDayShortName, "It looks as if 'firstWeekDay' attribute doesn't work");
+
+ writeStatus("Popup mode");
+ check(showPopupId, true);
+ showPopup();
+
+ AssertTextEquals(firstWeekDayCellId, weekDayShortName, "It looks as if 'firstWeekDay' attribute doesn't work");
+ }
+
+ @Test
public void testTodayControlMode(Template template) {
renderPage(TODAY_CONTROL_MODE_URL, template, null);
initIds(getParentId());
16 years, 9 months
JBoss Rich Faces SVN: r11808 - trunk/ui/scrollableDataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-16 08:30:13 -0500 (Tue, 16 Dec 2008)
New Revision: 11808
Modified:
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
Log:
RF-4515
Modified: trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
--- trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2008-12-16 13:28:07 UTC (rev 11807)
+++ trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2008-12-16 13:30:13 UTC (rev 11808)
@@ -292,6 +292,10 @@
id of the element to set focus after request completed on client side
</description>
</property>
+
+ <property hidden="true">
+ <name>process</name>
+ </property>
</component>
<renderer generate="true">
16 years, 9 months
JBoss Rich Faces SVN: r11807 - in trunk: framework/api/src/main/java/org/richfaces/model and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-12-16 08:28:07 -0500 (Tue, 16 Dec 2008)
New Revision: 11807
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java
trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java
trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataRange.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
Log:
RF-2644
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -55,4 +55,12 @@
this.rows = rows;
}
+ protected void setFirstRow(int firstRow) {
+ this.firstRow = firstRow;
+ }
+
+ protected void setRows(int rows) {
+ this.rows = rows;
+ }
+
}
Modified: trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -54,6 +54,8 @@
public static class SimpleRowKey extends Number implements Serializable{
private static final long serialVersionUID = 1L;
+
+ public static final String PREFIX = "srk";
private int i;
public SimpleRowKey(int i) {
@@ -66,7 +68,7 @@
}
public String toString() {
- return String.valueOf(i);
+ return PREFIX + String.valueOf(i);
}
public int hashCode() {
Modified: trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataRange.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataRange.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataRange.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -12,25 +12,21 @@
import java.io.Serializable;
-import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SequenceRange;
/**
* Iteration range for Scrollable Grid
* @author Maksim Kaszynski
* @modified by Anton Belevich
*/
-public class ScrollableTableDataRange implements Range, Serializable{
+public class ScrollableTableDataRange extends SequenceRange implements Serializable{
private static final long serialVersionUID = -6675002421400464892L;
- private int first = 0;
- private int last = 0;
private SortOrder sortOrder;
public ScrollableTableDataRange(int first, int last, SortOrder sortOrder) {
- super();
- this.first = first;
- this.last = last;
+ super(first, last > 0 ? last - first : -1);
this.sortOrder = sortOrder;
}
@@ -38,25 +34,25 @@
* @return the bufferSize
*/
public int getLast() {
- return last;
+ return getFirstRow() + getRows();
}
/**
* @param bufferSize the bufferSize to set
*/
public void setLast(int lastRow) {
- this.last = lastRow;
+ setRows(lastRow > 0 ? lastRow - getFirstRow() : -1);
}
/**
* @return the first
*/
public int getFirst() {
- return first;
+ return getFirstRow();
}
/**
* @param first the first to set
*/
public void setFirst(int first) {
- this.first = first;
+ setFirstRow(first);
}
public SortOrder getSortOrder() {
@@ -66,27 +62,36 @@
public void setSortOrder(SortOrder sortOrder) {
this.sortOrder = sortOrder;
}
-
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + getFirstRow();
+ result = prime * result + getRows();
+ result = prime * result
+ + ((sortOrder == null) ? 0 : sortOrder.hashCode());
+ return result;
+ }
+
+ @Override
public boolean equals(Object obj) {
-
- if(!(obj instanceof ScrollableTableDataRange)){
- return super.equals(obj);
- }
-
- ScrollableTableDataRange ref = (ScrollableTableDataRange)obj;
-
- boolean ret = (this.first == ref.first)&&(this.last == ref.last );
-
- if(this.sortOrder != null){
- ret = ret && this.sortOrder.equals(ref.sortOrder);
- } else {
- ret = (ret && (ref.sortOrder == null));
- }
-
- return ret;
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ScrollableTableDataRange other = (ScrollableTableDataRange) obj;
+ if (getFirstRow() != other.getFirstRow())
+ return false;
+ if (getRows() != other.getRows())
+ return false;
+ if (sortOrder == null) {
+ if (other.sortOrder != null)
+ return false;
+ } else if (!sortOrder.equals(other.sortOrder))
+ return false;
+ return true;
}
-
- public int hashCode() {
- return super.hashCode();
- }
}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -24,10 +24,15 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.event.AbortProcessingException;
@@ -35,13 +40,14 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.component.UIDataAdaptor;
+import org.ajax4jsf.component.SequenceDataAdaptor;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.model.DataComponentState;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.Range;
+import org.ajax4jsf.util.ELUtils;
import org.apache.commons.collections.iterators.IteratorChain;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -53,10 +59,14 @@
import org.richfaces.event.sort.SortEvent;
import org.richfaces.event.sort.SortListener;
import org.richfaces.model.DataModelCache;
+import org.richfaces.model.Modifiable;
+import org.richfaces.model.ModifiableModel;
+import org.richfaces.model.Ordering;
import org.richfaces.model.ScrollableTableDataModel;
import org.richfaces.model.ScrollableTableDataRange;
+import org.richfaces.model.SortField;
+import org.richfaces.model.SortField2;
import org.richfaces.model.SortOrder;
-import org.richfaces.model.internal.ComponentSortableDataModel;
import org.richfaces.renderkit.html.ScrollableDataTableUtils;
@@ -65,7 +75,7 @@
*
*/
-public abstract class UIScrollableDataTable extends UIDataAdaptor implements AjaxComponent, Sortable, Selectable, ScriptExportable{
+public abstract class UIScrollableDataTable extends SequenceDataAdaptor implements AjaxComponent, Sortable, Selectable, ScriptExportable{
public static final String COMPONENT_TYPE = "org.richfaces.component.ScrollableDataTable";
@@ -189,29 +199,29 @@
}
protected ExtendedDataModel createDataModel() {
-
- Object value = getValue();
-
- ScrollableTableDataModel<?> model = null;
-
- if (value instanceof ScrollableTableDataModel) {
-
- if (log.isDebugEnabled()) {
- log.debug("Found instanceof " + value.getClass() + " will use it unwrapped");
+ ExtendedDataModel model = super.createDataModel();
+ if (model instanceof ScrollableTableDataModel) {
+ if (isCacheable()) {
+ if (log.isDebugEnabled()) {
+ log.debug("Initializing cache of type "
+ + DataModelCache.class);
+ }
+ model = new DataModelCache((ScrollableTableDataModel<?>) model);
}
- model = (ScrollableTableDataModel<?>) value;
-
} else {
- model = new ComponentSortableDataModel(getVar(), value, this.getSortOrder());
- }
-
- if (isCacheable()) {
-
- if (log.isDebugEnabled()) {
- log.debug("Initializing cache of type " + DataModelCache.class);
+ List<SortField2> sortFields = getSortFields();
+ if (sortFields != null && !sortFields.isEmpty()) {
+ Modifiable modifiable = null;
+ if (model instanceof Modifiable) {
+ modifiable = (Modifiable) model;
+ } else {
+ ModifiableModel modifiableModel = new ModifiableModel(
+ model, getVar());
+ model = modifiableModel;
+ modifiable = modifiableModel;
+ }
+ modifiable.modify(null, sortFields);
}
-
- model = new DataModelCache(model);
}
/*
* TODO: Verify - do we really need it
@@ -220,7 +230,45 @@
return model;
}
-
+ private List<SortField2> getSortFields() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ELContext eLContext= context.getELContext();
+ ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
+ String var = getVar();
+ SortOrder sortOrder = getSortOrder();
+ List<SortField2> sortFields2 = null;
+ if (sortOrder != null) {
+ SortField[] sortFields = sortOrder.getFields();
+ sortFields2 = new LinkedList<SortField2>();
+ for (SortField sortField : sortFields) {
+ ValueExpression valueExpression = null;
+ String name = sortField.getName();
+ if (ELUtils.isValueReference(name)) {
+ valueExpression = expressionFactory.createValueExpression(
+ eLContext, name, Object.class);
+ } else if (!name.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) {
+ valueExpression = expressionFactory.createValueExpression(
+ eLContext, "#{" + var + "." + name + "}",
+ Object.class);
+ }
+ Ordering ordering = Ordering.UNSORTED;
+ Boolean ascending = sortField.getAscending();
+ if (ascending != null) {
+ if (ascending) {
+ ordering = Ordering.ASCENDING;
+ } else {
+ ordering = Ordering.DESCENDING;
+ }
+ }
+ if (valueExpression != null
+ && !Ordering.UNSORTED.equals(ordering)) {
+ sortFields2.add(new SortField2(valueExpression, ordering));
+ }
+ }
+ }
+ return sortFields2;
+ }
+
public Object saveState(FacesContext context) {
Object values[] = new Object[4];
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/convert/rowkey/ScrollableDataTableRowKeyConverter.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -43,8 +43,12 @@
public Object getAsObject(FacesContext context, UIComponent component,
String value) {
try {
- int i = Integer.parseInt(value);
- return new SimpleRowKey(i);
+ String prefix = SimpleRowKey.PREFIX;
+ if (value != null && value.startsWith(prefix)) {
+ int i = Integer.parseInt(value.substring(prefix.length()));
+ return new SimpleRowKey(i);
+ }
+ return new Integer(value);
} catch(Exception e) {
throw new ConverterException("Unable to convert value " + value + "to " + SimpleRowKey.class, e);
}
@@ -55,9 +59,8 @@
*/
public String getAsString(FacesContext context, UIComponent component,
Object value) {
- if (value instanceof SimpleRowKey) {
- SimpleRowKey key = (SimpleRowKey) value;
- return key.toString();
+ if (value instanceof SimpleRowKey || value instanceof Integer) {
+ return value.toString();
}
throw new ConverterException("Value " + value + " is not supported by this converter");
}
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java 2008-12-16 13:25:24 UTC (rev 11806)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java 2008-12-16 13:28:07 UTC (rev 11807)
@@ -43,6 +43,7 @@
import org.richfaces.model.DataModelCache;
import org.richfaces.model.SortField;
import org.richfaces.model.SortOrder;
+import org.richfaces.model.impl.ListDataModel;
import org.richfaces.model.selection.Selection;
import org.richfaces.model.selection.SimpleSelection;
@@ -202,7 +203,7 @@
- List l = Collections.singletonList("aaaa");
+ ListDataModel l = new ListDataModel(Collections.singletonList("aaaa"));
table.setValue(l);
ExtendedDataModel model = table.createDataModel();
@@ -216,7 +217,7 @@
table.setValue(null);
model = table.createDataModel();
- assertTrue(model instanceof DataModelCache);
+ assertTrue(model instanceof ExtendedDataModel);
assertEquals(0, model.getRowCount());
16 years, 9 months
JBoss Rich Faces SVN: r11806 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-16 08:25:24 -0500 (Tue, 16 Dec 2008)
New Revision: 11806
Modified:
trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider_init.png
Log:
RF-5287: describeInputNumberSlider 2 new features
Modified: trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider_init.png
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11805 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-16 07:58:48 -0500 (Tue, 16 Dec 2008)
New Revision: 11805
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
Log:
https://jira.jboss.org/jira/browse/RF-5398
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-16 12:41:52 UTC (rev 11804)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-16 12:58:48 UTC (rev 11805)
@@ -60,7 +60,15 @@
// older versions of IE
viewportheight = document.getElementsByTagName('body')[0].clientHeight;
}*/
- return (document.viewport.getDimensions().height + document.viewport.getScrollOffsets().top);
+
+ if( typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0 ) {
+ return document.viewport.getDimensions().height + document.viewport.getScrollOffsets().top;
+ } else {
+ var scrollOffsets = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
+ var innerHeight = self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;
+ return innerHeight + scrollOffsets;
+ }
+
//return viewportheight;
}
16 years, 9 months
JBoss Rich Faces SVN: r11804 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-16 07:41:52 -0500 (Tue, 16 Dec 2008)
New Revision: 11804
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
https://jira.jboss.org/jira/browse/RF-2835
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-12-16 12:30:50 UTC (rev 11803)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-12-16 12:41:52 UTC (rev 11804)
@@ -2096,11 +2096,11 @@
{
this.selectedDate = date;
this.renderHF();
- if (!this.params.popup) this.setInputField(this.getSelectedDateString(this.params.datePattern), null);
+ if (!this.params.popup || !this.showApplyButton) this.setInputField(this.getSelectedDateString(this.params.datePattern), null);
this.invokeEvent("timeselected",null, null, this.selectedDate);
}
}
- if (this.params.popup && !this.showApplyButton && updateTime) this.close(true);
+ if (this.params.popup && !this.showApplyButton) this.close(false);
},
showDateEditor: function()
16 years, 9 months
JBoss Rich Faces SVN: r11803 - in trunk/test-applications/realworld: ejb/src/main/java/org/richfaces/realworld/service and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-16 07:30:50 -0500 (Tue, 16 Dec 2008)
New Revision: 11803
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
trunk/test-applications/realworld/ejb/src/main/resources/import.sql
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/components.xml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
trunk/test-applications/realworld/web/src/main/webapp/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/readMessages.xhtml
trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
trunk/test-applications/realworld/web/src/main/webapp/userPrefs.xhtml
Log:
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -48,7 +48,7 @@
private String theme;
@ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "AUTHOR_ID", nullable = false, updatable = false)
+ @JoinColumn(name = "AUTHOR_ID", updatable = false)
@org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERS_ID")
private User author;
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -93,9 +93,6 @@
private String password;
@Transient
- @NotNull
- @NotEmpty
- @Length(min=3)
private String confirmPassword;
@ManyToMany(mappedBy = "sharedOwners")
@@ -112,7 +109,7 @@
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
- @OneToMany(mappedBy = "owner", cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
+ @OneToMany(mappedBy = "owner", cascade = { CascadeType.ALL}, fetch = FetchType.LAZY)
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
@org.hibernate.annotations.OrderBy(clause = "NAME asc")
private List<Album> childAlbums = new ArrayList<Album>();
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -59,4 +59,9 @@
public void destroy(){
}
+
+ public Album resetAlbum(Album album) {
+ em.refresh(album);
+ return album;
+ }
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -19,4 +19,6 @@
@Destroy
public abstract void destroy();
+ public abstract Album resetAlbum(Album album);
+
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -35,4 +35,6 @@
public abstract void vote(Image image, Long value);
+ public abstract Image resetImage(Image image);
+
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -66,6 +66,7 @@
public void addImage(Image image) {
em.persist(image);
+ image.getAlbum().addImage(image);
em.flush();
}
@@ -94,4 +95,9 @@
image.getRank().setTotal(total);
em.flush();
}
+
+ public Image resetImage(Image image) {
+ em.refresh(image);
+ return image;
+ }
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -9,6 +9,8 @@
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
@@ -22,6 +24,7 @@
/* (non-Javadoc)
* @see org.richfaces.realworld.service.IMessageAction#sendMessage(org.richfaces.realworld.domain.Message)
*/
+ @Transactional(TransactionPropagationType.REQUIRED)
public void sendMessage(Message message){
if(message.getOwnerLogin() != null){
User user = (User)em.createQuery("from User u where u.login = :login")
@@ -40,9 +43,10 @@
/* (non-Javadoc)
* @see org.richfaces.realworld.service.IMessageAction#deleteMessage(org.richfaces.realworld.domain.Message)
*/
+ @Transactional(TransactionPropagationType.REQUIRED)
public void deleteMessage(Message message){
- message = em.merge(message);
- em.remove(message);
+ //message = em.merge(message);
+ //em.remove(message);
message.getOwner().removeMessage(message);
em.flush();
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -57,7 +57,7 @@
}
public void updateUser(User user) {
- em.merge(user);
+ //em.merge(user);
em.flush();
this.user = user;
}
Modified: trunk/test-applications/realworld/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-16 12:30:50 UTC (rev 11803)
@@ -1,7 +1,7 @@
INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (1, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'amarkhel', '12345', '1985-01-08');
INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (2, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'root', '12345', '1985-01-08');
INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (3, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'qqqq', '12345', '1985-01-08');
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (1, 0, 'Album 1', 'Simple Album', true, 1);
+INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (1, 0, 'My dog', 'Photo of my dog', true, 1);
INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (2, 0, 'Album 2', 'Simple Album 2', false, 1);
INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (3, 0, 'Album 3', 'Simple Album 3', false, 1);
INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (4, 0, 'Album 1', 'Simple Album', true, 2);
@@ -29,9 +29,9 @@
INSERT INTO Ranks(rank_id, total, hits) VALUES (19, 110, 13);
INSERT INTO Ranks(rank_id, total, hits) VALUES (20, 160, 21);
INSERT INTO Ranks(rank_id, total, hits) VALUES (21, 100, 21);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (1, 0, 'Picture 1', 'pic1.jpg', 'Just picture', true, '1985-01-08', 1, 1);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (2, 0, 'Picture 2', 'pic2.jpg', 'Just picture', true, '1985-01-08', 1, 2);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (3, 0, 'Picture 33', 'pic3.jpg', 'Just picture', true, '1985-01-08', 1, 3);
+INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (1, 0, 'Funny dog', 'cherri1.jpg', 'Funny dog', true, '1985-01-08', 1, 1);
+INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (2, 0, 'Beauty', 'cherri2.jpg', 'Beauty', true, '1985-01-08', 1, 2);
+INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (3, 0, 'Toy of my dog', 'cherri3.jpg', 'Toy of my dog', true, '1985-01-08', 1, 3);
INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (4, 0, 'Picture 2', 'pic4.jpg', 'Just picture', true, '1985-01-08', 2, 4);
INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (5, 0, 'Picture 3', 'pic5.jpg', 'Just picture', true, '1985-01-08', 2, 5);
INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (6, 0, 'Picture 4', 'pic6.jpg', 'Just picture', true, '1985-01-08', 2, 6);
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -20,7 +20,7 @@
import org.richfaces.realworld.domain.User;
@Name("avatarUpload")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.SESSION)
public class AvatarUpload implements Serializable{
@In(create=true)
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -0,0 +1,21 @@
+package org.richfaces.realworld.fileupload;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("fileLoader")
+(a)Scope(ScopeType.SESSION)
+public class FileLoader {
+
+ @In FileUploadBean fileUploadBean;
+ @Begin(join=true)
+ public synchronized void paint(OutputStream stream, Object object) throws IOException {
+ stream.write(fileUploadBean.getFiles().get((Integer)object).getData());
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -26,13 +26,17 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
+import org.jboss.seam.core.Events;
import org.jboss.seam.faces.FacesMessages;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
@@ -41,33 +45,30 @@
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.tree.TreeActionManager;
import org.richfaces.realworld.tree.TreeSelectionManager;
+import org.richfaces.realworld.util.NavigationEnum;
+import org.richfaces.realworld.util.SelectedImageIndex;
/**
* @author $Autor$
*
*/
@Name("fileUploadBean")
-(a)Scope(ScopeType.CONVERSATION)
-@Synchronized(timeout=2000)
+(a)Scope(ScopeType.SESSION)
+@Synchronized(timeout=5000)
public class FileUploadBean implements Serializable{
- @In @Out
+ @In
private User user;
- @In(create=true)
+ @In(required=false)
private Image selectedImage;
- @In(create=true)
+ @In(required=false)
private Album selectedAlbum;
-
- @In(create=true)
- TreeActionManager treeActionManager;
@In(create=true)
private FileManager fileManager;
- @In FacesMessages facesMessages;
-
private ArrayList<FileItem> files = new ArrayList<FileItem>();
private boolean autoUpload = false;
public int getSize() {
@@ -79,10 +80,8 @@
}
}
- public synchronized void paint(OutputStream stream, Object object) throws IOException {
- stream.write(getFiles().get((Integer)object).getData());
- }
+ @Begin(join=true)
public synchronized void listener(UploadEvent event) throws Exception{
UploadItem item = event.getUploadItem();
FileItem file = new FileItem();
@@ -113,6 +112,7 @@
}
public void storeSelectedData() {
+ List<FileItem> temp = new ArrayList<FileItem>();
for(FileItem file:files){
if(file.isSelected()){
//Save file to disk
@@ -123,9 +123,14 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
- treeActionManager.addImage(file.getImage());
+ Events.instance().raiseEvent("addImage", file.getImage());
+ //files.remove(file);
+ }else{
+ temp.add(file);
}
}
+ files.clear();
+ files.addAll(temp);
}
public void storeAll() {
@@ -139,8 +144,10 @@
e.printStackTrace();
}
//Update domain model
- treeActionManager.addImage(file.getImage());
+ Events.instance().raiseEvent("addImage", file.getImage());
+ //files.remove(file);
}
+ files.clear();
}
public long getTimeStamp(){
@@ -162,6 +169,7 @@
public void setAutoUpload(boolean autoUpload) {
this.autoUpload = autoUpload;
}
+
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -9,8 +9,10 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
@@ -70,7 +72,7 @@
@In(create=true) TreeSelectionManager treeSelectionManager;
- @In(create=true) TreeRootItem treeRoot;
+ @In(create=true) @Out TreeRootItem treeRoot;
private String selectedAlbumName;
@@ -124,18 +126,23 @@
treeRoot.getAvailableAlbums().remove(item);
treeRoot.removeChild(album.getId());
fileManager.deleteDirectory(user.getLogin() + fileManager.getFileSeparator() + albumName);
- selectedImage = null;
- selectedAlbum = null;
+ selectedAlbum = user.getChildAlbums().get(0);
+ selectedImage = selectedAlbum.getImages().get(0);
}
public void deleteImage(Image image){
+ int index = image.getAlbum().getIndex(image);
String albumName = image.getAlbum().getName();
String imagePath = image.getPath();
TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
imageAction.deleteImage(image);
parent.removeChild(image.getId());
fileManager.deleteImage(user.getLogin() + fileManager.getFileSeparator() + albumName + fileManager.getFileSeparator() + imagePath);
- selectedImage = null;
+ if(selectedAlbum.getImages().size() > index){
+ selectedImage = selectedAlbum.getImages().get(index);
+ }else{
+ selectedImage = selectedAlbum.getImages().get(index-1);
+ }
}
public void editImage(Image image){
@@ -158,7 +165,18 @@
imageItem.setImage(image);
}
}
+
+ public void resetImage(Image image){
+ image = imageAction.resetImage(image);
+ selectedImage = image;
+ }
+
+ public void resetAlbum(Album album){
+ album = albumAction.resetAlbum(album);
+ selectedAlbum = album;
+ }
+ @Observer("addImage")
public void addImage(Image image) {
imageAction.addImage(image);
TreeAlbumItem albumItem = treeRoot.getAlbumByName(image.getAlbumName());
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java 2008-12-16 12:30:50 UTC (rev 11803)
@@ -6,6 +6,8 @@
import javax.faces.event.ActionEvent;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
@@ -94,7 +96,7 @@
this.searchRequired = false;
}
- public void initModalPanelData( String actionName, boolean sendRequired, Message message, boolean userSearchRequired){
+ public void initMessage( String actionName, boolean sendRequired, Message message, boolean userSearchRequired){
this.actionName = actionName;
this.sendRequired = sendRequired;
this.searchRequired = userSearchRequired;
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/components.xml 2008-12-16 11:50:16 UTC (rev 11802)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/components.xml 2008-12-16 12:30:50 UTC (rev 11803)
@@ -20,7 +20,7 @@
<core:init debug="true" jndi-pattern="@jndiPattern@"/>
- <core:manager concurrent-request-timeout="500"
+ <core:manager concurrent-request-timeout="2000"
conversation-timeout="120000"
conversation-id-parameter="cid"/>
<persistence:managed-persistence-context name="entityManager"
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/fileUpload.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/readMessages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/userPrefs.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11802 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-16 06:50:16 -0500 (Tue, 16 Dec 2008)
New Revision: 11802
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
https://jira.jboss.org/jira/browse/RF-2835
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-12-16 11:42:39 UTC (rev 11801)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-12-16 11:50:16 UTC (rev 11802)
@@ -2096,6 +2096,7 @@
{
this.selectedDate = date;
this.renderHF();
+ if (!this.params.popup) this.setInputField(this.getSelectedDateString(this.params.datePattern), null);
this.invokeEvent("timeselected",null, null, this.selectedDate);
}
}
16 years, 9 months
JBoss Rich Faces SVN: r11801 - 3 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-12-16 06:42:39 -0500 (Tue, 16 Dec 2008)
New Revision: 11801
Added:
trunk/test-applications/realworld/Upload/amarkhel/Album 3/aston_martin.jpg
Log:
RF-4494: Tutorial about developing this sample application
Added: trunk/test-applications/realworld/Upload/amarkhel/Album 3/aston_martin.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/Upload/amarkhel/Album 3/aston_martin.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r11800 - in trunk/docs/cdkguide/en/src/main/docbook: tags and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-16 06:09:26 -0500 (Tue, 16 Dec 2008)
New Revision: 11800
Added:
trunk/docs/cdkguide/en/src/main/docbook/tags/jspscriptlettag.xml
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Template Tags were added
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-16 11:04:08 UTC (rev 11799)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-16 11:09:26 UTC (rev 11800)
@@ -44,7 +44,7 @@
<!ENTITY cobject SYSTEM "tags/cobject.xml">
<!ENTITY hscripts SYSTEM "tags/hscripts.xml">
<!ENTITY hstyles SYSTEM "tags/hstyles.xml">
-<!ENTITY jspscriptlet SYSTEM "tags/jspscriptlet.xml">
+<!ENTITY jspscriptlet SYSTEM "tags/jspscriptlettag.xml">
<!ENTITY jspdirectivepage SYSTEM "tags/jspdirectivepage.xml">
<!ENTITY jspdeclaration SYSTEM "tags/jspdeclaration.xml">
]>
Added: trunk/docs/cdkguide/en/src/main/docbook/tags/jspscriptlettag.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/tags/jspscriptlettag.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/tags/jspscriptlettag.xml 2008-12-16 11:09:26 UTC (rev 11800)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="jspscriptlet" xreflabel="jspscriptlet">
+ <?dbhtml filename="jspscriptlet.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>jsp:scriptlet</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><jsp:scriptlet></title>
+ <para>
+ The <emphasis role="bold"><property><jsp:scriptlet></property></emphasis> tag inserts its content into the main rendering method.
+ </para>
+</section>
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/tags/jspscriptlettag.xml
___________________________________________________________________
Name: svn:executable
+ *
16 years, 9 months
JBoss Rich Faces SVN: r11799 - in trunk/docs/cdkguide/en/src/main/docbook: tags and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-16 06:04:08 -0500 (Tue, 16 Dec 2008)
New Revision: 11799
Added:
trunk/docs/cdkguide/en/src/main/docbook/tags/hscripts.xml
trunk/docs/cdkguide/en/src/main/docbook/tags/hstyles.xml
trunk/docs/cdkguide/en/src/main/docbook/tags/jspdeclaration.xml
trunk/docs/cdkguide/en/src/main/docbook/tags/jspdirectivepage.xml
Removed:
trunk/docs/cdkguide/en/src/main/docbook/tags/fverbatim.xml
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Template Tags were added
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-16 11:00:32 UTC (rev 11798)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-16 11:04:08 UTC (rev 11799)
@@ -42,6 +42,11 @@
<!ENTITY vcpmock SYSTEM "tags/vcpmock.xml">
<!ENTITY ajaxupdate SYSTEM "tags/ajaxupdate.xml">
<!ENTITY cobject SYSTEM "tags/cobject.xml">
+<!ENTITY hscripts SYSTEM "tags/hscripts.xml">
+<!ENTITY hstyles SYSTEM "tags/hstyles.xml">
+<!ENTITY jspscriptlet SYSTEM "tags/jspscriptlet.xml">
+<!ENTITY jspdirectivepage SYSTEM "tags/jspdirectivepage.xml">
+<!ENTITY jspdeclaration SYSTEM "tags/jspdeclaration.xml">
]>
<book>
@@ -221,5 +226,12 @@
&vcpbody;
&vcpmock;
+&hscripts;
+&hstyles;
+
+&jspdeclaration;
+&jspdirectivepage;
+&jspscriptlet;
+
</chapter>
</book>
Deleted: trunk/docs/cdkguide/en/src/main/docbook/tags/fverbatim.xml
===================================================================
Added: trunk/docs/cdkguide/en/src/main/docbook/tags/hscripts.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/tags/hscripts.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/tags/hscripts.xml 2008-12-16 11:04:08 UTC (rev 11799)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="hscripts" xreflabel="hscripts">
+ <?dbhtml filename="hscripts.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>h:scripts</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><h:scripts></title>
+ <para>
+ The <emphasis role="bold"><property><h:scripts></property></emphasis> tag defines a static resource or class for JavaScript that is added to a page at rendering time.
+ </para>
+</section>
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/tags/hscripts.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/docbook/tags/hstyles.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/tags/hstyles.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/tags/hstyles.xml 2008-12-16 11:04:08 UTC (rev 11799)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="hstyles" xreflabel="hstyles">
+ <?dbhtml filename="hstyles.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>h:styles</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><h:styles></title>
+ <para>
+ The <emphasis role="bold"><property><h:styles></property></emphasis> tag defines a CSS or XCSS resource that is added to a page at rendering time.
+ </para>
+</section>
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/tags/hstyles.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/docbook/tags/jspdeclaration.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/tags/jspdeclaration.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/tags/jspdeclaration.xml 2008-12-16 11:04:08 UTC (rev 11799)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="jspdeclaration" xreflabel="jspdeclaration">
+ <?dbhtml filename="jspdeclaration.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>jsp:declaration</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><jsp:declaration /></title>
+ <para>
+ The <emphasis role="bold"><property><jsp:declaration /></property></emphasis> tag declares a Java code that is inserted in a renderer class.
+ </para>
+</section>
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/tags/jspdeclaration.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/docbook/tags/jspdirectivepage.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/tags/jspdirectivepage.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/tags/jspdirectivepage.xml 2008-12-16 11:04:08 UTC (rev 11799)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="jspdirectivepage" xreflabel="jspdirectivepage">
+ <?dbhtml filename="jspdirectivepage.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>jsp:directive.page</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><jsp:directive.page /></title>
+ <para>
+ The <emphasis role="bold"><property><jsp:directive.page /></property></emphasis> tag allows you to import classes or packages in a renderer class.
+ </para>
+ <table>
+ <title>The <jsp:directive.page /> attributes</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Attribute Name</entry>
+ <entry>Description</entry>
+ <entry>Required</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>extends</entry>
+ <entry>Defines a base class for the imported classes</entry>
+ <entry>False</entry>
+ </row>
+ <row>
+ <entry>import</entry>
+ <entry>Defines classes or packages that are imported in a renderer class</entry>
+ <entry>True</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+</section>
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/tags/jspdirectivepage.xml
___________________________________________________________________
Name: svn:executable
+ *
16 years, 9 months
JBoss Rich Faces SVN: r11798 - trunk/samples/extendedDataTable-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-16 06:00:32 -0500 (Tue, 16 Dec 2008)
New Revision: 11798
Modified:
trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
Log:
removed column with select input
Modified: trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-12-16 10:58:52 UTC (rev 11797)
+++ trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-12-16 11:00:32 UTC (rev 11798)
@@ -92,16 +92,6 @@
</f:facet>
<h:outputText value="#{patient.admissionDate}" />
</rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="#{msg['select']}" />
- </f:facet>
- <h:selectOneMenu onclick="Event.stop(event);">
- <f:selectItem itemValue="1" itemLabel="1" />
- <f:selectItem itemValue="2" itemLabel="2" />
- <f:selectItem itemValue="3" itemLabel="3" />
- </h:selectOneMenu>
- </rich:column>
<f:facet name="footer">
<rich:datascroller
16 years, 9 months
JBoss Rich Faces SVN: r11797 - trunk/ui/dataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-16 05:58:52 -0500 (Tue, 16 Dec 2008)
New Revision: 11797
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java
Log:
https://jira.jboss.org/jira/browse/RF-5041
changed methods for "rendered" attribute
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java 2008-12-16 10:57:02 UTC (rev 11796)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java 2008-12-16 10:58:52 UTC (rev 11797)
@@ -66,12 +66,22 @@
//This code block adds support for visible attribute of the column component
@Override
public boolean isRendered() {
- return super.isRendered() && isVisible();
+ return isRendered(true);
}
- @Override
- public void setRendered(boolean rendered) {
- super.setRendered(rendered);
+ /**
+ * Check if component is rendered.
+ * Consider "rendered" attribute and optionally depend on parameter consider "visible" attribute.
+ * @author PGolawski
+ * @param considerVisible consider "visible" attribute
+ * @return attribute "rendered" value
+ */
+ public boolean isRendered(boolean considerVisible) {
+ boolean rendered = super.isRendered();
+ if (considerVisible) {
+ rendered = (rendered && isVisible());
+ }
+ return rendered;
}
//
16 years, 9 months
JBoss Rich Faces SVN: r11796 - in trunk/ui/extendedDataTable/src/main/java/org/richfaces: renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-16 05:57:02 -0500 (Tue, 16 Dec 2008)
New Revision: 11796
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-5041
https://jira.jboss.org/jira/browse/RF-5279
https://jira.jboss.org/jira/browse/RF-5171
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-16 10:43:14 UTC (rev 11795)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-16 10:57:02 UTC (rev 11796)
@@ -260,31 +260,25 @@
private static final String DEFAULT_WIDTH = "100";
- private JSONMap value;
+ private JSONObject value;
private ColumnsSizeState() {
super();
}
- static ColumnsSizeState getColumnsSize(UIExtendedDataTable extendedDataTable, JSONMap map){
+ static ColumnsSizeState getColumnsSize(UIExtendedDataTable extendedDataTable, JSONMap state){
ColumnsSizeState columnsSize = new ColumnsSizeState();
- columnsSize.init(extendedDataTable, map);
+ columnsSize.init(extendedDataTable, state);
return columnsSize;
}
/**
* Converts its state from String representation or create default state if it is not set.
*/
- private void init(UIExtendedDataTable extendedDataTable, JSONMap map){
+ private void init(UIExtendedDataTable extendedDataTable, JSONMap state){
value = null;
- if ((map != null) && (map.size()>0)){
-// //try to restore state from string
- value = map;
-// try {
-// value = new JSONMap(val);
-// } catch (JSONException e) {
-// e.printStackTrace();
-// }
+ if ((state != null) && (state.size()>0)){
+ value = new JSONObject(state);
}
if (value == null){
@@ -307,7 +301,7 @@
* @return JSON object contains state
*/
public JSONMap toJSON(){
- return value;
+ return new JSONMap(value);
}
/**
@@ -320,7 +314,7 @@
UIColumn col = iter.next();
writer.key(col.getId()).value(getDefaultColumnSize(col));
}
- value = new JSONMap(writer.endObject().toString());
+ value = new JSONObject(writer.endObject().toString());
} catch (JSONException e) {
e.printStackTrace();
}
@@ -334,7 +328,7 @@
public String getColumnSize(UIComponent column){
if (value == null)
return getDefaultColumnSize(column);
- String res = (String)value.get(column.getId());
+ String res = (String)value.opt(column.getId());
if (res == null){
res = getDefaultColumnSize(column);
}
@@ -348,15 +342,19 @@
public void changeColumnSize(UIExtendedDataTable extendedDataTable, String newValue){
if (value == null)
return;
- String[] newWidths = newValue.split(";");
- int index = 0;
- for (Iterator<UIColumn> iter = extendedDataTable.getSortedColumns(); iter.hasNext();) {
- UIComponent col = (UIComponent) iter.next();
- if (col.isRendered()){
- String colId = col.getId();
- value.put(colId, newWidths[index++]);
- }//if
- }//for
+ try {
+ String[] newWidths = newValue.split(";");
+ int index = 0;
+ for (Iterator<UIColumn> iter = extendedDataTable.getSortedColumns(); iter.hasNext();) {
+ UIComponent col = (UIComponent) iter.next();
+ if (col.isRendered()){
+ String colId = col.getId();
+ value.put(colId, newWidths[index++]);
+ }//if
+ }//for
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
}//changeColumnSize
}//ColumnsSizeState
@@ -389,13 +387,8 @@
private void init(UIExtendedDataTable extendedDataTable, JSONCollection collection){
value = null;
if ((collection != null) && (collection.size()>0)){
- //try to restore state from string
+ //try to restore state from collection
value = new JSONArray(collection);
-// try {
-// value = new JSONArray(val);
-// } catch (JSONException e) {
-// e.printStackTrace();
-// }
}
if (value == null){
@@ -511,12 +504,10 @@
private static final long serialVersionUID = -3923409650272094713L;
- //private static final String SEP = ";";
-
private static final String TRUE = "1";
private static final String FALSE = "0";
- private JSONMap value;
+ private JSONObject value;
private ColumnsVisibility() {
super();
@@ -528,32 +519,24 @@
return columnsVisibility;
}
- static ColumnsVisibility getColumnsVisibility(UIExtendedDataTable extendedDataTable, JSONMap map){
+ static ColumnsVisibility getColumnsVisibility(UIExtendedDataTable extendedDataTable, JSONMap state){
ColumnsVisibility columnsVisibility = new ColumnsVisibility();
- columnsVisibility.init(extendedDataTable, map);
+ columnsVisibility.init(extendedDataTable, state);
return columnsVisibility;
}
/**
* Converts its state from String representation or create default state if it is not set.
*/
- private void init(UIExtendedDataTable extendedDataTable, JSONMap map){
+ private void init(UIExtendedDataTable extendedDataTable, JSONMap state){
value = null;
- if ((map != null) && (map.size()>0)){
- value = map;
+ if ((state != null) && (state.size()>0)){
+ value = new JSONObject(state);
}
if (value == null){
createDefaultColumnsVisibility(extendedDataTable);
}
- //set visibility flag for all columns
- for (Iterator<UIColumn> iter = extendedDataTable.getChildColumns(); iter.hasNext();) {
- UIColumn child = iter.next();
- if (child instanceof UIColumn) {
- UIColumn dataColumn = (UIColumn) child;
- dataColumn.setVisible(isVisible(dataColumn.getId()));
- }//if
- }//for
}//init
/**
@@ -571,7 +554,7 @@
* @return JSON object contains state
*/
public JSONMap toJSON(){
- return value;
+ return new JSONMap(value);
}
/**
@@ -582,9 +565,9 @@
JSONWriter writer = new JSONStringer().object();
for (Iterator<UIColumn> iter = extendedDataTable.getChildColumns(); iter.hasNext();) {
UIColumn col = iter.next();
- writer.key(col.getId()).value(TRUE);
+ writer.key(col.getId()).value(col.isVisible() ? TRUE : FALSE);
}
- value = new JSONMap(writer.endObject().toString());
+ value = new JSONObject(writer.endObject().toString());
} catch (JSONException e) {
e.printStackTrace();
}
@@ -598,7 +581,7 @@
boolean isVisible(String columnId){
if (value == null)
return true;
- return TRUE.equals(value.get(columnId));
+ return !FALSE.equals(value.opt(columnId));
}//isVisible
/**
@@ -614,9 +597,7 @@
for (Iterator<UIColumn> iter = extendedDataTable.getChildColumns(); iter.hasNext();) {
UIColumn col = iter.next();
if (col.getId().equalsIgnoreCase(columnId)){
- if (col instanceof UIColumn){
- column = (UIColumn) col;
- }
+ column = (UIColumn) col;
break;
}//if
}//for
@@ -625,9 +606,13 @@
boolean visible = column.isVisible();
//toggle visibility
visible = !visible;
- //set visibility flag for column
- column.setVisible(visible);
- value.put(columnId, (visible ? TRUE : FALSE));
+ try {
+ value.put(columnId, (visible ? TRUE : FALSE));
+ //set visibility flag for column
+ column.setVisible(visible);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
}//changeVisibility
}//ColumnsVisibility
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-16 10:43:14 UTC (rev 11795)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-16 10:57:02 UTC (rev 11796)
@@ -331,8 +331,8 @@
for (Iterator<UIComponent> iterator = list.iterator(); iterator
.hasNext();) {
UIComponent component = iterator.next();
- if (component instanceof org.richfaces.component.UIColumn) {
- org.richfaces.component.UIColumn column = (org.richfaces.component.UIColumn) component;
+ if (component instanceof UIColumn) {
+ UIColumn column = (UIColumn) component;
FilterField filterField = column.getFilterField();
if (filterField != null) {
filterFields.add(filterField);
@@ -417,4 +417,25 @@
return chain;
}
+ @Override
+ public void beforeRenderResponse(FacesContext context) {
+ super.beforeRenderResponse(context);
+
+ for (Iterator<UIColumn> columns = getChildColumns(); columns
+ .hasNext();) {
+ UIColumn column = columns.next();
+ column.setId(column.getId());
+ column.setVisible(isColumnVisible(column));
+ }
+
+ UIColumn groupingColumn = getGroupByColumn();
+ if (groupingColumn != null) {// grouping is on
+ if (groupingColumn.getSortOrder().equals(Ordering.UNSORTED)) {
+ groupingColumn.setSortOrder(Ordering.ASCENDING);
+ }
+ }
+ }
+
+
+
}
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-12-16 10:43:14 UTC (rev 11795)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-12-16 10:57:02 UTC (rev 11796)
@@ -265,15 +265,12 @@
boolean enabled = false;
while (columns.hasNext()) {
UIColumn col = columns.next();
- if (col instanceof UIColumn) {
- UIColumn dataColumn = (UIColumn) col;
- if ((internalFilterEnabledColumn(dataColumn) || (dataColumn.getFacet("filter") != null)) &&
- dataColumn.isRendered()
- ) {
- enabled = true;
- break;
- }
- }
+ if ((internalFilterEnabledColumn(col) || (col.getFacet("filter") != null)) &&
+ col.isRendered()
+ ) {
+ enabled = true;
+ break;
+ }
}
return enabled;
}
@@ -1078,35 +1075,6 @@
+ ".preSendAjaxRequest");
}
- protected void preDecode(FacesContext context, UIComponent component) {
- if (component instanceof UIExtendedDataTable) {
- UIExtendedDataTable table = (UIExtendedDataTable) component;
- table.ensureTableStateInitialized();
- }
- super.preDecode(context, component);
- }
-
- protected void preEncodeBegin(FacesContext context, UIComponent component)
- throws IOException {
- if (component instanceof UIExtendedDataTable) {
- UIExtendedDataTable table = (UIExtendedDataTable) component;
-
- for (Iterator<UIColumn> columns = table.getChildColumns(); columns
- .hasNext();) {
- UIColumn column = columns.next();
- column.setId(column.getId());
- }
-
- if (table.isGroupingOn()) {// grouping is on
- UIColumn column = table.getGroupByColumn();
- if (column.getSortOrder().equals(Ordering.UNSORTED)){
- column.setSortOrder(Ordering.ASCENDING);
- }
- }
- }
- super.preEncodeBegin(context, component);
- }
-
protected void doDecode(FacesContext context, UIComponent component) {
super.doDecode(context, component);
composite.decode(context, component);
@@ -1788,13 +1756,10 @@
for (Iterator<UIColumn> colums = table.getSortedColumns(); colums
.hasNext();) {
UIColumn col = colums.next();
- if (col instanceof UIColumn) {
- UIColumn column = (UIColumn) col;
- // if (column.isRendered()){
- String menuId = menuRenderer.renderMenu(context, table, column);
- ajaxContext.addRenderedArea(menuId);
- // }
- }
+ if (col.isRendered()) {
+ String menuId = menuRenderer.renderMenu(context, table, col);
+ ajaxContext.addRenderedArea(menuId);
+ }
}// for
table.setRowKey(key);
}
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java 2008-12-16 10:43:14 UTC (rev 11795)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java 2008-12-16 10:57:02 UTC (rev 11796)
@@ -56,7 +56,7 @@
groupingColumnLabel = "";
if (groupingOn){
groupingColumn = table.getGroupByColumn();
- if ((groupingColumn != null) && (groupingColumn instanceof UIColumn)){
+ if (groupingColumn != null){
groupingColumnLabel = (String)groupingColumn.getAttributes().get("label");;
}
}
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2008-12-16 10:43:14 UTC (rev 11795)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2008-12-16 10:57:02 UTC (rev 11796)
@@ -300,14 +300,13 @@
*/
protected void buildMenuItem(UIComponent parent, UIColumn col)
throws IOException {
- if (((Boolean)col.getAttributes().get("rendered")) && (col instanceof UIColumn)) {
- UIColumn dataColumn = (UIColumn) col;
+
+ if (col.isRendered(false)) {
UIMenuItem menuItem = (UIMenuItem) context.getApplication()
.createComponent(UIMenuItem.COMPONENT_TYPE);
menuItem.setSubmitMode("none");
- Boolean v = dataColumn.isVisible();
- boolean columnVisible = (v == null ? Boolean.TRUE : v);
+ boolean columnVisible = col.isVisible();
String actionScript = null;
StringBuilder actionScriptBuilder = new StringBuilder();
@@ -324,10 +323,10 @@
actionScript = actionScriptBuilder.toString();
if (actionScript.contains("{columnId}"))
actionScript = actionScript.replace("{columnId}",
- dataColumn.getId());
+ col.getId());
}
}// if
- String label = (String)dataColumn.getAttributes().get("label");
+ String label = (String)col.getAttributes().get("label");
menuItem.setValue(label == null ? "" : label);
menuItem.setIcon(columnVisible ? iconCheckedURI : iconUncheckedURI);
if (menuItem instanceof HtmlMenuItem) {
16 years, 9 months
JBoss Rich Faces SVN: r11795 - in trunk/test-applications/seleniumTest/richfaces/src: main/java/org/ajax4jsf/listener and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-16 05:43:14 -0500 (Tue, 16 Dec 2008)
New Revision: 11795
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/successNavigation.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testByPassList.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testEvents.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testLimitToList.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testTemplate.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/listener/AjaxSupportActionListener.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
Log:
RF-5314, RF-5315, RF-5316, RF-5317
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java 2008-12-16 10:33:32 UTC (rev 11794)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JSupport.java 2008-12-16 10:43:14 UTC (rev 11795)
@@ -26,6 +26,12 @@
private String data = null;
+ private boolean checkboxValue1;
+
+ private boolean checkboxValue2;
+
+ private String status = Messages.IDLE_STATUS;
+
/** property for testUpdatingValue */
private String inputValue = A4JSupport.Messages.INPUT_VALUE;
@@ -49,14 +55,20 @@
public static final String VALID_MESSAGE = "field is required";
public static final String INPUT_VALUE = "test";
+
+ public static final String IDLE_STATUS = "idle";
+
+ public static final String PROCESSING_STATUS = "process";
}
public void linkListener (ActionEvent event) {
data = Messages.TEST_PASSED;
+ status = Messages.PROCESSING_STATUS;
}
public void checkBoxListener (ActionEvent event) {
data = Messages.TEST_PASSED;
+ status = Messages.PROCESSING_STATUS;
}
public void commandListener (ActionEvent event) {
@@ -93,4 +105,48 @@
this.inputValue = inputValue;
}
+ /**
+ * @return the status
+ */
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * @param status the status to set
+ */
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ /**
+ * @return the checkboxValue1
+ */
+ public boolean isCheckboxValue1() {
+ return checkboxValue1;
+ }
+
+ /**
+ * @param checkboxValue1 the checkboxValue1 to set
+ */
+ public void setCheckboxValue1(boolean checkboxValue1) {
+ this.checkboxValue1 = checkboxValue1;
+ }
+
+ /**
+ * @return the checkboxValue2
+ */
+ public boolean isCheckboxValue2() {
+ return checkboxValue2;
+ }
+
+ /**
+ * @param checkboxValue2 the checkboxValue2 to set
+ */
+ public void setCheckboxValue2(boolean checkboxValue2) {
+ this.checkboxValue2 = checkboxValue2;
+ }
+
+
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/listener/AjaxSupportActionListener.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/listener/AjaxSupportActionListener.java 2008-12-16 10:33:32 UTC (rev 11794)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/listener/AjaxSupportActionListener.java 2008-12-16 10:43:14 UTC (rev 11795)
@@ -43,6 +43,7 @@
A4JSupport bean = (A4JSupport) FacesUtils.getFacesBean(A4JSupport.BEAN_NAME);
if (bean != null) {
bean.setData(str);
+ bean.setStatus(Messages.PROCESSING_STATUS);
}
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-12-16 10:33:32 UTC (rev 11794)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-12-16 10:43:14 UTC (rev 11795)
@@ -306,4 +306,11 @@
<to-view-id>/pages/ajaxInclude/step1.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>navigate</from-outcome>
+ <to-view-id>/pages/ajaxSupport/successNavigation.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
</faces-config>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/successNavigation.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/successNavigation.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testByPassList.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testByPassList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testEvents.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testEvents.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testLimitToList.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testLimitToList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testTemplate.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxSupport/testTemplate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-12-16 10:33:32 UTC (rev 11794)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxSupportTest.java 2008-12-16 10:43:14 UTC (rev 11795)
@@ -20,7 +20,11 @@
*/
package org.richfaces.testng;
+import java.util.ArrayList;
+import java.util.List;
+
import org.ajax4jsf.bean.A4JSupport;
+import org.ajax4jsf.bean.A4JSupport.Messages;
import org.ajax4jsf.template.Template;
import org.bouncycastle.asn1.pkcs.KeyDerivationFunc;
import org.richfaces.SeleniumTestBase;
@@ -50,6 +54,8 @@
private static final String AJAXSINGLE_ATTRIBUTE2_PAGE = "testAjaxSingleAttribute2.xhtml";
+ private static final String AJAXSINGLE_ATTRIBUTE3_PAGE = "testAjaxSingleAttribute3.xhtml";
+
private static final String RERENDER_ATTRIBUTE_PAGE = "testRerenderFunctionality.xhtml";
private static final String ENABLED_ATTRIBUTE_PAGE = "testEnabledAttribute.xhtml";
@@ -58,6 +64,12 @@
private static final String UPDATING_VALUE = "testUpdatingValue.xhtml";
+ private static final String EVENTS_PAGE = "testEvents.xhtml";
+
+ private static final String LIMIT_TO_LIST_ATTRIBUTE_PAGE = "testLimitToList.xhtml";
+
+ private static final String BY_PASS_UPDATES_ATTRIBUTE_PAGE = "testByPassList.xhtml";
+
private static final String DEFAULT_BEHAVIOUR_ID_PREFIX = "_db";
private static final String VALIDATION_FAILED_ID_PREFIX = "_vf";
@@ -196,20 +208,32 @@
//
// }
//
-// /** component with bypassUpdates = true skips update model values phase */
-// @Test
-// public void testByPassAttribute() {
-//
-// }
-//
-//
-//
-// /** component with limitToList = true skips ajaxRendered areas update */
-// @Test
-// public void testLimitToListAttribute() {
-//
-// }
-//
+ /** component with bypassUpdates = true skips update model values phase */
+ @Test
+ public void testByPassAttribute(Template template) {
+ setTestUrl(BY_PASS_UPDATES_ATTRIBUTE_PAGE);
+ init(template);
+ passExternalValidation();
+ processingElement(checkboxId, dataId2, false);
+ AssertTextEquals(dataId2 + "_ch", "false", "By pass updates attribute not work" );
+ processingElement(checkboxId + COMMON_ALISTENER_PREFIX, dataId2 + COMMON_ALISTENER_PREFIX, false);
+ AssertTextEquals(dataId2 + COMMON_ALISTENER_PREFIX + "_ch", "false", "By pass updates attribute not work" );
+
+ }
+
+
+
+ /** component with limitToList = true skips ajaxRendered areas update */
+ @Test
+ public void testLimitToListAttribute(Template template) {
+ setTestUrl(LIMIT_TO_LIST_ATTRIBUTE_PAGE);
+ init(template);
+ passExternalValidation();
+ checkBasicFunctionality(template, "", false);
+ AssertTextEquals(parentFormId + "ajax_status", Messages.IDLE_STATUS,
+ "Limit to list attribute not work");
+ }
+
/** component with rendered = false is not present on the page */
@Test
public void testRenderedAttribute(Template template) {
@@ -221,15 +245,35 @@
checkOnclickAttr(checkboxId + RENDERED_ATTRIBUTE_ID_PREFIX);
checkOnclickAttr(checkboxId + COMMON_ALISTENER_PREFIX + RENDERED_ATTRIBUTE_ID_PREFIX);
}
-//
-// /**
-// * onsubmit event fires on component activation then
-// * oncomplete with proper request data
-// */
-// @Test
-// public void testOnSubmitEvent1() {
-//
-// }
+
+ /**
+ * onsubmit event fires on component activation then
+ * oncomplete with proper request data
+ */
+ @Test
+ public void testOnSubmitAndOnCOmpleteEvents(Template template) {
+ setTestUrl(EVENTS_PAGE);
+ init(template);
+ passExternalValidation();
+ processingElement(linkId, dataId1, false);
+ assertEvents();
+ processingElement(linkId + COMMON_ALISTENER_PREFIX, dataId1 + COMMON_ALISTENER_PREFIX, false);
+ assertEvents();
+ processingElement(checkboxId, dataId2, false);
+ assertEvents();
+ processingElement(checkboxId + COMMON_ALISTENER_PREFIX, dataId2 + COMMON_ALISTENER_PREFIX, false);
+ assertEvents();
+
+ }
+
+ private void assertEvents(){
+ List<String> eventsExpected = new ArrayList<String>();
+
+ eventsExpected.add("onsubmit");
+ eventsExpected.add("oncomplete");
+ assertEvents(eventsExpected);
+ }
+
/** component with disabled = true do not fire ajax requests */
@Test
public void testEnabledAttribute(Template template) {
@@ -257,17 +301,21 @@
writeStatus(CommonUtils.getSuccessfulTestMessage(iid));
}
-// /**
-// * @see #testAjaxSupportComponent()
-// *
-// * the same for ajaxSingle = true component for the case
-// * of external validation failure + process for validation failed
-// * field - listeners and navigation do not work
-// */
-// @Test
-// public void testAjaxSingleAttribute3() {
-//
-// }
+ /**
+ * @see #testAjaxSupportComponent()
+ *
+ * the same for ajaxSingle = true component for the case
+ * of external validation failure + process for validation failed
+ * field - listeners and navigation do not work
+ */
+ @Test
+ public void testAjaxSingleAttribute3(Template template) {
+ setTestUrl(AJAXSINGLE_ATTRIBUTE3_PAGE);
+ init(template);
+ breakExternalValidation();
+ checkBasicFunctionality(template, "", false);
+ AssertNotPresent(getParentId() + "successNavigationTextId", "Navigation shouldn't work");
+ }
private void checkOnclickAttr(String elementId) {
16 years, 9 months
JBoss Rich Faces SVN: r11794 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-16 05:33:32 -0500 (Tue, 16 Dec 2008)
New Revision: 11794
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
Log:
Fix compilation error
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-15 19:48:41 UTC (rev 11793)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-16 10:33:32 UTC (rev 11794)
@@ -35,10 +35,6 @@
private String string3;
- private String string2;
-
- private String string3;
-
private Boolean rendered;
private Boolean showDetail;
@@ -69,14 +65,6 @@
return null;
}
- public String addGlobalMessage() {
- FacesContext.getCurrentInstance().addMessage(
- null,
- new FacesMessage(FacesMessage.SEVERITY_INFO, "globalMessageSummary",
- "globalMessageDetail"));
- return null;
- }
-
public void validate(FacesContext context, UIComponent component,
Object value) throws ValidatorException {
Severity severity = null;
16 years, 9 months
JBoss Rich Faces SVN: r11793 - trunk/ui/pickList/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-15 14:48:41 -0500 (Mon, 15 Dec 2008)
New Revision: 11793
Modified:
trunk/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
https://jira.jboss.org/jira/browse/RF-2239
Modified: trunk/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-12-15 19:39:52 UTC (rev 11792)
+++ trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-12-15 19:48:41 UTC (rev 11793)
@@ -160,9 +160,7 @@
<script type="text/javascript">
- var clientId = '#{clientId}';
- RichShuttleUtils.execOnLoad(
- function(){
+ var clientId = '#{clientId}';
new Richfaces.PickList(
new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
new Richfaces.PickList.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
@@ -171,9 +169,6 @@
onfocus:#{this:getAsEventHandler(context, component, "onfocus")},
onblur:#{this:getAsEventHandler(context, component, "onblur")}},
"#{clientId}valueKeeper");
- },
- RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
- );
</script>
</span>
</f:root>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11792 - trunk/samples/dragDropDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-15 14:39:52 -0500 (Mon, 15 Dec 2008)
New Revision: 11792
Modified:
trunk/samples/dragDropDemo/src/main/webapp/pages/index.jsp
Log:
https://jira.jboss.org/jira/browse/RF-5388
https://jira.jboss.org/jira/browse/RF-961
Modified: trunk/samples/dragDropDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/dragDropDemo/src/main/webapp/pages/index.jsp 2008-12-15 19:39:23 UTC (rev 11791)
+++ trunk/samples/dragDropDemo/src/main/webapp/pages/index.jsp 2008-12-15 19:39:52 UTC (rev 11792)
@@ -109,7 +109,7 @@
<h:panelGrid styleClass="dropzoneDecoration" id="drag2">
<h:outputText value="#{type} - drag" />
- <dnd:dragSupport ajaxSingle="true" dragType="#{type}" dragValue="#{type} - value" action="#{bean.dragAction}" dragListener="#{bean.processDrag}">
+ <dnd:dragSupport dragType="#{type}" dragValue="#{type} - value" action="#{bean.dragAction}" dragListener="#{bean.processDrag}">
<a4j:actionparam value="#{type} - test drag param" assignTo="#{bean.testParam}" />
</dnd:dragSupport>
</h:panelGrid>
@@ -124,6 +124,7 @@
<h:outputText value="#{type} - drop" />
<dnd:dropSupport ajaxSingle="true" reRender="regionsDragValueText" action="#{bean.dropAction}" acceptedTypes="#{type}" dropListener="#{bean.processDrop}" dropValue="#{type} - value">
+ <a4j:actionparam value="#{type} - test drop param" assignTo="#{bean.testParam}" />
</dnd:dropSupport>
</h:panelGrid>
</a4j:region>
@@ -161,7 +162,7 @@
<h:panelGrid styleClass="dropzoneDecoration" id="drag3">
<h:outputText value="#{type} - drag" />
- <dnd:dragSupport ajaxSingle="true" dragType="#{type}" dragValue="#{type} - value" action="#{bean.dragAction}" dragListener="#{bean.processDrag}">
+ <dnd:dragSupport dragType="#{type}" dragValue="#{type} - value" action="#{bean.dragAction}" dragListener="#{bean.processDrag}">
<a4j:actionparam value="#{type} - test drag param" assignTo="#{bean.testParam}" />
</dnd:dragSupport>
</h:panelGrid>
@@ -176,6 +177,7 @@
<h:outputText value="#{type} - drop" />
<dnd:dropSupport ajaxSingle="true" reRender="formsDragValueText" action="#{bean.dropAction}" acceptedTypes="#{type}" dropListener="#{bean.processDrop}" dropValue="#{type} - value">
+ <a4j:actionparam value="#{type} - test drop param" assignTo="#{bean.testParam}" />
</dnd:dropSupport>
</h:panelGrid>
</h:form>
16 years, 9 months
JBoss Rich Faces SVN: r11791 - trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-15 14:39:23 -0500 (Mon, 15 Dec 2008)
New Revision: 11791
Removed:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java
Modified:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
Log:
https://jira.jboss.org/jira/browse/RF-5388
https://jira.jboss.org/jira/browse/RF-961
Deleted: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java 2008-12-15 19:36:12 UTC (rev 11790)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java 2008-12-15 19:39:23 UTC (rev 11791)
@@ -1,67 +0,0 @@
-/**
- * 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.renderkit;
-
-import java.text.MessageFormat;
-import java.util.Set;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.richfaces.component.Draggable;
-import org.richfaces.component.Dropzone;
-import org.richfaces.component.util.MessageUtil;
-
-/**
- * @author Nick - mailto:nbelaevski@exadel.com
- * created 06.02.2007
- *
- */
-class DnDValidator {
- private final static String MESSAGE_FORMAT = "Dropzone [{0}] with accepted types {1} cannot accept Draggable [{2}] with dragType [{3}]";
-
- static boolean validateAcceptTypes(FacesContext context, Draggable draggable, Dropzone dropzone, String dragType, Object acceptedTypes) {
- Set<String> set = AjaxRendererUtils.asSet(acceptedTypes);
- if (set == null || !set.contains(dragType)) {
- UIComponent component = (UIComponent) dropzone;
- String text = MessageFormat.format(
- MESSAGE_FORMAT,
- new Object[] {
- MessageUtil.getLabel(context, component),
- set,
- MessageUtil.getLabel(context, (UIComponent) draggable),
- dragType});
-
- FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, text, text);
-
- context.addMessage(component.getClientId(context), message);
-
- context.renderResponse();
-
- return false;
- }
-
- return true;
- }
-}
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2008-12-15 19:36:12 UTC (rev 11790)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2008-12-15 19:39:23 UTC (rev 11791)
@@ -21,6 +21,7 @@
package org.richfaces.renderkit;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -107,17 +108,14 @@
DraggableOptions options = new DraggableOptions(draggable);
- Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component,
+ Collections.singletonMap(DRAG_SOURCE_ID, (Object) component.getClientId(context)));
Map parameters = (Map) eventOptions.get("parameters");
if (parameters == null) {
parameters = new HashMap();
}
- String clientId = component.getClientId(context);
-
- parameters.put(DRAG_SOURCE_ID, clientId);
-
options.addOption("parameters", parameters);
String indicatorId = draggable.getResolvedDragIndicator(context);
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2008-12-15 19:36:12 UTC (rev 11790)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2008-12-15 19:39:23 UTC (rev 11791)
@@ -21,9 +21,12 @@
package org.richfaces.renderkit;
+import java.text.MessageFormat;
import java.util.Map;
+import java.util.Set;
import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
import javax.faces.component.ContextCallback;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -38,6 +41,7 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.component.Draggable;
import org.richfaces.component.Dropzone;
+import org.richfaces.component.util.MessageUtil;
import org.richfaces.event.DragEvent;
import org.richfaces.event.DropEvent;
import org.richfaces.json.JSONCollection;
@@ -143,39 +147,79 @@
private Dropzone dropzone;
- public DraggableDecoderContextCallback(Dropzone dropzone) {
+ private Draggable draggable;
+
+ private String dragType;
+
+ private Object dragValue;
+
+ private Object acceptedTypes;
+
+ private Object dropValue;
+
+ private boolean valid = true;
+
+ private Object draggableLabel;
+
+ public DraggableDecoderContextCallback(Dropzone dropzone, Object acceptedTypes, Object dropValue) {
super();
this.dropzone = dropzone;
+ this.acceptedTypes = acceptedTypes;
+ this.dropValue = dropValue;
}
+ private boolean validateAcceptTypes(String dragType, Object acceptedTypes) {
+ Set<String> set = AjaxRendererUtils.asSet(acceptedTypes);
+ return (set != null && set.contains(dragType));
+ }
+
public void invokeContextCallback(FacesContext context,
UIComponent target) {
- Draggable draggable = (Draggable) target;
+ this.draggable = (Draggable) target;
- String dragType = draggable.getDragType();
- Object acceptedTypes = dropzone.getAcceptedTypes();
+ this.dragType = draggable.getDragType();
+ this.dragValue = draggable.getDragValue();
+
+ if (validateAcceptTypes(dragType, acceptedTypes)) {
- if (DnDValidator.validateAcceptTypes(context,
- draggable, dropzone,
- dragType, acceptedTypes)) {
-
DragEvent dragEvent = new DragEvent((UIComponent) draggable);
dragEvent.setDropTarget(dropzone);
dragEvent.setAcceptedTypes(acceptedTypes);
- dragEvent.setDropValue(dropzone.getDropValue());
+ dragEvent.setDropValue(dropValue);
- DropEvent dropEvent = new DropEvent((UIComponent) dropzone);
- dropEvent.setDraggableSource(draggable);
- dropEvent.setDragType(dragType);
- dropEvent.setDragValue(draggable.getDragValue());
-
dragEvent.queue();
- dropEvent.queue();
+ } else {
+ //invalidate
+ this.valid = false;
+ //store label for message output
+ this.draggableLabel = MessageUtil.getLabel(context, (UIComponent) draggable);
}
}
+
+ public Draggable getDraggable() {
+ return draggable;
+ }
+
+ public String getDragType() {
+ return dragType;
+ }
+
+ public Object getDragValue() {
+ return dragValue;
+ }
+
+ public boolean isValid() {
+ return valid;
+ }
+
+ public Object getDraggableLabel() {
+ return draggableLabel;
+ }
}
+
+ private final static String MISTYPED_DND_MESSAGE = "Dropzone [{0}] with accepted types {1} cannot accept Draggable [{2}] with dragType [{3}]";
public void decode(FacesContext context, UIComponent component, CompositeRenderer compositeRenderer) {
String clientId = component.getClientId(context);
@@ -185,11 +229,42 @@
String dragSourceId = (String) paramMap.get(DraggableRendererContributor.DRAG_SOURCE_ID);
if (dragSourceId != null && dragSourceId.length() != 0) {
+ Dropzone dropzone = (Dropzone) component;
+ Object acceptedTypes = dropzone.getAcceptedTypes();
+ Object dropValue = dropzone.getDropValue();
+
DraggableDecoderContextCallback draggableDecoderContextCallback =
- new DraggableDecoderContextCallback((Dropzone) component);
+ new DraggableDecoderContextCallback(dropzone,
+ acceptedTypes, dropValue);
context.getViewRoot().invokeOnComponent(context, dragSourceId,
new ContextCallbackWrapper(draggableDecoderContextCallback));
+
+ Draggable draggable = draggableDecoderContextCallback.getDraggable();
+ if (draggable != null) {
+ if (draggableDecoderContextCallback.isValid()) {
+ DropEvent dropEvent = new DropEvent(component);
+ dropEvent.setDraggableSource(draggable);
+ dropEvent.setDragType(draggableDecoderContextCallback.getDragType());
+ dropEvent.setDragValue(draggableDecoderContextCallback.getDragValue());
+
+ dropEvent.queue();
+ } else {
+ String text = MessageFormat.format(
+ MISTYPED_DND_MESSAGE,
+ new Object[] {
+ MessageUtil.getLabel(context, component),
+ acceptedTypes,
+ draggableDecoderContextCallback.getDraggableLabel(),
+ draggableDecoderContextCallback.getDragType()});
+
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, text, text);
+
+ context.addMessage(component.getClientId(context), message);
+
+ context.renderResponse();
+ }
+ }
}
}
}
@@ -207,7 +282,7 @@
definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
definition.addToBody("options.parameters['" + DROP_TARGET_ID + "'] = '" + component.getClientId(context) + "';");
//TODO nick - remove as legacy
- definition.addToBody("Richfaces.mergeObjects(options.parameters, drag.getParameters());");
+ definition.addToBody("Object.extend(options.parameters, drag.getParameters());");
definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(component, context);
16 years, 9 months
JBoss Rich Faces SVN: r11790 - trunk/ui/listShuttle/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-15 14:36:12 -0500 (Mon, 15 Dec 2008)
New Revision: 11790
Modified:
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
https://jira.jboss.org/jira/browse/RF-2239
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-12-15 19:36:08 UTC (rev 11789)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-12-15 19:36:12 UTC (rev 11790)
@@ -185,8 +185,6 @@
<script type="text/javascript">
var clientId = '#{clientId}';
- RichShuttleUtils.execOnLoad(
- function(){
new Richfaces.ListShuttle(
new Richfaces.ListShuttle.Target(
'#{clientId}',
@@ -225,8 +223,6 @@
onblur:#{this:getAsEventHandler(context, component, "onblur")}
}
);
- },
- RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100);
</script>
</td>
</tr>
16 years, 9 months
JBoss Rich Faces SVN: r11789 - in trunk/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-15 14:36:08 -0500 (Mon, 15 Dec 2008)
New Revision: 11789
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js
trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
https://jira.jboss.org/jira/browse/RF-2239
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/LayoutManager.js 2008-12-15 19:36:08 UTC (rev 11789)
@@ -5,6 +5,7 @@
this.contentDiv = this.contentTable.parentNode;
Event.observe(this.contentDiv, "scroll", this.scrollHandler.bindAsEventListener(this));
+
}
LayoutManager.SCROLL_WIDTH = 17;
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-12-15 19:36:08 UTC (rev 11789)
@@ -77,7 +77,10 @@
}
}
//---
- this.layoutManager.widthSynchronization();
+ var synch = function() {this.layoutManager.widthSynchronization()}.bindAsEventListener(this);
+ RichShuttleUtils.execOnLoad(
+ synch, RichShuttleUtils.Condition.ElementPresent(this.container), 100
+ );
},
imageLoadListener: function (evt){
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js 2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ShuttleUtils.js 2008-12-15 19:36:08 UTC (rev 11789)
@@ -16,9 +16,9 @@
}
};
RichShuttleUtils.Condition = {
- ElementPresent : function(element) {
+ ElementPresent : function(el) {
return function () {
- var el = $(element);
+ //var el = $(element);
return el && el.offsetHeight > 0;
};
}
@@ -32,4 +32,4 @@
} else {
this.splice(index, 1);
}
-}
\ No newline at end of file
+};
\ No newline at end of file
Modified: trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-12-15 19:35:06 UTC (rev 11788)
+++ trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-12-15 19:36:08 UTC (rev 11789)
@@ -117,8 +117,7 @@
<f:clientId var="cId"/>
<script type="text/javascript">
- var clientId = '#{cId}';
- RichShuttleUtils.execOnLoad(function(){
+ var clientId = '#{cId}';
new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab',
'#{cId}internal_header_tab', '#{cId}focusKeeper',
[['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']],
@@ -131,8 +130,6 @@
Richfaces.OrderingListSelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)});
- }, RichShuttleUtils.Condition.ElementPresent("#{cId}"), 100);
- //setTimeout(init, 0);
</script>
</div>
</f:root>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11788 - trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-15 14:35:06 -0500 (Mon, 15 Dec 2008)
New Revision: 11788
Modified:
trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
Log:
fix switch test
Modified: trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java 2008-12-15 19:14:13 UTC (rev 11787)
+++ trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java 2008-12-15 19:35:06 UTC (rev 11788)
@@ -243,8 +243,8 @@
HtmlPage page = renderView();
//System.out.println(page.asXml());
- externalContext.addRequestParameterMap(stp1.getClientId(facesContext), "");
-
+ externalContext.addRequestParameterMap(stp1.getClientId(facesContext), "false");
+ stp1.setSwitchType(UISimpleTogglePanel.CLIENT_SWITCH_TYPE);
stp1.processDecodes(facesContext);
stp1.processValidators(facesContext);
stp1.processUpdates(facesContext);
16 years, 9 months
JBoss Rich Faces SVN: r11787 - in trunk/ui/simpleTogglePanel/src/main/java/org/richfaces: renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-15 14:14:13 -0500 (Mon, 15 Dec 2008)
New Revision: 11787
Modified:
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-5293
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2008-12-15 17:15:11 UTC (rev 11786)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2008-12-15 19:14:13 UTC (rev 11787)
@@ -26,10 +26,13 @@
import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.event.AjaxSource;
+import org.richfaces.event.SimpleToggleEvent;
/**
@@ -46,7 +49,7 @@
public static final boolean COLLAPSED = false;
public static final boolean EXPANDED = true;
- private transient Boolean openedSet = null;
+// private transient Boolean openedSet = null;
private transient Boolean wasOpened = null;
@@ -117,6 +120,14 @@
}
}
+ @Override
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ if(event instanceof SimpleToggleEvent) {
+ SimpleToggleEvent simpleToggleEvent = (SimpleToggleEvent) event;
+ setOpened(simpleToggleEvent.isIsOpen());
+ }
+ super.broadcast(event);
+ }
/**
@@ -136,10 +147,10 @@
if (isWasOpened()) {
// Process all the facets and children of this component
Iterator<UIComponent> kids = getFacetsAndChildren();
- while (kids.hasNext()) {
- UIComponent kid = kids.next();
- kid.processValidators(context);
- }
+ while (kids.hasNext()) {
+ UIComponent kid = kids.next();
+ kid.processValidators(context);
+ }
}
}
@@ -158,7 +169,7 @@
return;
}
- updateModel();
+// updateModel();
if (isWasOpened()) {
// Process all facets and children of this component
@@ -170,25 +181,22 @@
}
}
- private void updateModel () {
- if (openedSet != null) {
- setOpened(openedSet);
- }
- }
+// private void updateModel () {
+// if (openedSet != null) {
+// setOpened(openedSet);
+// }
+// }
+
+// public boolean isOpenedSet() {
+// return openedSet;
+// }
- /**
- * @return the openedSet
- */
- public boolean isOpenedSet() {
- return openedSet;
- }
-
- /**
- * @param openedSet the openedSet to set
- */
- public void setOpenedSet(boolean openedSet) {
- this.openedSet = openedSet;
- }
+// /**
+// * @param openedSet the openedSet to set
+// */
+// public void setOpenedSet(boolean openedSet) {
+// this.openedSet = openedSet;
+// }
/*
* public void setValueBinding(String arg0, ValueBinding arg1) { if
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2008-12-15 17:15:11 UTC (rev 11786)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2008-12-15 19:14:13 UTC (rev 11787)
@@ -30,7 +30,6 @@
import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.javascript.JSFunction;
@@ -43,22 +42,14 @@
//public class SimpleTogglePanelRenderer extends AjaxCommandLinkRenderer {
public class SimpleTogglePanelRenderer extends org.ajax4jsf.renderkit.HeaderResourcesRendererBase {
- //XXXX by nick - denis - seems there is a lot of code common to org.richfaces.renderkit.html.ToggleControlRenderer. Please commonize!
- //private InternetResource[] _scripts = {new PrototypeScript(), getResource("scripts/simpleTogglePanel.js") };
- final static String NONE = "none";
+ final static String NONE = "none";
final static String EMPTY = "";
protected Class getComponentClass() {
return UISimpleTogglePanel.class;
}
- //XXXX by nick - denis - move scripts to template
- //protected InternetResource[] getAdditionalScripts() {
- // return _scripts;
- //}
-
-
public boolean getRendersChildren() {
return true;
}
@@ -67,83 +58,87 @@
UIComponent component, String eventName) throws IOException {
RendererUtils.writeEventHandlerFunction(context, component, eventName);
}
-
+
+
public void doDecode(FacesContext context, UIComponent component) {
- super.doDecode(context, component);
+ super.doDecode(context, component);
+ ExternalContext exCtx = context.getExternalContext();
+ Map <String, String> rqMap = exCtx.getRequestParameterMap();
+ Object clnId = rqMap.get(component.getClientId(context));
+ UISimpleTogglePanel panel = (UISimpleTogglePanel) component;
- ExternalContext exCtx = context.getExternalContext();
+ if (clnId != null) {
+ // enqueue event here for this component or for component with Id
+ // taken fro forId attribute
- Map rqMap = exCtx.getRequestParameterMap();
- Object clnId = rqMap.get(component.getClientId(context));
- UISimpleTogglePanel panel = (UISimpleTogglePanel) component;
+ String switchType = panel.getSwitchType();
+ if (!(UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType))) {
- if (clnId != null) {
- // enqueue event here for this component or for component with Id
- // taken fro forId attribute
-
- String switchType = panel.getSwitchType();
- if (!(UISimpleTogglePanel.CLIENT_SWITCH_TYPE.equals(switchType))) {
+ // xxxx by nick - denis - use constants, please!
+ SimpleToggleEvent event;
+ if (panel.isOpened()) {
+ event = new SimpleToggleEvent(panel, UISimpleTogglePanel.COLLAPSED);
+ // panel.setOpened(UISimpleTogglePanel.COLLAPSED);
+ // panel.setOpenedSet(UISimpleTogglePanel.COLLAPSED);
+ } else {
+ event = new SimpleToggleEvent(panel, UISimpleTogglePanel.EXPANDED);
+ // xxxx by nick - denis - use constants, please!
+ // panel.setOpened(UISimpleTogglePanel.EXPANDED);
+ // panel.setOpenedSet(UISimpleTogglePanel.EXPANDED);
+ }
+ // if (panel.isImmediate()) {
+ // event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ // } else {
+ // event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ // }
+ event.queue();
- //xxxx by nick - denis - use constants, please!
- if ((panel.isOpened() == UISimpleTogglePanel.EXPANDED)) {
- //panel.setOpened(UISimpleTogglePanel.COLLAPSED);
- panel.setOpenedSet(UISimpleTogglePanel.COLLAPSED);
- } else {
- //xxxx by nick - denis - use constants, please!
- //panel.setOpened(UISimpleTogglePanel.EXPANDED);
- panel.setOpenedSet(UISimpleTogglePanel.EXPANDED);
- }
- SimpleToggleEvent event = new SimpleToggleEvent(panel, (panel.isOpened()));
- if (panel.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
- event.queue();
-
- } else {
- boolean submittedState = Boolean.parseBoolean((String) clnId);
- if (panel.isOpened() != submittedState){
- //panel.setAjaxSingle(false);
- SimpleToggleEvent event = new SimpleToggleEvent(panel, (panel.isOpened()));
- if (panel.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
- event.queue();
- }
- if (null == panel.getValueBinding("value"))
- panel.setOpened(submittedState);
- panel.setOpenedSet(submittedState);
- }
-
- // in case of "ajax" request and "ajax" switch mode of toggle panel
- // set the regions to be rendered (reRendered) after operating this "ajax" request
- if (AjaxRendererUtils.isAjaxRequest(context) && panel.getSwitchType().equals(UISimpleTogglePanel.AJAX_SWITCH_TYPE)) {
- // add toggle panel itself to rendered list of components
- AjaxRendererUtils.addRegionByName(context,
- panel,
- panel.getId());
- // add regions specified in the "reRender" attribute of toggle panel
- // to rendered list of components
- AjaxRendererUtils.addRegionsFromComponent(panel, context);
- }
+ } else {
+ boolean submittedState = Boolean.parseBoolean((String) clnId);
+ if (panel.isOpened() != submittedState) {
+ // panel.setAjaxSingle(false);
+ SimpleToggleEvent event = new SimpleToggleEvent(panel, submittedState);
+ // if (panel.isImmediate()) {
+ // event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ // } else {
+ // event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ // }
+ event.queue();
+ }
+// TODO: should we remove it ??
+ if (null == panel.getValueBinding("value"))
+ panel.setOpened(submittedState);
+ // panel.setOpenedSet(submittedState);
+ }
- }
- }
+ // in case of "ajax" request and "ajax" switch mode of toggle panel
+ // set the regions to be rendered (reRendered) after operating this
+ // "ajax" request
+ if (AjaxRendererUtils.isAjaxRequest(context) && panel.getSwitchType().equals(UISimpleTogglePanel.AJAX_SWITCH_TYPE)) {
+ // add toggle panel itself to rendered list of components
+ AjaxRendererUtils.addRegionByName(context, panel, panel.getId());
+ // add regions specified in the "reRender" attribute of toggle
+ // panel
+ // to rendered list of components
+ AjaxRendererUtils.addRegionsFromComponent(panel, context);
+ }
- public String getdivdisplay(FacesContext context, UIComponent component) {
+ }
+ }
- String Switch = Boolean.toString(((UISimpleTogglePanel) component).isOpened());
- if (Switch == null || Switch.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
- {
- //xxxx by nick - denis - do not set "block" explicitly - that can break some elements, set "" for display. See Element.show() in prototype.js
- return "";
- }
- return "none";
+ public String getdivdisplay(FacesContext context, UIComponent component) {
+ UISimpleTogglePanel simpleTogglePanel = (UISimpleTogglePanel) component;
+ return simpleTogglePanel.isOpened() ? EMPTY : NONE;
+// String Switch = Boolean.toString(((UISimpleTogglePanel)
+// component).isOpened());
+// if (Switch == null || Switch.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
+// {
+// //xxxx by nick - denis - do not set "block" explicitly - that can break some elements, set "" for display. See Element.show() in prototype.js
+// return "";
+// }
+// return "none";
}
public String getOnClick(FacesContext context, UIComponent component) {
@@ -200,9 +195,7 @@
}
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
- // TODO Auto-generated method stub
UISimpleTogglePanel comp = (UISimpleTogglePanel) component;
- //xxxx by nick - denis - use constants, please!
if (!(((comp.getSwitchType() == null) || (comp.getSwitchType().equals(UISimpleTogglePanel.CLIENT_SWITCH_TYPE) != true)) && (comp.isOpened() == UISimpleTogglePanel.COLLAPSED)))
{
super.encodeChildren(context, component);
@@ -210,17 +203,23 @@
}
public String getSwitchOnStatus(FacesContext context, UIComponent component) {
- String sw = Boolean.toString(((UISimpleTogglePanel) component).isOpened());
- if (sw == null || sw.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
- return EMPTY;
- else return NONE;
+ UISimpleTogglePanel simpleTogglePanel = (UISimpleTogglePanel) component;
+ return simpleTogglePanel.isOpened() ? EMPTY : NONE;
+// String sw = Boolean.toString(((UISimpleTogglePanel) component).isOpened());
+// if (sw == null || sw.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
+// return EMPTY;
+// else return NONE;
}
public String getSwitchOffStatus(FacesContext context, UIComponent component) {
- String sw = Boolean.toString(((UISimpleTogglePanel) component).isOpened());
- if (sw == null || sw.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
- return NONE;
- else return EMPTY;
+ UISimpleTogglePanel simpleTogglePanel = (UISimpleTogglePanel) component;
+ return simpleTogglePanel.isOpened() ? NONE : EMPTY ;
+
+// String sw = Boolean.toString(((UISimpleTogglePanel) component).isOpened());
+// if (sw == null || sw.equals(Boolean.toString(UISimpleTogglePanel.EXPANDED)))
+// return NONE;
+// else return EMPTY;
+
}
}
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11786 - trunk/ui/editor/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-12-15 12:15:11 -0500 (Mon, 15 Dec 2008)
New Revision: 11786
Modified:
trunk/ui/editor/src/main/config/component/editor.xml
Log:
https://jira.jboss.org/jira/browse/RF-5042
Corrected description for tabindex
Modified: trunk/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/ui/editor/src/main/config/component/editor.xml 2008-12-15 17:12:32 UTC (rev 11785)
+++ trunk/ui/editor/src/main/config/component/editor.xml 2008-12-15 17:15:11 UTC (rev 11786)
@@ -110,7 +110,11 @@
<name>tabindex</name>
<classname>java.lang.String</classname>
<description>
- Attribute enables you to specify an element ID to focus, when the user pressed the tab key inside the editor. You can also use the special ":prev" and ":next" values. It will then places the focus on either the previous or next input element placed before/after the TinyMCE instance in the DOM.
+ In visual mode the attribute works the same way as "tab_focus" TinyMCE's property the attribute enables
+ you to specify an element ID to focus, when the TAB key is pressed .
+ You can also use the special ":prev" and ":next" values that will then place the focus on
+ an input element placed before/after the TinyMCE instance in the DOM.
+ While in "source" mode the attribute works like standard HTML tabindex attribute.
</description>
</property>
<property>
16 years, 9 months
JBoss Rich Faces SVN: r11785 - 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: 2008-12-15 12:12:32 -0500 (Mon, 15 Dec 2008)
New Revision: 11785
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/layoutTests.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5350
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/layoutTests.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-15 16:26:35 UTC (rev 11784)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-15 17:12:32 UTC (rev 11785)
@@ -1316,11 +1316,37 @@
initIds(getParentId());
writeStatus("Check 'inputSize' attribute");
- String inputSizeCalendarInputId = calendarId + "InputSizeInputDate";
- String size = selenium.getAttribute(inputSizeCalendarInputId + "@size");
+ check(showPopupId, true);
+
+ String size = selenium.getAttribute(inputDateId + "@size");
Assert.assertEquals(size, "15", "Input size attribute is not applied");
}
+ @Test
+ public void testCellWidthAndCellHeightAttributes(Template template) {
+ renderPage(LAYOUT_TESTS_URL, template, null);
+ initIds(getParentId());
+
+ int expectedCellWidth = 31;
+ int expectedCellHeight = 33;
+
+ writeStatus("Check 'cellWidth' and 'cellHeight' attributes.");
+
+ writeStatus("Non-popup mode");
+ check(showPopupId, false);
+
+ writeStatus("Check size of arbitrary cell. Width must be 31px, height must be 33px");
+ Assert.assertEquals(selenium.getElementHeight(calendarId + "DayCell5").intValue(), expectedCellHeight);
+ Assert.assertEquals(selenium.getElementWidth(calendarId + "DayCell5").intValue(), expectedCellWidth);
+
+ writeStatus("Check the same for popup mode");
+ check(showPopupId, true);
+ showPopup();
+
+ Assert.assertEquals(selenium.getElementHeight(calendarId + "DayCell5").intValue(), expectedCellHeight);
+ Assert.assertEquals(selenium.getElementWidth(calendarId + "DayCell5").intValue(), expectedCellWidth);
+ }
+
private void setPopup(boolean isPopup) {
runScript("$('" + isPopupId + "').checked=" + isPopup);
}
16 years, 9 months
JBoss Rich Faces SVN: r11784 - in trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-15 11:26:35 -0500 (Mon, 15 Dec 2008)
New Revision: 11784
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5229
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-15 16:21:07 UTC (rev 11783)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-15 16:26:35 UTC (rev 11784)
@@ -144,7 +144,23 @@
checkUpdateModel(false);
}
+
+ public void testAjaxSingle(boolean checkListener) {
+ reset();
+ setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ clickLoad();
+ setExtrenalValidationFailed();
+ base.sendAjax();
+
+ if (checkListener) {
+ checkActionListener(true);
+ }
+ checkUpdateModel(false);
+
+ }
+
+
/**
* Important! Override
* {@link SeleniumTestBase#setInternalValidationFailed()} method if you use
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-15 16:21:07 UTC (rev 11783)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-15 16:26:35 UTC (rev 11784)
@@ -402,6 +402,26 @@
}
@Test
+ public void testAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+
+ tester.testAjaxSingle(false);
+ }
+
+ @Test
+ public void testProcessAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ calendarHeaderId = calendarId + "Header";
+
+ tester.testProcessAttribute();
+ }
+
+ @Test
public void testNULLModel(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId());
16 years, 9 months