JBoss Rich Faces SVN: r14396 - branches/community/3.3.X/ui/menu-components/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-05-28 11:14:40 -0400 (Thu, 28 May 2009)
New Revision: 14396
Modified:
branches/community/3.3.X/ui/menu-components/src/main/config/component/menucomponents.xml
Log:
https://jira.jboss.org/jira/browse/RF-6233 - unification of event handlers descriptions;
Modified: branches/community/3.3.X/ui/menu-components/src/main/config/component/menucomponents.xml
===================================================================
--- branches/community/3.3.X/ui/menu-components/src/main/config/component/menucomponents.xml 2009-05-28 15:12:27 UTC (rev 14395)
+++ branches/community/3.3.X/ui/menu-components/src/main/config/component/menucomponents.xml 2009-05-28 15:14:40 UTC (rev 14396)
@@ -95,31 +95,28 @@
<property>
<name>onmousemove</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
- within</description>
+ <description>The client side script method to be called when a pointer is moved within the menu group</description>
</property>
<property>
<name>onmouseout</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
- away</description>
+ <description>The client side script method to be called when a pointer is moved away from the menu group</description>
</property>
<property>
<name>onmouseover</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved
- onto</description>
+ <description>The client side script method to be called when a pointer is moved onto the menu group</description>
</property>
<property>
<name>onopen</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; group was
+ <description>The client side script method to be called when a group is
opened</description>
</property>
<property>
<name>onclose</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; group was
+ <description>The client side script method to be called when a group is
closed</description>
</property>
@@ -246,8 +243,8 @@
<property>
<name>onselect</name>
<classname>java.lang.String</classname>
- <description>HTML: script expression; The onselect event occurs when
- you select some menu item</description>
+ <description>The client side script method to be called when
+ a menu item is selected</description>
</property>
<property hidden="true">
<name>ondblclick</name>
15 years, 7 months
JBoss Rich Faces SVN: r14395 - in branches/community/3.3.X/framework: impl/src/main/java/org/richfaces/model/impl/expressive and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-28 11:12:27 -0400 (Thu, 28 May 2009)
New Revision: 14395
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/ModifiableModel.java
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/JavaBeanWrapper.java
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ObjectWrapperFactory.java
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java
branches/community/3.3.X/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanFilterTest.java
Log:
https://jira.jboss.org/jira/browse/RF-7204
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/ModifiableModel.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/ModifiableModel.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/ModifiableModel.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -54,7 +54,7 @@
private Object key;
- public ExtendedJavaBeanWrapper(Object key, Object o, Map<String, Object> props) {
+ public ExtendedJavaBeanWrapper(Object key, Object o, Map<Object, Object> props) {
super(o, props);
this.key = key;
}
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/JavaBeanWrapper.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/JavaBeanWrapper.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/JavaBeanWrapper.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -29,18 +29,18 @@
*/
public class JavaBeanWrapper {
private Object wrappedObject;
- private Map<String, Object> properties;
+ private Map<Object, Object> properties;
- public JavaBeanWrapper(Object o, Map<String, Object> props) {
+ public JavaBeanWrapper(Object o, Map<Object, Object> props) {
wrappedObject = o;
properties = props;
}
- public Object getProperty(String expression) {
+ public Object getProperty(Object expression) {
return properties.get(expression);
}
- public Map<String, Object> getProperties() {
+ public Map<Object, Object> getProperties() {
return properties;
}
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ObjectWrapperFactory.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ObjectWrapperFactory.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ObjectWrapperFactory.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -22,6 +22,7 @@
package org.richfaces.model.impl.expressive;
import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
@@ -51,7 +52,10 @@
public Object convert(Object o);
}
+ private Object[] expressionKeys;
private Expression [] expressions;
+ private boolean isIdentityKeys = false;
+
private FacesContext context;
private String var;
private Object varValue;
@@ -68,7 +72,8 @@
SortField[] sortFields = sortOrder.getFields();
expressions = new Expression[sortFields.length];
-
+ expressionKeys = new Object[expressions.length];
+
for (int i = 0; i < sortFields.length; i++) {
final SortField field = sortFields[i];
final String name = field.getName();
@@ -85,6 +90,8 @@
expressions[i] = new SimplePropertyExpression(name, elContext, resolver);
}
+
+ expressionKeys[i] = name;
}
@@ -92,6 +99,7 @@
}
public ObjectWrapperFactory(FacesContext context, final String var, List<? extends Field> sortOrder) {
+ this.isIdentityKeys = true;
this.context = context;
Application application = context.getApplication();
@@ -100,6 +108,7 @@
this.var = var;
expressions = new Expression[sortOrder.size()];
+ expressionKeys = new Object[expressions.length];
int i = 0;
for (Field field : sortOrder) {
@@ -125,7 +134,11 @@
} else {
throw new IllegalArgumentException();
}
- expressions[i++] = expression;
+
+ expressions[i] = expression;
+ expressionKeys[i] = elExpression;
+
+ i++;
}
}
@@ -182,11 +195,18 @@
}
public JavaBeanWrapper wrapObject(Object o) {
- Map<String, Object> props = new HashMap<String, Object>();
+ Map<Object, Object> props;
+
+ if (isIdentityKeys) {
+ props = new IdentityHashMap<Object, Object>();
+ } else {
+ props = new HashMap<Object, Object>();
+ }
+
for (int i = 0; i < expressions.length; i++) {
Expression expression = expressions[i];
- props.put(expression.getExpressionString(), expression.evaluate(o));
+ props.put(expressionKeys[i], expression.evaluate(o));
}
return new JavaBeanWrapper(o, props);
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -87,11 +87,10 @@
for (Iterator<SortField2> iterator = sortFields.iterator(); iterator.hasNext() && result == 0;) {
SortField2 field = iterator.next();
Expression expression = field.getExpression();
- String prop = expression.getExpressionString();
Ordering ordering = field.getOrdering();
if (ordering != null) {
- Object p1 = w1.getProperty(prop);
- Object p2 = w2.getProperty(prop);
+ Object p1 = w1.getProperty(expression);
+ Object p2 = w2.getProperty(expression);
if (p1 == p2 && p1 instanceof Comparator) {
result = ((Comparator<Object>)p1).compare(w1.getWrappedObject(), w2.getWrappedObject());
} else if (p1 instanceof String && p2 instanceof String) {
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -47,7 +47,7 @@
public boolean accept(JavaBeanWrapper wrapper) {
for (FilterField filterField : filterFields) {
if (filterField instanceof ExtendedFilterField) {
- Object property = wrapper.getProperty(filterField.getExpression().getExpressionString());
+ Object property = wrapper.getProperty(filterField.getExpression());
String filterValue = ((ExtendedFilterField)filterField).getFilterValue();
if(filterValue != null) {
filterValue = filterValue.trim().toUpperCase(currentLocale);
@@ -58,7 +58,7 @@
}
}
} else {
- Object property = wrapper.getProperty(filterField.getExpression().getExpressionString());
+ Object property = wrapper.getProperty(filterField.getExpression());
if(!((Boolean)property).booleanValue()) {
return false;
}
Modified: branches/community/3.3.X/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanFilterTest.java
===================================================================
--- branches/community/3.3.X/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanFilterTest.java 2009-05-28 13:03:43 UTC (rev 14394)
+++ branches/community/3.3.X/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanFilterTest.java 2009-05-28 15:12:27 UTC (rev 14395)
@@ -21,6 +21,7 @@
package org.richfaces.model.impl.expressive;
import java.util.HashMap;
+import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -38,6 +39,10 @@
private List<FilterField> filterFields;
private WrappedBeanFilter filter;
+
+ private MockValueExpression keyTrue = new MockValueExpression("keyTrue");
+ private MockValueExpression keyFalse = new MockValueExpression("keyFalse");
+
/**
* @param name
*/
@@ -51,7 +56,7 @@
protected void setUp() throws Exception {
super.setUp();
filterFields = new LinkedList<FilterField>();
- filterFields.add(new FilterField(new MockValueExpression("keyTrue")));
+ filterFields.add(new FilterField(keyTrue));
filter = new WrappedBeanFilter(filterFields);
}
@@ -62,6 +67,8 @@
super.tearDown();
filter = null;
filterFields = null;
+ keyTrue = null;
+ keyFalse = null;
}
/**
@@ -77,12 +84,12 @@
*/
public final void testAccept() {
TestObj obj = new TestObj("TestObj");
- Map<String, Object> props = new HashMap<String, Object>();
- props.put("keyTrue", Boolean.TRUE);
- props.put("keyFalse", Boolean.FALSE);
+ Map<Object, Object> props = new IdentityHashMap<Object, Object>();
+ props.put(keyTrue, Boolean.TRUE);
+ props.put(keyFalse, Boolean.FALSE);
JavaBeanWrapper wrapper = new JavaBeanWrapper(obj, props);
assertTrue(filter.accept(wrapper));
- filterFields.add(new FilterField(new MockValueExpression("keyFalse")));
+ filterFields.add(new FilterField(keyFalse));
assertFalse(filter.accept(wrapper));
}
15 years, 7 months
JBoss Rich Faces SVN: r14394 - in branches/community/3.3.X/examples/photoalbum/source/web/src/main: java/org/richfaces/photoalbum/search and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 09:03:43 -0400 (Thu, 28 May 2009)
New Revision: 14394
Added:
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/LoggedUserTracker.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserExpiredPhaseListener.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionExpirationChecker.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Utils.java
Modified:
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/DnDManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Model.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ISearchOption.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ImageSearchHelper.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByAlbum.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByImage.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByShelf.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByTag.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByUser.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/DirectLinkHelper.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/ImageSizeHelper.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/FileUtils.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/HashUtils.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/ImageDimension.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/resources/messages_en.properties
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/WEB-INF/faces-config.xml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/album/albumInfo.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/album/createAlbum.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/contextMenu/CMForShelf.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageAdditionalInfo.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageEditInfo.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/header.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/menu.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/search/result/userResult.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
Log:
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -98,10 +98,11 @@
/**
* Method, that invoked when user want to create new album. Only registered users can create new albums.
* @param shelf - shelf, that will contain new album
+ * @param isShowAlbumAfterCreate - indicate is we need to show created album after create.
*
*/
@Restrict("#{s:hasRole('admin')}")
- public void createAlbum(Shelf shelf){
+ public void createAlbum(Shelf shelf, boolean isShowAlbumAfterCreate){
Album album = new Album();
if(shelf == null){
if(user.getShelves().size() > 0){
@@ -114,6 +115,7 @@
}
}
album.setShelf(shelf);
+ album.setShowAfterCreate(isShowAlbumAfterCreate);
//Reset 'album' component in conversation scope
Contexts.getConversationContext().set(Constants.ALBUM_VARIABLE, album);
}
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -27,8 +27,6 @@
import java.io.File;
import java.io.Serializable;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.security.auth.login.LoginException;
@@ -47,6 +45,7 @@
import org.richfaces.photoalbum.service.IUserAction;
import org.richfaces.photoalbum.util.Environment;
import org.richfaces.photoalbum.util.HashUtils;
+import org.richfaces.photoalbum.util.Utils;
@Name("authenticator")
@Scope(ScopeType.CONVERSATION)
@@ -54,6 +53,8 @@
private static final long serialVersionUID = -4585673256547342140L;
+ @In LoggedUserTracker userTracker;
+
@In @Out
User user;
@@ -91,6 +92,10 @@
user = new User();
return false;
}
+ //Remove previous session id from users store
+ userTracker.removeUserId(user.getId());
+ //Mark current user as actual
+ userTracker.addUserId(user.getId(), Utils.getSession().getId());
identity.addRole(Constants.ADMIN_ROLE);
//Raise event to controller to update Model
Events.instance().raiseEvent(Constants.AUTHENTICATED_EVENT, user);
@@ -112,6 +117,8 @@
*/
public String logout() {
identity.logout();
+ //Remove user from users store
+ userTracker.removeUserId(user.getId());
setConversationStarted(false);
return Constants.LOGOUT_OUTCOME;
}
@@ -193,7 +200,7 @@
private boolean checkUserExist(User user) {
if (userAction.isUserExist(user.getLogin())) {
- addFacesMessage(Constants.REGISTER_LOGIN_NAME_ID, Constants.USER_WITH_THIS_LOGIN_ALREADY_EXIST);
+ Utils.addFacesMessage(Constants.REGISTER_LOGIN_NAME_ID, Constants.USER_WITH_THIS_LOGIN_ALREADY_EXIST);
return true;
}
return false;
@@ -201,22 +208,17 @@
private boolean checkEmailExist(String email) {
if (userAction.isEmailExist(email)) {
- addFacesMessage(Constants.REGISTER_EMAIL_ID, Constants.USER_WITH_THIS_EMAIL_ALREADY_EXIST);
+ Utils.addFacesMessage(Constants.REGISTER_EMAIL_ID, Constants.USER_WITH_THIS_EMAIL_ALREADY_EXIST);
return true;
}
return false;
}
- private void addFacesMessage(String componentId, String message) {
- UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
- UIComponent component = root.findComponent(componentId);
- FacesContext.getCurrentInstance().addMessage(component
- .getClientId(FacesContext.getCurrentInstance()),new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
- }
+
private boolean checkPassword(User user) {
if (!user.getPassword().equals(user.getConfirmPassword())) {
- addFacesMessage(Constants.REGISTER_CONFIRM_PASSWORD_ID, Constants.CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD);
+ Utils.addFacesMessage(Constants.REGISTER_CONFIRM_PASSWORD_ID, Constants.CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD);
return true;
}
return false;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -233,7 +233,9 @@
*/
@Observer(Constants.ALBUM_ADDED_EVENT)
public void onAlbumAdded(Album album){
- model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null, album.getImages());
+ if(album.isShowAfterCreate()){
+ model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null, album.getImages());
+ }
}
/**
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/DnDManager.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/DnDManager.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/DnDManager.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -24,10 +24,6 @@
*
* @author Andrey Markhel
*/
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.context.AjaxContext;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.security.Restrict;
@@ -41,6 +37,7 @@
import org.richfaces.photoalbum.domain.User;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IAlbumAction;
+import org.richfaces.photoalbum.util.Utils;
@Name("dndManager")
public class DnDManager implements DropListener {
@@ -90,7 +87,7 @@
return;
}
Events.instance().raiseEvent(Constants.ALBUM_DRAGGED_EVENT, dragValue, pathOld);
- addTreeToRerender();
+ Utils.addToRerender(Constants.TREE_ID);
}
private void handleImage(Image dragValue, Album dropValue) {
@@ -106,17 +103,8 @@
return;
}
Events.instance().raiseEvent(Constants.IMAGE_DRAGGED_EVENT, dragValue, pathOld);
- addTreeToRerender();
+ Utils.addToRerender(Constants.TREE_ID);
}
- private void addTreeToRerender() {
- try {
- FacesContext fc = FacesContext.getCurrentInstance();
- AjaxContext ac = AjaxContext.getCurrentInstance();
- UIComponent destTree = fc.getViewRoot().findComponent(Constants.TREE_ID);
- ac.addComponentToAjaxRender(destTree);
- } catch (Exception e) {
- System.err.print(e.getMessage());
- }
- }
+
}
Added: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/LoggedUserTracker.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/LoggedUserTracker.java (rev 0)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/LoggedUserTracker.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -0,0 +1,79 @@
+/**
+ * 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.photoalbum.manager;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+
+/**
+ * Special wrapper for Map, that contains pairs(userId, sessionId) to track what sessionId is actual by specified user.
+ * Used to determine need to expire user's session, that session's id not equal to stored in this map.
+ * @author Andrey Markhel
+ */
+@Name("userTracker")
+(a)Scope(ScopeType.APPLICATION)
+@Startup
+public class LoggedUserTracker {
+
+ private Map<Long, String> loginnedUserIds = new HashMap<Long, String>();
+
+ /**
+ * Add user id and session id to store after each successfull authentication. Last authentication will be current
+ * @param id - user id to add
+ * @param sessionId - sessionId
+ */
+ public void addUserId(Long id, String sessionId){
+ loginnedUserIds.put(id, sessionId);
+ }
+
+ /**
+ * Remove user id from store after each logout
+ * @param id - user id to remove
+ */
+ public void removeUserId(Long id){
+ loginnedUserIds.remove(id);
+ }
+
+ /**
+ * Checks if in the store contained user with specified user id and session id
+ * @param id - user id to check
+ * @param sessionId - session id to check
+ * @return true if such user contained in the store, that indicating that current user is actual.
+ */
+ public boolean containsUser(Long id, String sessionId){
+ String sessId = loginnedUserIds.get(id);
+ return sessId != null && sessId.equals(sessionId);
+ }
+
+ /**
+ * Checks if in the store contained user with specified user id
+ * @param id - user id to check
+ * @return true if user with specified id contained in the store
+ */
+ public boolean containsUserId(Long id){
+ return loginnedUserIds.containsKey(id);
+ }
+}
Property changes on: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/LoggedUserTracker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Model.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Model.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Model.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.manager;
import java.io.Serializable;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -157,16 +157,6 @@
return shelves;
}
- /**
- * This method used to populate 'my shelves' tree
- *
- * @return List of users shelves
- *
- */
- public List<Shelf> getUserShelves(){
- return user.getShelves();
- }
-
public boolean isValidationSuccess() {
return validationSuccess;
}
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -26,10 +26,6 @@
*/
import java.io.Serializable;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.context.AjaxContext;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -39,6 +35,7 @@
import org.jboss.seam.core.Events;
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.service.Constants;
+import org.richfaces.photoalbum.util.Utils;
@Name("slideshow")
@Scope(ScopeType.CONVERSATION)
@@ -81,28 +78,16 @@
*
*/
public void startSlideshow(){
- active = true;
- errorDetected = false;
- this.slideshowIndex = 0;
- this.startSlideshowIndex = 0;
+ initSlideshow();
if(model.getImages() == null || model.getImages().size() < 1){
- stopSlideshow();
- errorDetected = true;
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.NO_IMAGES_FOR_SLIDESHOW_ERROR);
+ onError(true);
return;
}
this.selectedImage = model.getImages().get(this.slideshowIndex);
//mark image as 'visited'
this.selectedImage.setVisited(true);
//Check if that image was recently deleted. If yes, immediately stop slideshow process
- FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
- if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
- active = false;
- errorDetected = true;
- model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, this.selectedImage.getAlbum().getOwner(), this.selectedImage.getAlbum().getShelf(), this.selectedImage.getAlbum(), null, this.selectedImage.getAlbum().getImages());
- return;
- }
+ checkIsFileRecentlyDeleted();
}
/**
@@ -111,12 +96,9 @@
*@param selectedImage - first image to show during slideshow
*/
public void startSlideshow(Image selectedImage){
- errorDetected = false;
- active = true;
+ initSlideshow();
if(model.getImages() == null || model.getImages().size() < 1){
- stopSlideshow();
- errorDetected = true;
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.NO_IMAGES_FOR_SLIDESHOW_ERROR);
+ onError(true);
return;
}
this.slideshowIndex = model.getImages().indexOf(selectedImage);
@@ -125,14 +107,7 @@
//mark image as 'visited'
this.selectedImage.setVisited(true);
//Check if that image was recently deleted. If yes, immediately stop slideshow
- FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
- if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
- active = false;
- errorDetected = true;
- model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, this.selectedImage.getAlbum().getOwner(), this.selectedImage.getAlbum().getShelf(), this.selectedImage.getAlbum(), null, this.selectedImage.getAlbum().getImages());
- return;
- }
+ checkIsFileRecentlyDeleted();
}
/**
@@ -170,8 +145,7 @@
*/
public void showNextImage(){
if(!active){
- errorDetected = true;
- addMainAreaToRerender();
+ onError(false);
return;
}
//reset index if we reached last image
@@ -181,24 +155,14 @@
slideshowIndex++;
//To prevent slideshow mechanism working in cycle.
if(slideshowIndex == startSlideshowIndex){
- stopSlideshow();
- errorDetected = true;
- addMainAreaToRerender();
+ onError(false);
return;
}
selectedImage = model.getImages().get(slideshowIndex);
//mark image as 'visited'
this.selectedImage.setVisited(true);
//Check if that image was recently deleted. If yes, stopping slideshow
- FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
- if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
- active = false;
- errorDetected = true;
- addMainAreaToRerender();
- model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, this.selectedImage.getAlbum().getOwner(), this.selectedImage.getAlbum().getShelf(), this.selectedImage.getAlbum(), null, this.selectedImage.getAlbum().getImages());
- return;
- }
+ checkIsFileRecentlyDeleted();
}
public Integer getStartSlideshowIndex() {
@@ -217,14 +181,32 @@
this.errorDetected = errorDetected;
}
- private void addMainAreaToRerender() {
- try {
- FacesContext fc = FacesContext.getCurrentInstance();
- AjaxContext ac = AjaxContext.getCurrentInstance();
- UIComponent mainArea = fc.getViewRoot().findComponent(Constants.MAINAREA_ID);
- ac.addComponentToAjaxRender(mainArea);
- } catch (Exception e) {
- System.err.print(e.getMessage());
+ private void initSlideshow() {
+ active = true;
+ errorDetected = false;
+ this.slideshowIndex = 0;
+ this.startSlideshowIndex = 0;
+ }
+
+ private void onError(boolean isShowOnUI) {
+ stopSlideshow();
+ errorDetected = true;
+ Utils.addToRerender(Constants.MAINAREA_ID);
+ if(isShowOnUI){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.NO_IMAGES_FOR_SLIDESHOW_ERROR);
}
+ return;
}
+
+ private void checkIsFileRecentlyDeleted() {
+ FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
+ if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
+ active = false;
+ errorDetected = true;
+ Utils.addToRerender(Constants.MAINAREA_ID);
+ model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, this.selectedImage.getAlbum().getOwner(), this.selectedImage.getAlbum().getShelf(), this.selectedImage.getAlbum(), null, this.selectedImage.getAlbum().getImages());
+ return;
+ }
+ }
}
\ No newline at end of file
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -35,6 +35,7 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
+import org.richfaces.photoalbum.domain.Album;
import org.richfaces.photoalbum.domain.User;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IUserAction;
@@ -83,6 +84,15 @@
}
/**
+ * This method observes <code>Constants.ALBUM_ADDED_EVENT</code> and invoked after the user add new album
+ * @param album - added album
+ */
+ @Observer(Constants.ALBUM_ADDED_EVENT)
+ public void onAlbumAdded(Album album){
+ user = userAction.refreshUser();
+ }
+
+ /**
* Method, that invoked when user click 'Cancel' button during edit her profile.
*
*/
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ISearchOption.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ISearchOption.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ISearchOption.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ImageSearchHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ImageSearchHelper.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/ImageSearchHelper.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
import java.io.Serializable;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByAlbum.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByAlbum.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByAlbum.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
import java.util.ArrayList;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByImage.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByImage.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByImage.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByShelf.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByShelf.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByShelf.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByTag.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByTag.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByTag.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByUser.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByUser.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/search/SearchOptionByUser.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.search;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/DirectLinkHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/DirectLinkHelper.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/DirectLinkHelper.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.ui;
import java.io.IOException;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.ui;
import org.jboss.seam.ScopeType;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/ImageSizeHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/ImageSizeHelper.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/ImageSizeHelper.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.ui;
Added: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserExpiredPhaseListener.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserExpiredPhaseListener.java (rev 0)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserExpiredPhaseListener.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -0,0 +1,60 @@
+/**
+ * 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.photoalbum.ui;
+
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.core.Events;
+import org.richfaces.photoalbum.service.Constants;
+import org.richfaces.photoalbum.util.Utils;
+/**
+ * Special <code>PhaseListener</code> for check is the user session was expired or user were login in another browser.
+ * By default phaseListener works on <code>PhaseId.RESTORE_VIEW</code> JSF lifecycle phase.
+ * @author Andrey Markhel
+ */
+@Name("phaseListener")
+(a)Scope(ScopeType.EVENT)
+public class UserExpiredPhaseListener implements PhaseListener {
+
+ private static final long serialVersionUID = 1L;
+ private PhaseId phase = PhaseId.RESTORE_VIEW;
+
+ public void beforePhase(PhaseEvent e)
+ {
+ Events.instance().raiseEvent(Constants.CHECK_USER_EXPIRED_EVENT, Utils.getSession());
+ }
+
+ public void afterPhase(PhaseEvent e) {
+ }
+
+ public void setPhase(PhaseId phase) {
+ this.phase = phase;
+ }
+
+ public PhaseId getPhaseId() {
+ return phase;
+ }
+ }
Property changes on: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserExpiredPhaseListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.ui;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/CopyImageStuff.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,5 +1,22 @@
/**
- *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
/**
* Convenience class to determine in which environment application running.
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/FileUtils.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/FileUtils.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/FileUtils.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
import java.awt.Graphics2D;
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/HashUtils.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/HashUtils.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/HashUtils.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
/**
* Convenience class to hash user passwords.
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/ImageDimension.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/ImageDimension.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/ImageDimension.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
/**
* Convenience UI class for represent image object in different dimensions. Each image have 5 thumbnails with different
Added: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionExpirationChecker.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionExpirationChecker.java (rev 0)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionExpirationChecker.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -0,0 +1,73 @@
+/**
+ * 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.photoalbum.util;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.security.Identity;
+import org.jboss.seam.web.Session;
+import org.richfaces.photoalbum.domain.User;
+import org.richfaces.photoalbum.manager.LoggedUserTracker;
+import org.richfaces.photoalbum.service.Constants;
+/**
+ * Utility class for check is the user session was expired or user were login in another browser.
+ * Observes <code>Constants.CHECK_USER_EXPIRED_EVENT</code> event
+ * @author Andrey Markhel
+ */
+(a)Scope(ScopeType.EVENT)
+@Name("sessionExpirationChecker")
+@AutoCreate
+public class SessionExpirationChecker {
+
+ @In User user;
+ @In Identity identity;
+ @In LoggedUserTracker userTracker;
+ /**
+ * Utility method for check is the user session was expired or user were login in another browser.
+ * Observes <code>Constants.CHECK_USER_EXPIRED_EVENT</code> event.
+ * Redirects to error page if user were login in another browser.
+ * @param session - user's session
+ */
+ @Observer(Constants.CHECK_USER_EXPIRED_EVENT)
+ public void checkUserExpiration(HttpSession session){
+ if(isShouldExpireUser(session)){
+ try {
+ Session.instance().invalidate();
+ FacesContext.getCurrentInstance().getExternalContext().redirect("error.seam");
+ } catch (IOException e1) {
+ FacesContext.getCurrentInstance().responseComplete();
+ }
+ }
+ }
+
+ private boolean isShouldExpireUser(HttpSession session) {
+ return identity.isLoggedIn() && user!= null && userTracker.containsUserId(user.getId()) && !userTracker.containsUser(user.getId(), session.getId());
+ }
+}
Property changes on: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionExpirationChecker.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
/**
* This class is session listener that observes <code>"org.jboss.seam.sessionExpired"</code> event to delete in production systems users when it's session is expired
@@ -20,6 +40,7 @@
import org.jboss.seam.core.Events;
import org.richfaces.photoalbum.domain.Comment;
import org.richfaces.photoalbum.domain.User;
+import org.richfaces.photoalbum.manager.LoggedUserTracker;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IImageAction;
@@ -35,7 +56,7 @@
private IImageAction imageAction;
@In(value="entityManager")
private EntityManager em;
-
+ @In LoggedUserTracker userTracker;
@Destroy
@Transactional
@Observer("org.jboss.seam.sessionExpired")
@@ -44,7 +65,7 @@
return;
}
- if(user.getId() != null && !user.isPreDefined()){
+ if(user.getId() != null && !user.isPreDefined() && !userTracker.containsUserId(user.getId())){
user = em.merge(user);
final List<Comment> userComments = imageAction.findAllUserComments(user);
for (Comment c : userComments) {
Added: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Utils.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Utils.java (rev 0)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Utils.java 2009-05-28 13:03:43 UTC (rev 14394)
@@ -0,0 +1,73 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.util;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+
+import org.ajax4jsf.context.AjaxContext;
+/**
+ * Utility class for actions, related to direct access or modification of current request
+ * @author Andrey Markhel
+ */
+public class Utils {
+
+ private Utils(){
+
+ }
+
+ /**
+ * Utility method for adding FacesMessages to specified component
+ * @param componentId - component identifier
+ * @param message - message to add
+ */
+ public static void addFacesMessage(String componentId, String message) {
+ UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
+ UIComponent component = root.findComponent(componentId);
+ FacesContext.getCurrentInstance().addMessage(component
+ .getClientId(FacesContext.getCurrentInstance()),new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
+ }
+
+ /**
+ * Utility method for get reference to current HTTPSession
+ * @return session object
+ */
+ public static HttpSession getSession(){
+ return (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true);
+ }
+
+ /**
+ * Utility method for programmatically adding specified component to rerender after AJAX request complete.
+ * @param componentId - id of component should be added to rerender
+ */
+ public static void addToRerender(String componentId) {
+ try {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ AjaxContext ac = AjaxContext.getCurrentInstance();
+ UIComponent destComponent = fc.getViewRoot().findComponent(componentId);
+ ac.addComponentToAjaxRender(destComponent);
+ } catch (Exception e) {
+ System.err.print(e.getMessage());
+ }
+ }
+}
Property changes on: branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Utils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/resources/messages_en.properties
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/resources/messages_en.properties 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/resources/messages_en.properties 2009-05-28 13:03:43 UTC (rev 14394)
@@ -88,7 +88,7 @@
javax.faces.converter.STRING=value could not be converted to a string
error=Error
-errorStub=Something bad happened :-(
+errorStub=Your session is expired.
comment.label=View comments(#{model.selectedImage.comments.size})
comment.author=Author: #{comment.author.login}
@@ -215,7 +215,7 @@
show_albums=Show albums
author=Author
close=Close
-myAlbumShelfs=My album shelves
+myAlbumShelfs=My shelves
newPhotos=New images
created.shelf=Created
created.album=Created
@@ -261,16 +261,16 @@
keywords=Keywords:
user_profile_=User profile
message_authorHeader=Author
-all_new_images_shelf=All new images(#{model.images.size()}) in shelf #{model.selectedShelf.name}
-all_new_images_album=All new images(#{model.images.size()}) in album #{model.selectedAlbum.name}
+all_new_images_shelf=All new images (#{model.images.size()}) in shelf #{model.selectedShelf.name}
+all_new_images_album=All new images (#{model.images.size()}) in album #{model.selectedAlbum.name}
in_album=in album
-public_shelves=Pre-defined Shelves
-all_images=All images(#{model.images.size()}) related to tag #{model.selectedTag.tag}
+public_shelves=Pre-defined shelves
+all_images_tag=All images (#{model.images.size()}) related to tag #{model.selectedTag.tag}
my_all_albums=My all albums
my_all_photos=My all images
ok=Ok
-all_shared_albums=All shared albums(#{model.selectedUser.sharedAlbums.size()}) of user #{model.selectedUser.login}
-all_shared_images=All shared images(#{model.selectedUser.sharedImages.size()}) of user #{model.selectedUser.login}
+all_shared_albums=All shared albums (#{model.selectedUser.sharedAlbums.size()}) of user #{model.selectedUser.login}
+all_shared_images=All shared images (#{model.selectedUser.sharedImages.size()}) of user #{model.selectedUser.login}
my_album_shelves=My album shelves
cancel=Cancel
save=Save
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/WEB-INF/faces-config.xml 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/WEB-INF/faces-config.xml 2009-05-28 13:03:43 UTC (rev 14394)
@@ -12,5 +12,7 @@
</locale-config>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
-
+ <lifecycle>
+ <phase-listener>org.richfaces.photoalbum.ui.UserExpiredPhaseListener</phase-listener>
+ </lifecycle>
</faces-config>
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/album/albumInfo.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/album/createAlbum.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/contextMenu/CMForShelf.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageAdditionalInfo.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageEditInfo.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/header.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/menu.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/search/result/userResult.xhtml
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-05-28 13:03:43 UTC (rev 14394)
@@ -20,7 +20,7 @@
</h:panelGroup>
</h:panelGrid>
<h:panelGroup layout="block" styleClass="photo_name">
- <h:outputText class="bold" value="#{searchedUser.firstName} #{searchedUser.secondName}"/>
+ <h:outputText styleClass="bold" value="#{searchedUser.firstName} #{searchedUser.secondName}"/>
</h:panelGroup>
<h:panelGroup layout="block" styleClass="photo_data">
<h:outputText value="#{searchedUser.birthDate}" >
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
===================================================================
(Binary files differ)
Modified: branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-28 13:03:11 UTC (rev 14393)
+++ branches/community/3.3.X/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-28 13:03:43 UTC (rev 14394)
@@ -269,7 +269,6 @@
.name {
font-weight: bold;
- width: 115px;
padding: 5px;
margin-top: 3px;
}
15 years, 7 months
JBoss Rich Faces SVN: r14393 - in branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 09:03:11 -0400 (Thu, 28 May 2009)
New Revision: 14393
Modified:
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IUserAction.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/PhotoAlbumException.java
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/UserAction.java
Log:
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Album.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -44,6 +44,8 @@
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
+import javax.persistence.Transient;
+
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
@@ -79,7 +81,10 @@
@OneToOne(fetch = FetchType.LAZY)
private Image coveringImage;
-
+
+ @Transient
+ private boolean showAfterCreate;
+
@Temporal(TemporalType.DATE)
private Date created;
@@ -307,4 +312,12 @@
public String toString() {
return "{id : "+getId()+", name : "+getName()+"}";
}
+
+ public boolean isShowAfterCreate() {
+ return showAfterCreate;
+ }
+
+ public void setShowAfterCreate(boolean showAfterCreate) {
+ this.showAfterCreate = showAfterCreate;
+ }
}
\ No newline at end of file
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.photoalbum.domain;
import java.io.File;
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -234,10 +234,6 @@
return shelves;
}
- public void setShelves(List<Shelf> shelves) {
- this.shelves = shelves;
- }
-
public Sex getSex() {
return sex;
}
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -29,6 +29,7 @@
public class Constants {
//Events
+ public static final String CHECK_USER_EXPIRED_EVENT = "checkUserExpiredEvent";
public static final String ADD_ERROR_EVENT = "addErrorEvent";
public static final String ALBUM_DELETED_EVENT = "albumDeleted";
public static final String ALBUM_EDITED_EVENT = "albumEdited";
@@ -159,19 +160,19 @@
public static final String TAG_BY_NAME_QUERY = "tag-byName";
public static final String SEARCH_SHELF_SHARED_ADDON = " and sh.shared=true";
public static final String SEARCH_SHELF_MY_ADDON = " and sh.owner.login=:login";
- public static final String SEARCH_SHELF_BOTH_ADDON = " and sh.shared=true or sh.owner.login=:login";
+ public static final String SEARCH_SHELF_BOTH_ADDON = " and (sh.shared=true or sh.owner.login=:login)";
public static final String SEARCH_SHELVES_QUERY = "from Shelf sh where (lower(sh.name) like :queryString or lower(sh.description) like :queryString) ";
public static final String SEARCH_METATAG_QUERY = "from MetaTag t where lower(t.tag) like :queryString";
public static final String SEARCH_USERS_QUERY = "select u from User u where (lower(u.login) like :queryString or lower(u.firstName) like :queryString or lower(u.secondName) like :queryString) ";
public static final String SEARCH_IMAGE_SHARED_ADDON = " and i.album.shelf.shared=true";
public static final String SEARCH_IMAGE_MY_ADDON = " and i.album.shelf.owner.login=:login";
- public static final String SEARCH_IMAGE_BOTH_ADDON = " and i.album.shelf.shared=true or i.album.shelf.owner.login=:login";
+ public static final String SEARCH_IMAGE_BOTH_ADDON = " and (i.album.shelf.shared=true or i.album.shelf.owner.login=:login)";
public static final String SEARCH_IMAGE_QUERY = "from Image i where (lower(i.name) like :queryString or lower(i.description) like :queryString or lower(i.cameraModel) like :queryString) ";
public static final String SHARED_PARAMETER = "shared";
public static final String QUERY_PARAMETER = "queryString";
public static final String SEARCH_ALBUM_SHARED_ADDON = " and a.shelf.shared=true";
public static final String SEARCH_ALBUM_MY_ADDON = " and a.shelf.owner.login=:login";
- public static final String SEARCH_ALBUM_BOTH_ADDON = " and a.shelf.shared=true or a.shelf.owner.login=:login";
+ public static final String SEARCH_ALBUM_BOTH_ADDON = " and (a.shelf.shared=true or a.shelf.owner.login=:login)";
public static final String SEARCH_ALBUM_QUERY = "from Album a where (lower(a.name) like :queryString or lower(a.description) like :queryString)";
public static final String USER_SHELVES_QUERY = "user-shelves";
public static final String SHELF_PARAMETER = "shelf";
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IUserAction.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IUserAction.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IUserAction.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -36,5 +36,6 @@
public void register(User user) throws PhotoAlbumException;
public boolean isUserExist(String login) ;
public User updateUser() throws PhotoAlbumException;
+ public User refreshUser();
public boolean isEmailExist(String email);
}
\ No newline at end of file
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/PhotoAlbumException.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/PhotoAlbumException.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/PhotoAlbumException.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -1,3 +1,23 @@
+/**
+ * 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.photoalbum.service;
import javax.ejb.ApplicationException;
Modified: branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/UserAction.java
===================================================================
--- branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/UserAction.java 2009-05-28 12:48:06 UTC (rev 14392)
+++ branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/UserAction.java 2009-05-28 13:03:11 UTC (rev 14393)
@@ -89,6 +89,18 @@
}
/**
+ * Refresh state of user entity with database
+ * @Param user - user to refresh
+ * @return user if success
+ * @throws PhotoAlbumException
+ */
+ public User refreshUser(){
+ user = em.find(User.class, user.getId());
+ em.refresh(user);
+ return user;
+ }
+
+ /**
* Check if user with specified login already exist
* @return is user with specified login already exist
*/
15 years, 7 months
JBoss Rich Faces SVN: r14392 - branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:48:06 -0400 (Thu, 28 May 2009)
New Revision: 14392
Modified:
branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
Fix RF-3279
Modified: branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2009-05-28 12:41:10 UTC (rev 14391)
+++ branches/community/3.3.X/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2009-05-28 12:48:06 UTC (rev 14392)
@@ -250,10 +250,7 @@
this.toolTip.style.visibility = "hidden";
this.toolTip.style.display = 'block';
this.setToolTipPosition(e);
- } else {
- this.toolTipContent.innerHTML = "";
- }
- var event = A4J.AJAX.CloneObject(e, false);
+ var event = A4J.AJAX.CloneObject(e, false);
var ajaxOptions = this.ajaxOptions;
if(this.clientAjaxParams){
if(e.clientX){
@@ -267,6 +264,7 @@
Object.extend(ajaxOptions['parameters'], this.clientAjaxParams);
}
+ }
if (this.delay>0)
{
this.setToolTipPosition(e);
15 years, 7 months
JBoss Rich Faces SVN: r14391 - branches/community/3.3.X/samples/violetRays.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:41:10 -0400 (Thu, 28 May 2009)
New Revision: 14391
Modified:
branches/community/3.3.X/samples/violetRays/
Log:
Property changes on: branches/community/3.3.X/samples/violetRays
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
15 years, 7 months
JBoss Rich Faces SVN: r14390 - in branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:40:55 -0400 (Thu, 28 May 2009)
New Revision: 14390
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
Log:
Fix RF-7181
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-05-28 12:40:25 UTC (rev 14389)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2009-05-28 12:40:55 UTC (rev 14390)
@@ -71,7 +71,7 @@
private static final Log log = LogFactory.getLog(AjaxContext.class);
- Set<String> ajaxAreasToRender = new HashSet<String>();
+ Set<String> ajaxAreasToRender = new LinkedHashSet<String>();
Set<String> ajaxAreasToProcess = null;
@@ -100,7 +100,7 @@
public void release() {
- ajaxAreasToRender = new HashSet<String>();
+ ajaxAreasToRender = new LinkedHashSet<String>();
ajaxAreasToProcess = null;
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-05-28 12:40:25 UTC (rev 14389)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2009-05-28 12:40:55 UTC (rev 14390)
@@ -28,6 +28,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -540,24 +541,24 @@
if (null != valueToSet) {
// Simplest case - set.
if (valueToSet instanceof Set) {
- return (Set<String>) valueToSet;
+ return new LinkedHashSet<String>((Set<String>)valueToSet);
}
// Other collections.
else if (valueToSet instanceof Collection) {
- return new HashSet<String>((Collection<String>) valueToSet);
+ return new LinkedHashSet<String>((Collection<String>) valueToSet);
}
// Array
else if (OBJECT_ARRAY_CLASS.isAssignableFrom(valueToSet.getClass())) {
- return new HashSet<String>(Arrays.asList((String[]) valueToSet));
+ return new LinkedHashSet<String>(Arrays.asList((String[]) valueToSet));
}
// Tokenize string.
else if (valueToSet instanceof String) {
String areasString = (String) valueToSet;
if (areasString.indexOf(",") > 0) {
- return new HashSet<String>(Arrays.asList(areasString.trim().split(
+ return new LinkedHashSet<String>(Arrays.asList(areasString.trim().split(
"(\\s)*,(\\s)*")));
} else {
- Set<String> areasSet = new HashSet<String>(5);
+ Set<String> areasSet = new LinkedHashSet<String>(5);
areasSet.add(areasString.trim());
return areasSet;
}
15 years, 7 months
JBoss Rich Faces SVN: r14389 - branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:40:25 -0400 (Thu, 28 May 2009)
New Revision: 14389
Modified:
branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
Log:
Fix RF-3279
Modified: branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2009-05-28 12:40:02 UTC (rev 14388)
+++ branches/community/3.3.X/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2009-05-28 12:40:25 UTC (rev 14389)
@@ -341,7 +341,7 @@
// we want to avoid rendering toolTip content during initialy page
// displaying
AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
- if (ajaxContext != null && ajaxContext.getAjaxAreasToRender().contains(clientId + "content")) {
+ if (ajaxContext != null && (ajaxContext.getAjaxAreasToRender().contains(clientId + "content") || !ajaxContext.isAjaxRequest())) {
responseWriter.write(value != null ? value.toString() : "");
15 years, 7 months
JBoss Rich Faces SVN: r14388 - branches/community/3.3.X/ui/pickList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:40:02 -0400 (Thu, 28 May 2009)
New Revision: 14388
Modified:
branches/community/3.3.X/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
Fix RF-4388
Modified: branches/community/3.3.X/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- branches/community/3.3.X/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-05-28 12:39:30 UTC (rev 14387)
+++ branches/community/3.3.X/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-05-28 12:40:02 UTC (rev 14388)
@@ -34,6 +34,7 @@
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
@@ -114,7 +115,7 @@
List <Object> valuesList = new ArrayList<Object>();
- Object value = pickList.getValue();
+ Object value = getCurrentValue(FacesContext.getCurrentInstance(), pickList);
if(null == value || "".equals(value)) {
return valuesList;
@@ -148,6 +149,27 @@
}
+ /**
+ * @param context the FacesContext for the current request
+ * @param component the UIComponent whose value we're interested in
+ *
+ * @return the value to be rendered and formats it if required. Sets to
+ * empty string if value is null.
+ */
+ protected Object getCurrentValue(FacesContext context,
+ UIComponent component) {
+
+ if (component instanceof UIInput) {
+ Object submittedValue = ((UIInput) component).getSubmittedValue();
+ if (submittedValue != null) {
+ return submittedValue;
+ }
+ }
+ Object currentValue = ((UIPickList)component).getValue();
+ return currentValue;
+
+ }
+
protected List <SelectItem> selectItemsForAvailableList(FacesContext facesContext, UIComponent uiComponent, List<SelectItem> selectItemList,
List<SelectItem> selectItemsForSelectedList) {
15 years, 7 months
JBoss Rich Faces SVN: r14387 - in branches/community/3.3.X/ui/message/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-28 08:39:30 -0400 (Thu, 28 May 2009)
New Revision: 14387
Added:
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/MessagesLevelEnum.java
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/RichMessageLevelHelper.java
Modified:
branches/community/3.3.X/ui/message/src/main/config/component/message.xml
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessage.java
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessageRenderer.java
branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
Fix RF-5145 RF-5107
Modified: branches/community/3.3.X/ui/message/src/main/config/component/message.xml
===================================================================
--- branches/community/3.3.X/ui/message/src/main/config/component/message.xml 2009-05-28 12:36:13 UTC (rev 14386)
+++ branches/community/3.3.X/ui/message/src/main/config/component/message.xml 2009-05-28 12:39:30 UTC (rev 14387)
@@ -59,10 +59,16 @@
<description>
A comma-separated list of messages categories which should be displayed. Default value is "ALL".
</description>
- <defaultvalue>"ALL"</defaultvalue>
</property>
+ <property>
+ <name>minLevel</name>
+ <classname>java.lang.String</classname>
+ <description>
+ A minimum level of messages categories which should be displayed.
+ </description>
+ </property>
<property attachedstate="true" hidden="true">
<name>passedLabel</name>
<classname>java.lang.String</classname>
@@ -344,10 +350,17 @@
<description>
A comma-separated list of messages categories which should be displayed. Default value is "ALL".
</description>
- <defaultvalue>"ALL"</defaultvalue>
</property>
<property>
+ <name>minLevel</name>
+ <classname>java.lang.String</classname>
+ <description>
+ A minimum level of messages categories which should be displayed.
+ </description>
+
+ </property>
+ <property>
<name>for</name>
<classname>java.lang.String</classname>
<description>
Added: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/MessagesLevelEnum.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/MessagesLevelEnum.java (rev 0)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/MessagesLevelEnum.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -0,0 +1,47 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.component;
+
+/**
+ * @author Andrey Markhel
+ * This class is enumeration of all possible <code>FacesMessages.SEVERITY</code> levels of errors
+ *
+ */
+public enum MessagesLevelEnum {
+ PASSED, INFO, WARN, FATAL, ERROR;
+
+ /**
+ * This method return all levels of errors to be rendered(all with severity higher then specified min level and also min level)
+ * @param level - string representation of minimum level of error should be rendered
+ * @return all levels of errors to be rendered(all with severity higher then specified min level and also min level)
+ */
+ public static MessagesLevelEnum[] getHigherLevels(String level) {
+ MessagesLevelEnum [] all = values();
+ for (int i = 0; i < all.length; i++) {
+ if (all[i].name().equals(level.toUpperCase().trim())) {
+ MessagesLevelEnum [] levels = new MessagesLevelEnum [all.length - i];
+ System.arraycopy(all, i, levels, 0, all.length - i);
+ return levels;
+ }
+ }
+ return values();
+ }
+}
Property changes on: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/MessagesLevelEnum.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/RichMessageLevelHelper.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/RichMessageLevelHelper.java (rev 0)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/RichMessageLevelHelper.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.component;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+/**
+ * @author Andrey Markhel
+ * This utility class used in determination levels of errors should be rendered.
+ *
+ */
+public class RichMessageLevelHelper {
+
+ private RichMessageLevelHelper(){
+
+ }
+
+ public static List<String> getSeverenities(UIComponent msg){
+ UIRichMessage richMessage = null;
+ UIRichMessages richMessages = null;
+ String level = null;
+ String minLevel = null;
+ if(msg instanceof UIRichMessages){
+ richMessages = (UIRichMessages)msg;
+ level = richMessages.getLevel();
+ minLevel = richMessages.getMinLevel();
+ }else if(msg instanceof UIRichMessage){
+ richMessage = (UIRichMessage)msg;
+ level = richMessage.getLevel();
+ minLevel = richMessage.getMinLevel();
+ }
+ if(level != null && minLevel != null){
+ System.err.println("ERROR: To properly working of component you must specify only one attribbute(minLevel or level)");
+ }
+ if(null == level && null == minLevel){
+ level = "ALL";
+ }
+ List<String> severenities;
+ if (null != level) {
+ String[] levels = level.split(",");
+ severenities = new ArrayList<String>(levels.length);
+ for (int i = 0; i < levels.length; i++) {
+ String levelName = levels[i].toUpperCase().trim();
+ severenities.add(levelName);
+ }
+ } else if(null != minLevel){
+ String min = minLevel;
+ MessagesLevelEnum[] levels = MessagesLevelEnum.getHigherLevels(min.toUpperCase().trim());
+ severenities = new ArrayList<String>(levels.length);
+ for (int i = 0; i < levels.length; i++) {
+ String levelName = levels[i].name().trim();
+ severenities.add(levelName);
+ }
+ }
+ else {
+ severenities = Collections.emptyList();
+ }
+ return severenities;
+ }
+}
Property changes on: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/RichMessageLevelHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessage.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessage.java 2009-05-28 12:36:13 UTC (rev 14386)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessage.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -35,6 +35,7 @@
public abstract class UIRichMessage extends UIMessage implements AjaxOutput{
private boolean isPassed = false;
+ private boolean ajaxRendered = true;
public boolean isPassed() {
return isPassed;
@@ -45,13 +46,11 @@
public abstract void setPassedLabel(String passedLabel);
public boolean isAjaxRendered() {
- return true;
+ return ajaxRendered;
}
public void setAjaxRendered(boolean ajaxRendered) {
- if(!ajaxRendered){
- new IllegalArgumentException();
- }
+ this.ajaxRendered = ajaxRendered;
}
public void decode(FacesContext context) {
@@ -72,6 +71,30 @@
public abstract String getLevel();
public abstract void setLevel(String level);
+
+ public abstract String getMinLevel();
-
+ public abstract void setMinLevel(String minLevel);
+
+ private Object[] values;
+
+ public Object saveState(FacesContext context) {
+
+ if (values == null) {
+ values = new Object[3];
+ }
+
+ values[0] = super.saveState(context);
+ values[1] = this.ajaxRendered;
+ return (values);
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void restoreState(FacesContext context, Object state) {
+
+ values = (Object[]) state;
+ super.restoreState(context, values[0]);
+ ajaxRendered = (Boolean) values[1];
+ }
}
Modified: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2009-05-28 12:36:13 UTC (rev 14386)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -25,7 +25,6 @@
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -39,6 +38,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.component.AjaxOutput;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.renderkit.RendererUtils;
/**
@@ -51,7 +51,7 @@
private String forVal = null;
private boolean updated = false;
-
+ private boolean ajaxRendered = true;
private List<FacesMessageWithId> renderedMessages;
/**
@@ -99,8 +99,12 @@
}
public boolean isAjaxRendered() {
- return true;
+ return ajaxRendered;
}
+
+ public void setAjaxRendered(boolean ajaxRendered) {
+ this.ajaxRendered = ajaxRendered;
+ }
public Iterator<FacesMessage> getMessages(FacesContext context) {
String forInputId = getFor();
@@ -189,6 +193,10 @@
if (severenities.size() == 0 || severenities.contains("ALL")) {
return true;
}
+ AjaxContext ac = AjaxContext.getCurrentInstance(FacesContext.getCurrentInstance());
+ if(ac.isAjaxRequest() && !this.isAjaxRendered()){
+ return false;
+ }
Severity severity = message.getSeverity();
for (Object key : FacesMessage.VALUES_MAP.keySet()) {
Severity sev = (Severity) FacesMessage.VALUES_MAP.get(key);
@@ -199,12 +207,6 @@
return false;
}
- public void setAjaxRendered(boolean ajaxRendered) {
- if (!ajaxRendered) {
- new IllegalArgumentException();
- }
- }
-
@Override
public void encodeBegin(FacesContext context) throws IOException {
if (!isUpdated()) {
@@ -216,21 +218,13 @@
public abstract String getLevel();
public abstract void setLevel(String level);
+
+ public abstract String getMinLevel();
+ public abstract void setMinLevel(String level);
+
public List<String> getSeverenities() {
- String level = getLevel();
- List<String> severenities;
- if (null != level) {
- String[] levels = level.split(",");
- severenities = new ArrayList<String>(levels.length);
- for (int i = 0; i < levels.length; i++) {
- String levelName = levels[i].toUpperCase().trim();
- severenities.add(levelName);
- }
- } else {
- severenities = Collections.emptyList();
- }
- return severenities;
+ return RichMessageLevelHelper.getSeverenities(this);
}
private Object[] values;
@@ -238,12 +232,13 @@
public Object saveState(FacesContext context) {
if (values == null) {
- values = new Object[3];
+ values = new Object[4];
}
values[0] = super.saveState(context);
values[1] = this.forVal;
- values[2] = saveAttachedState(context, getRenderedMessages());
+ values[2] = this.ajaxRendered;
+ values[3] = saveAttachedState(context, getRenderedMessages());
return (values);
}
@@ -254,8 +249,9 @@
values = (Object[]) state;
super.restoreState(context, values[0]);
forVal = (String) values[1];
+ ajaxRendered = (Boolean) values[2];
setRenderedMessages((List<FacesMessageWithId>) restoreAttachedState(
- context, values[2]));
+ context, values[3]));
}
/**
Modified: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessageRenderer.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessageRenderer.java 2009-05-28 12:36:13 UTC (rev 14386)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessageRenderer.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -31,6 +31,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.richfaces.component.RichMessageLevelHelper;
import org.richfaces.component.UIRichMessage;
import org.richfaces.renderkit.RichMessageBaseRenderer;
@@ -60,16 +61,13 @@
msgIter = getMessageIterator(context, forClientId, msgComponent);
writer.startElement(HTML.SPAN_ELEM, msgComponent);
getUtils().writeAttribute(writer, HTML.id_ATTRIBUTE, msgComponent.getClientId(context));
-
if(!msgIter.hasNext() && msgComponent.isPassed()){
encodingUIContent(msgComponent, context, null);
}else if(msgIter.hasNext() ){
-
- FacesMessage message = (FacesMessage)msgIter.next();
- encodingUIContent(msgComponent, context, message);
-
+ FacesMessage message = (FacesMessage)msgIter.next();
+ encodingUIContent(msgComponent, context, message);
}
writer.endElement(HTML.SPAN_ELEM);
@@ -79,8 +77,10 @@
protected void encodingUIContent(UIRichMessage uiMsg, FacesContext context, FacesMessage facesMsg) throws IOException{
ResponseWriter writer = context.getResponseWriter();
-
- List<String> acceptLevels = creatAcceptLevels(uiMsg.getLevel().split(","));
+
+ List<String> severenities = RichMessageLevelHelper.getSeverenities(uiMsg);
+ String[] levels = new String[severenities .size()];
+ List<String> acceptLevels = creatAcceptLevels(severenities.toArray(levels));
if(isAcceptableMessage(facesMsg, acceptLevels)){
outerStyles(uiMsg, context, writer, facesMsg);
renderMarkerFacet(uiMsg,context, writer,facesMsg);
Modified: branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2009-05-28 12:36:13 UTC (rev 14386)
+++ branches/community/3.3.X/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2009-05-28 12:39:30 UTC (rev 14387)
@@ -80,7 +80,6 @@
}
// messagesIter = getMessageIterator(context, forIds, component);
-
if(!messagesIter.hasNext()){
renderBody(uiMessages, context, writer, null,isWroteTable);
}else{
15 years, 7 months