JBoss Rich Faces SVN: r13271 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-03-27 13:45:38 -0400 (Fri, 27 Mar 2009)
New Revision: 13271
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/suggestionBox/suggestionBoxAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SuggestionBoxTest.java
Log:
RF-6248, RF-6255
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/suggestionBox/suggestionBoxAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-03-27 16:51:27 UTC (rev 13270)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-03-27 17:45:38 UTC (rev 13271)
@@ -1134,6 +1134,18 @@
assertAttributeContains(locator, "class", expectedExpression, message);
}
+ public void assertClassAttributeDoesNotContain(String locator, String expectedExpression, String message) {
+ boolean contain = true;
+ try {
+ assertAttributeContains(locator, "class", expectedExpression, message);
+ } catch (AssertionError ae) {
+ contain = false;
+ }
+ if (contain) {
+ throw new AssertionError(message);
+ }
+ }
+
/**
* Asserts that element attribute with given name <code>attrName</code> contains <code>expectedExpression</code>
* @param locator id or xpath expression locating element
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SuggestionBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SuggestionBoxTest.java 2009-03-27 16:51:27 UTC (rev 13270)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/SuggestionBoxTest.java 2009-03-27 17:45:38 UTC (rev 13271)
@@ -165,6 +165,72 @@
Assert.assertEquals("Baku", capital);
}
+ @Test
+ public void testNothingLabelAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check nothingLabel attribute is shown up as sure as no suggestions available; item selection is not available");
+ String componentId = tester.getClientId("suggestion");
+ String suggestPopupId = tester.getClientId(AutoTester.COMPONENT_ID + ":suggest");
+
+ writeStatus("Misspell a little");
+ type(componentId, "Azir");
+ waitForAjaxCompletion();
+ AssertVisible(suggestPopupId, "Suggestion popup is not come up");
+ Assert.assertEquals(1, selenium.getXpathCount("//table[@id='" + suggestPopupId + "']/tbody/tr"));
+ String nothingLabelItemXpath = "//table[@id='" + suggestPopupId + "']/tbody/tr[1]";
+ AssertTextEquals(nothingLabelItemXpath, "No countries found");
+
+ writeStatus("Check item is not selectable");
+ selenium.click(nothingLabelItemXpath);
+ AssertValueEquals(componentId, "Azir");
+ }
+
+ @Test
+ public void testStylesAndClassesAndHtmlAttributes(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ String inputId = tester.getClientId("suggestion");
+ String componentId = tester.getClientId(AutoTester.COMPONENT_ID);
+ String spId = tester.getClientId(AutoTester.COMPONENT_ID + ":suggest");
+
+ type(inputId, "men");
+ waitForAjaxCompletion();
+
+ writeStatus("Check styles and classes are output to client");
+
+ writeStatus("Check styleClass/style attributes");
+ assertStyleAttributeContains(componentId, "font-size: 13px", "Style attribute was not output to client");
+ assertClassAttributeContains(componentId, "noclass", "Class attribute was not output to client");
+
+ writeStatus("Check popupClass/popupStyle attributes");
+ //assertStyleAttributeContains(componentId, "font-size: 14px", "popupStyle attribute was not output to client");
+ assertClassAttributeContains(componentId, "popup-class", "popupClass attribute was not output to client");
+
+ writeStatus("Check height/width attributes");
+ int w = selenium.getElementWidth(componentId).intValue();
+ int h = selenium.getElementHeight(componentId).intValue();
+
+ if (250 != h || 300 != w) {
+ Assert.fail("height/width are not applied: Expected [h=250,w=300] was [h=" + h + ",w=" + w + "]");
+ }
+
+ writeStatus("Check entryClass attribute");
+ assertClassAttributeContains("//table[@id='" + spId + "']/tbody/tr[1]", "entry-class", "entryClass attribute was not output to client");
+ assertClassAttributeContains("//table[@id='" + spId + "']/tbody/tr[2]", "entry-class", "entryClass attribute was not output to client");
+
+ writeStatus("Check style alternating rows feature - rowClasses attribute");
+ assertClassAttributeContains("//table[@id='" + spId + "']/tbody/tr[1]", "odd-class", "rowClasses attribute is not applied");
+ assertClassAttributeDoesNotContain("//table[@id='" + spId + "']/tbody/tr[1]", "even-class", "rowClasses attribute is not applied");
+ assertClassAttributeContains("//table[@id='" + spId + "']/tbody/tr[2]", "even-class", "rowClasses attribute is not applied");
+ assertClassAttributeDoesNotContain("//table[@id='" + spId + "']/tbody/tr[2]", "odd-class", "rowClasses attribute is not applied");
+
+ writeStatus("Check selectedClass attribute");
+ selenium.keyDown(inputId, "\\40");// select second row
+ assertClassAttributeDoesNotContain("//table[@id='" + spId + "']/tbody/tr[1]", "selected-class", "selectedClass attribute was output to client");
+ assertClassAttributeContains("//table[@id='" + spId + "']/tbody/tr[2]", "selected-class", "selectedClass attribute was not output to client");
+ }
+
@Override
public void sendAjax() {
type(getAutoTester(this).getClientId("suggestion"), "Bel");
13 years, 1 month
JBoss Rich Faces SVN: r13270 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-03-27 12:51:27 -0400 (Fri, 27 Mar 2009)
New Revision: 13270
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
Log:
Code review results committed
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-27 16:44:20 UTC (rev 13269)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-27 16:51:27 UTC (rev 13270)
@@ -53,6 +53,8 @@
s.append(option.getName() + ",");
}
}
+
+ //TODO nick - remove trailing comma
return s.toString();
}
@@ -64,6 +66,7 @@
while (it.hasNext()) {
ISearchOption option = it.next();
if (option.getSelected()) {
+ //TODO nick - use search(keyword)
option.search(searchAction, keywords.get(0).trim(), seachInMyAlbums, searchInShared);
}else {
option.setSearchResult(null);
13 years, 1 month
JBoss Rich Faces SVN: r13269 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-03-27 12:44:20 -0400 (Fri, 27 Mar 2009)
New Revision: 13269
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java
Log:
Code review results committed
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-27 15:56:31 UTC (rev 13268)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-27 16:44:20 UTC (rev 13269)
@@ -62,6 +62,7 @@
@In
User user;
+ //TODO nick - rename to createShelf
public void initEdit() {
Shelf shelf = new Shelf();
Contexts.getConversationContext().set("shelf", shelf);
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-03-27 15:56:31 UTC (rev 13268)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-03-27 16:44:20 UTC (rev 13269)
@@ -101,6 +101,7 @@
if(slideshowIndex == images.size() - 1){
slideshowIndex = -1;
}
+ //TODO nick - this will start slideshow from the 2nd image (slideshowIndex == 1)
slideshowIndex++;
selectedImage = images.get(slideshowIndex);
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java 2009-03-27 15:56:31 UTC (rev 13268)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java 2009-03-27 16:44:20 UTC (rev 13269)
@@ -24,6 +24,7 @@
@SuppressWarnings("unchecked")
public Boolean adviseNodeSelected(UITree tree) {
Object currentNode = tree.getRowData();
+ //TODO nick - cast not neccessary: if currentNode.equals(model.getSelectedAlbum() || ...)
if (currentNode instanceof Album) {
boolean selected = currentNode == model.getSelectedAlbum();
return selected;
13 years, 1 month
JBoss Rich Faces SVN: r13268 - in trunk/test-applications/seleniumTest/richfaces/src/main: webapp and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-03-27 11:56:31 -0400 (Fri, 27 Mar 2009)
New Revision: 13268
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.xhtml
Log:
RF-6523
Content of index page was organized.
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java 2009-03-27 15:51:22 UTC (rev 13267)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/IndexBean.java 2009-03-27 15:56:31 UTC (rev 13268)
@@ -22,10 +22,15 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
public class IndexBean {
private List<ComponentItem> list = new ArrayList<ComponentItem>();
@@ -135,4 +140,29 @@
return list;
}
+ public List<String> getLinks() {
+ List<String> links = null;
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ExternalContext externalContext = facesContext.getExternalContext();
+ String pathString = "/pages/";
+ String link = externalContext.getRequestParameterMap().get("link");
+ if (link != null) {
+ pathString += link;
+ }
+ Set<String> paths = externalContext.getResourcePaths(pathString);
+ if (paths != null) {
+ links = new ArrayList<String>(paths.size());
+ for (String path : paths) {
+ String[] names = path.split("/");
+ String name = names[names.length - 1];
+ if (name.endsWith(".xhtml")) {
+ links.add(link + "/" + name);
+ } else if (name.matches("[a-zA-Z0-9]+")) {
+ links.add(name);
+ }
+ }
+ Collections.sort(links);
+ }
+ return links;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
13 years, 1 month
JBoss Rich Faces SVN: r13267 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-03-27 11:51:22 -0400 (Fri, 27 Mar 2009)
New Revision: 13267
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
Log:
Code review results committed
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-27 15:40:29 UTC (rev 13266)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-27 15:51:22 UTC (rev 13267)
@@ -57,10 +57,13 @@
public void addAlbum(Album album){
if(album.getShelf() == null){
+ //TODO nick - remove null argument
+ //TODO nick - externalize message
facesMessages.add("Shelf must be not-null", null);
return;
}
albumAction.addAlbum(album);
+ //TODO nick - addDirectory() uses this.album, do we need: this.album = album?
addDirectory();
model.resetModel(model.getMainArea(), model.getSelectedUser(), model.getSelectedShelf(), album, null);
Events.instance().raiseEvent("albumAdded");
@@ -83,7 +86,9 @@
//Update domain model
String string = album.getId().toString();
albumAction.deleteAlbum(album);
+ //TODO nick - should be deleteDirectory(album). And call file manager directly
deleteDirectory(string);
+ //TODO nick - why not call just model.setAlbum(null). More: is deleted album the ones currently selected in model?
model.resetModel(NavigationEnum.ALL_ALBUMS, model.getSelectedUser(), model.getSelectedShelf(), null, null);
Events.instance().raiseEvent("albumDeleted");
Events.instance().raiseEvent("clearTree");
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-27 15:40:29 UTC (rev 13266)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-27 15:51:22 UTC (rev 13267)
@@ -31,7 +31,6 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
@@ -79,6 +78,7 @@
public String login(){
if(identity.hasRole("admin")){
+ //TODO nick - return null
return "";
}
String password = credentials.getPassword();
@@ -88,9 +88,10 @@
credentials.setUsername(username);
try {
identity.authenticate();
+ //TODO nick - maybe clearShelves() before trying to aunthenticate?
shelfManager.clearShelfs();
} catch (LoginException e) {
- // TODO Auto-generated catch block
+ // TODO nick - Auto-generated catch block
e.printStackTrace();
}
return "main";
@@ -99,11 +100,13 @@
public boolean authenticate()
{
if (wantLoginAnonymous()) {
+ //TODO nick - remove another roles?
identity.addRole(Constants.GUEST_ROLE);
model.setMainArea(NavigationEnum.ANONYM);
return true;
}
try {
+ //TODO nick - move password holder into userAction
user = userAction.login(credentials.getUsername(), passwordHolder.hash(credentials.getPassword()));
if (user != null) {
identity.addRole(Constants.ADMIN_ROLE);
@@ -151,6 +154,7 @@
}
public String startConversation(){
+ //TODO nick - rename to destroyConversation()?
identity.logout();
identity.unAuthenticate();
credentials.clear();
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-27 15:40:29 UTC (rev 13266)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-27 15:51:22 UTC (rev 13267)
@@ -53,6 +53,7 @@
private User user;
public void selectShelfs(){
+ //TODO nick - i think model should reset selected albums, etc. internally
model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null);
}
@@ -73,6 +74,7 @@
}
public void cancelEditShelf(Shelf shelf){
+ //TODO nick - unused "shelf" argument
model.setMainArea(NavigationEnum.SHELF_PREVIEW);
}
@@ -90,6 +92,7 @@
return;
}
model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image);
+ //TODO nick - model should already has enough information to set up image index
model.setSelectedImageIndex(model.getSelectedAlbum().getIndex(model.getSelectedImage())+1);
image.getAlbum().getShelf().visitImage(image);
image.getAlbum().visitImage(image);
@@ -101,6 +104,7 @@
Image image = model.getSelectedAlbum().getImages().get(index - 1);
model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image);
image.getAlbum().visitImage(image);
+ //TODO nick - album can notify shelf
image.getAlbum().getShelf().visitImage(image);
}
@@ -109,10 +113,12 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
+ //TODO nick - resetModel?
model.setMainArea(NavigationEnum.ALBUM_IMAGE_EDIT);
}
public void cancelEditImage(Image image){
+ //TODO nick - unused image argument
model.setMainArea(NavigationEnum.ALBUM_IMAGE_PREVIEW);
}
@@ -124,6 +130,7 @@
if(image == null || image.getAlbum() == null || image.getAlbum().getOwner() == null){
return false;
}
+ //TODO nick - compare User objects?
return image.getAlbum().getOwner().getLogin().equals(user.getLogin());
}
@@ -132,11 +139,13 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
+ //TODO nick - resetModel?
model.setSelectedAlbum(album);
model.setMainArea(NavigationEnum.ALBUM_EDIT);
}
public void cancelEditAlbum(Album album){
+ //TODO nick - unused "album" argument
model.setMainArea(NavigationEnum.ALBUM_PREVIEW);
}
@@ -158,6 +167,7 @@
}
public boolean isUserShelf(Shelf shelf){
+ //TODO nick - compare User objects?
return shelf.getOwner()!=null && shelf.getOwner().getLogin().equals(user.getLogin());
}
@@ -165,6 +175,7 @@
if(album == null || album.getOwner() == null){
return false;
}
+ //TODO nick - compare User objects?
return album.getOwner().getLogin().equals(user.getLogin());
}
@@ -181,6 +192,7 @@
}
public void showTag(MetaTag metatag){
+ //TODO nick - model.setMainArea()?
model.resetModel(NavigationEnum.TAGS, model.getSelectedUser(), model.getSelectedShelf(), model.getSelectedAlbum(), model.getSelectedImage());
model.setSelectedTag(metatag);
}
@@ -205,6 +217,7 @@
if(selectedUser == null){
return false;
}
+ //TODO nick - equals()?
if(selectedUser == user){
return true;
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-27 15:40:29 UTC (rev 13266)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-27 15:51:22 UTC (rev 13267)
@@ -52,11 +52,13 @@
}
handleImage((Image)dragValue, (Album)dropValue);
}else if(dragValue instanceof Album){
+ //TODO nick - check user
handleAlbum((Album)dragValue, (Shelf)dropValue);
}
}
private void handleAlbum(Album dragValue, Shelf dropValue) {
+ //TODO nick - add check for the current shelf
dropValue.addAlbum(dragValue);
albumAction.editAlbum(dragValue);
Events.instance().raiseEvent("clearTree");
@@ -74,8 +76,10 @@
private String getNewPathOfImage(Image dragValue, Album dropValue) {
String fileNameOld = dragValue.getPath();
+ //TODO nick - is "/" correct for windows?
int lastIndexOf = dragValue.getPath().lastIndexOf("/");
String prevPathEnd = dragValue.getPath().substring(lastIndexOf);
+ //TODO nick - file manager should handle naming!!!
String fileNameNew = user.getLogin()+"/"+dropValue.getId()+"/"+prevPathEnd;
fileManager.renameImage(fileNameOld, fileNameNew);
return fileNameNew;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-27 15:40:29 UTC (rev 13266)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-27 15:51:22 UTC (rev 13267)
@@ -58,8 +58,11 @@
private User user;
public void deleteImage(Image image) {
+ //TODO nick - should we check image owner?
String imagePath = image.getPath();
model.resetModel(NavigationEnum.ALBUM_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), null);
+
+ //TODO nick - imageAction can call file manager itself
imageAction.deleteImage(image);
fileManager.deleteImage(imagePath);
Events.instance().raiseEvent("imageDeleted");
@@ -71,6 +74,7 @@
Events.instance().raiseEvent("imageEdited");
}
+ //TODO nick - Constants.ADD_IMAGE_EVENT is not used anywhere else
@Observer(Constants.ADD_IMAGE_EVENT)
public void addImage(Image image) {
imageAction.addImage(image);
13 years, 1 month
JBoss Rich Faces SVN: r13265 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-03-27 11:37:11 -0400 (Fri, 27 Mar 2009)
New Revision: 13265
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
Fix memory leaks
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-03-27 15:32:20 UTC (rev 13264)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2009-03-27 15:37:11 UTC (rev 13265)
@@ -61,8 +61,40 @@
}
this.combobox.component = this;
this.initHandlers();
+ this["rich:destructor"] = "destroy";
},
+ destroy: function () {
+
+ Event.stopObserving(this.combobox, 'rich:onselect');
+
+ Event.stopObserving(this.button, 'click');
+ Event.stopObserving(this.button, 'mouseup');
+ Event.stopObserving(this.button, 'mousedown');
+ Event.stopObserving(this.button, 'mouseover');
+ Event.stopObserving(this.button, 'mouseout');
+
+ Event.stopObserving(this.field, 'keydown');
+ Event.stopObserving(this.field, 'blur');
+ Event.stopObserving(this.field, 'focus');
+ Event.stopObserving(this.field, 'keyup');
+
+ Event.stopObserving(this.comboList.listParent, 'mousedown');
+ Event.stopObserving(this.comboList.listParent, 'mouseup');
+ Event.stopObserving(this.comboList.listParent, 'mousemove');
+ Event.stopObserving(this.comboList.listParent, 'click');
+
+ this.comboValue = null;
+ this.button = null;
+ this.buttonBG = null;
+ this.field = null;
+ this.classes = null;
+
+ delete this.comboList;
+ this.combobox.component = null;
+ this.combobox = null;
+ },
+
initHandlers : function() {
Event.observe(this.button, "click", this.buttonClickHandler.bindAsEventListener(this));
Event.observe(this.button, "mouseup", this.buttonMouseUpHandler.bindAsEventListener(this));
13 years, 1 month
JBoss Rich Faces SVN: r13264 - trunk/ui/assembly.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-03-27 11:32:20 -0400 (Fri, 27 Mar 2009)
New Revision: 13264
Modified:
trunk/ui/assembly/pom.xml
Log:
jQuery UI moved into framework\impl
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2009-03-27 15:11:08 UTC (rev 13263)
+++ trunk/ui/assembly/pom.xml 2009-03-27 15:32:20 UTC (rev 13264)
@@ -218,9 +218,6 @@
${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/pngFix-min.js
</include>
<include>
- ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/ui.core-min.js
- </include>
- <include>
${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/ui.colorpicker-min.js
</include>
13 years, 1 month
JBoss Rich Faces SVN: r13263 - in trunk/test-applications/realworld2/web/src/main: webapp/includes/contextMenu and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-03-27 11:11:08 -0400 (Fri, 27 Mar 2009)
New Revision: 13263
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
Log:
Fix context menu for tree
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-27 14:52:47 UTC (rev 13262)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-27 15:11:08 UTC (rev 13263)
@@ -132,6 +132,7 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
+ model.setSelectedAlbum(album);
model.setMainArea(NavigationEnum.ALBUM_EDIT);
}
@@ -143,6 +144,11 @@
model.setMainArea(NavigationEnum.FILE_UPLOAD);
}
+ public void showFileUpload(Album album){
+ model.setSelectedAlbum(album);
+ model.setMainArea(NavigationEnum.FILE_UPLOAD);
+ }
+
public void showSharedAlbums(User user){
model.resetModel(NavigationEnum.USER_SHARED_ALBUMS, user, null, null, null);
}
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
13 years, 1 month
JBoss Rich Faces SVN: r13262 - trunk/samples/richfaces-demo/src/main/webapp/images.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-03-27 10:52:47 -0400 (Fri, 27 Mar 2009)
New Revision: 13262
Modified:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_DataTableScroller.gif
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/images/cn_DataTableScroller.gif
===================================================================
(Binary files differ)
13 years, 1 month