Author: nbelaevski
Date: 2009-07-01 10:47:30 -0400 (Wed, 01 Jul 2009)
New Revision: 14764
Added:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java
Modified:
branches/community/3.3.X/samples/richfaces-demo/pom.xml
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateBean.java
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateDataModel.java
branches/community/3.3.X/samples/richfaces-demo/src/main/resources/JIRA.csv
branches/community/3.3.X/samples/richfaces-demo/src/main/resources/hibernate.cfg.xml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/components.xml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/modifiableModel.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7061
Modified: branches/community/3.3.X/samples/richfaces-demo/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/pom.xml 2009-07-01 13:48:53 UTC (rev
14763)
+++ branches/community/3.3.X/samples/richfaces-demo/pom.xml 2009-07-01 14:47:30 UTC (rev
14764)
@@ -390,6 +390,11 @@
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.3.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
Added:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java
(rev 0)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/BaseModifiableHibernateDataModel.java 2009-07-01
14:47:30 UTC (rev 14764)
@@ -0,0 +1,187 @@
+package org.richfaces.demo.modifiableModel;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.el.ELException;
+import javax.el.Expression;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SequenceRange;
+import org.hibernate.Criteria;
+import org.hibernate.Session;
+import org.hibernate.criterion.MatchMode;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.richfaces.model.ExtendedFilterField;
+import org.richfaces.model.FilterField;
+import org.richfaces.model.Modifiable;
+import org.richfaces.model.Ordering;
+import org.richfaces.model.SortField2;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.2
+ */
+public abstract class BaseModifiableHibernateDataModel<T> extends ExtendedDataModel
implements Modifiable {
+
+ private Class<T> entityClass;
+
+ public BaseModifiableHibernateDataModel(Class<T> entityClass) {
+ super();
+ this.entityClass = entityClass;
+ }
+
+ private T dataItem;
+
+ private SequenceRange cachedRange;
+
+ private List<T> cachedItems;
+
+ private List<FilterField> filterFields;
+
+ private List<SortField2> sortFields;
+
+ private static boolean areEqualRanges(SequenceRange range1, SequenceRange range2) {
+ if (range1 == null || range2 == null) {
+ return range1 == null && range2 == null;
+ } else {
+ return range1.getFirstRow() == range2.getFirstRow() && range1.getRows() ==
range2.getRows();
+ }
+ }
+
+ private Criteria createCriteria() {
+ return getSession().createCriteria(entityClass);
+ }
+
+ private void appendFilters(FacesContext context, Criteria criteria) {
+ if (filterFields != null) {
+ for (FilterField filterField : filterFields) {
+ String propertyName = getPropertyName(context, filterField.getExpression());
+
+ String filterValue = ((ExtendedFilterField) filterField).getFilterValue();
+ if (filterValue != null && filterValue.length() != 0) {
+ criteria.add(Restrictions.like(propertyName,
+ filterValue,
+ MatchMode.ANYWHERE).ignoreCase());
+ }
+ }
+ }
+ }
+
+ private void appendSorts(FacesContext context, Criteria criteria) {
+ if (sortFields != null) {
+ for (SortField2 sortField : sortFields) {
+ Ordering ordering = sortField.getOrdering();
+
+ if (Ordering.ASCENDING.equals(ordering) || Ordering.DESCENDING.equals(ordering)) {
+ String propertyName = getPropertyName(context, sortField.getExpression());
+
+ Order order = Ordering.ASCENDING.equals(ordering) ?
+ Order.asc(propertyName) : Order.desc(propertyName);
+
+ criteria.addOrder(order.ignoreCase());
+ }
+ }
+ }
+ }
+
+ private String getPropertyName(FacesContext facesContext, Expression expression) {
+ try {
+ return (String) ((ValueExpression) expression).getValue(facesContext.getELContext());
+ } catch (ELException e) {
+ throw new FacesException(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ public Object getRowKey() {
+ return dataItem;
+ }
+
+ @Override
+ public void setRowKey(Object key) {
+ this.dataItem = entityClass.cast(key);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void walk(FacesContext facesContext, DataVisitor visitor, Range range,
+ Object argument) throws IOException {
+
+ SequenceRange sequenceRange = (SequenceRange) range;
+
+ if (this.cachedItems == null || !areEqualRanges(this.cachedRange, sequenceRange)) {
+ Criteria criteria = createCriteria();
+ appendFilters(facesContext, criteria);
+ appendSorts(facesContext, criteria);
+
+ if (sequenceRange != null) {
+ int first = sequenceRange.getFirstRow();
+ int rows = sequenceRange.getRows();
+
+ criteria.setFirstResult(first);
+ if (rows > 0) {
+ criteria.setMaxResults(rows);
+ }
+ }
+
+ this.cachedRange = sequenceRange;
+ this.cachedItems = criteria.list();
+ }
+
+ for (T item: this.cachedItems) {
+ visitor.process(facesContext, item, argument);
+ }
+ }
+
+ @Override
+ public int getRowCount() {
+ Criteria criteria = createCriteria();
+ appendFilters(FacesContext.getCurrentInstance(), criteria);
+ return (Integer) criteria.list().size();
+ }
+
+ @Override
+ public Object getRowData() {
+ return this.dataItem;
+ }
+
+ @Override
+ public int getRowIndex() {
+ return -1;
+ }
+
+ @Override
+ public Object getWrappedData() {
+ return null;
+ }
+
+ @Override
+ public boolean isRowAvailable() {
+ return (this.dataItem != null);
+ }
+
+ @Override
+ public void setRowIndex(int rowIndex) {
+ }
+
+ @Override
+ public void setWrappedData(Object data) {
+ }
+
+ public void modify(List<FilterField> filterFields, List<SortField2>
sortFields) {
+ this.filterFields = filterFields;
+ this.sortFields = sortFields;
+
+ this.cachedItems = null;
+ this.cachedRange = null;
+ }
+
+ protected abstract Session getSession();
+}
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateBean.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateBean.java 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateBean.java 2009-07-01
14:47:30 UTC (rev 14764)
@@ -8,27 +8,36 @@
import java.io.InputStreamReader;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
import javax.faces.FacesException;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.classic.Session;
-import org.richfaces.model.SortOrder;
+import org.hibernate.Session;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.log.Log;
/**
- * @author mikalaj
- *
+ * @author Nick Belaevski
+ * @since 3.3.1
*/
+(a)Scope(ScopeType.APPLICATION)
+@Startup
+@Name("hibernateBean")
public class HibernateBean {
- private SessionFactory factory;
+ @Logger
+ private Log log;
+ @In
+ private Session hibernateSession;
+
private static final String[] CSV_FIELDS = {
- "issueType", "key", "summary",
- "assignee", "fixVersion", "reporter",
"priority", "status",
+ "key", "summary", "assignee", "fixVersion",
"reporter", "priority", "status",
"resolution", "created", "updated"
};
@@ -55,14 +64,8 @@
}
}
- public HibernateBean() {
- Configuration configuration = new Configuration();
- configuration.addResource("dataItem.hbm.xml");
- configuration.configure();
-
- factory = configuration.buildSessionFactory();
- Session session = factory.openSession();
-
+ @Create
+ public void fillDatabase() {
BufferedReader reader = null;
try {
reader = new BufferedReader(
@@ -78,40 +81,29 @@
try {
CSV_FIELDS_SETTERS[i].invoke(dataItem, split[i]);
} catch (IllegalArgumentException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} catch (IllegalAccessException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} catch (InvocationTargetException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
}
}
- session.persist(dataItem);
+ hibernateSession.persist(dataItem);
}
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error(e.getMessage(), e);
}
}
-
- session.flush();
- session.close();
+ hibernateSession.flush();
}
-
- public SessionFactory getSessionFactory() {
- return factory;
- }
-
+
}
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateDataModel.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateDataModel.java 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/modifiableModel/HibernateDataModel.java 2009-07-01
14:47:30 UTC (rev 14764)
@@ -1,234 +1,30 @@
-/**
- * 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.demo.modifiableModel;
-import java.io.IOException;
-import java.util.List;
-import javax.annotation.PreDestroy;
-import javax.el.ELException;
-import javax.el.Expression;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.ajax4jsf.model.SequenceRange;
-import org.hibernate.Criteria;
import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.criterion.MatchMode;
-import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Restrictions;
-import org.richfaces.model.ExtendedFilterField;
-import org.richfaces.model.FilterField;
-import org.richfaces.model.Modifiable;
-import org.richfaces.model.Ordering;
-import org.richfaces.model.SortField2;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
/**
* @author Nick Belaevski
- * @since 3.3.1
+ * @since 3.3.2
*/
-public class HibernateDataModel extends ExtendedDataModel implements Modifiable {
+(a)Scope(ScopeType.STATELESS)
+@Name("hibernateDataModel")
+public class HibernateDataModel extends BaseModifiableHibernateDataModel<DataItem>
{
- private SessionFactory sessionFactory;
-
- public void setSessionFactory(SessionFactory sessionFactory) {
- this.sessionFactory = sessionFactory;
- }
+ @In
+ private Session hibernateSession;
- private Session session;
-
- protected Session getSession() {
- if (session == null) {
- session = sessionFactory.openSession();
- }
-
- return session;
+ public HibernateDataModel() {
+ super(DataItem.class);
}
-
- @PreDestroy
- public void destroy() {
- if (session != null) {
- session.close();
- }
- }
-
- private Long rowKey;
-
- private DataItem dataItem;
-
- private SequenceRange cachedRange;
-
- private List<DataItem> cachedItems;
- private List<FilterField> filterFields;
-
- private List<SortField2> sortFields;
-
- private static boolean areEqualRanges(SequenceRange range1, SequenceRange range2) {
- if (range1 == null || range2 == null) {
- return range1 == null && range2 == null;
- } else {
- return range1.getFirstRow() == range2.getFirstRow() && range1.getRows() ==
range2.getRows();
- }
- }
-
- private Criteria createCriteria() {
- return getSession().createCriteria(DataItem.class);
- }
-
- private void appendFilters(FacesContext context, Criteria criteria) {
- if (filterFields != null) {
- for (FilterField filterField : filterFields) {
- String propertyName = getPropertyName(context, filterField.getExpression());
-
- String filterValue = ((ExtendedFilterField) filterField).getFilterValue();
- if (filterValue != null && filterValue.length() != 0) {
- criteria.add(Restrictions.like(propertyName,
- filterValue,
- MatchMode.ANYWHERE).ignoreCase());
- }
- }
- }
- }
-
- private void appendSorts(FacesContext context, Criteria criteria) {
- if (sortFields != null) {
- for (SortField2 sortField : sortFields) {
- Ordering ordering = sortField.getOrdering();
-
- if (Ordering.ASCENDING.equals(ordering) || Ordering.DESCENDING.equals(ordering)) {
- String propertyName = getPropertyName(context, sortField.getExpression());
-
- Order order = Ordering.ASCENDING.equals(ordering) ?
- Order.asc(propertyName) : Order.desc(propertyName);
-
- criteria.addOrder(order.ignoreCase());
- }
- }
- }
- }
-
- private String getPropertyName(FacesContext facesContext, Expression expression) {
- try {
- return (String) ((ValueExpression) expression).getValue(facesContext.getELContext());
- } catch (ELException e) {
- throw new FacesException(e.getMessage(), e);
- }
- }
-
@Override
- public Object getRowKey() {
- return rowKey;
+ protected Session getSession() {
+ return hibernateSession;
}
- @Override
- public void setRowKey(Object key) {
- this.rowKey = (Long) key;
- this.dataItem = null;
-
- if (this.rowKey != null) {
- this.dataItem = (DataItem) session.load(DataItem.class, this.rowKey);
- }
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void walk(FacesContext facesContext, DataVisitor visitor, Range range,
- Object argument) throws IOException {
-
- SequenceRange sequenceRange = (SequenceRange) range;
-
- if (this.cachedItems == null || !areEqualRanges(this.cachedRange, sequenceRange)) {
- Criteria criteria = createCriteria();
- appendFilters(facesContext, criteria);
- appendSorts(facesContext, criteria);
-
- if (sequenceRange != null) {
- int first = sequenceRange.getFirstRow();
- int rows = sequenceRange.getRows();
-
- criteria.setFirstResult(first);
- if (rows > 0) {
- criteria.setMaxResults(rows);
- }
- }
-
- this.cachedRange = sequenceRange;
- this.cachedItems = criteria.list();
- }
-
- //System.out.println(getRowCount());
-
- for (DataItem item: cachedItems) {
- visitor.process(facesContext, item.getId(), argument);
- }
- }
-
- @Override
- public int getRowCount() {
- Criteria criteria = createCriteria();
- appendFilters(FacesContext.getCurrentInstance(), criteria);
- return (Integer) criteria.list().size();
- }
-
- @Override
- public Object getRowData() {
- return this.dataItem;
- }
-
- @Override
- public int getRowIndex() {
- return -1;
- }
-
- @Override
- public Object getWrappedData() {
- return null;
- }
-
- @Override
- public boolean isRowAvailable() {
- return (this.dataItem != null);
- }
-
- @Override
- public void setRowIndex(int rowIndex) {
- }
-
- @Override
- public void setWrappedData(Object data) {
- }
-
- public void modify(List<FilterField> filterFields, List<SortField2>
sortFields) {
- this.filterFields = filterFields;
- this.sortFields = sortFields;
-
- this.cachedItems = null;
- this.cachedRange = null;
- }
-
}
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/resources/JIRA.csv
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/resources/JIRA.csv 2009-07-01
13:48:53 UTC (rev 14763)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/resources/JIRA.csv 2009-07-01
14:47:30 UTC (rev 14764)
@@ -1,25 +1,25 @@
-Bug;RF-6338;PanelMenu does not work in 3.3.1.SNAPSHOT;Alex
Kolonitsky;03.03.2001;Alexander Dubovsky;Critical;Open;UNRESOLVED;23/Feb/09 06:17
AM;24/Feb/09 11:59 AM;;;;;1
-Bug;RF-3686;listShuttle and s:entityConverter;Alex Kolonitsky;03.03.2001;Marcell
Barbacena;Major;Open;UNRESOLVED;11/Jun/08 05:51 PM;17/Feb/09 10:06 AM;;;;;0
-Bug;RF-6278;ScriptUtils: toScript() fails with java.sql.* types;Alex
Kolonitsky;03.03.2001;Nick Belaevski;Major;Open;UNRESOLVED;20/Feb/09 06:47 PM;24/Feb/09
12:07 PM;;;;;0
-Bug;RF-5671;Panel Menu. selectedChild problems;Alex Kolonitsky;03.03.2001;Ilya
Shaikovsky;Major;Open;UNRESOLVED;13/Jan/09 05:26 AM;24/Feb/09 08:43 PM;;;;;0
-Bug;RF-6155;Column: rendered attribute handled wrong;Alexander Smirnov;03.03.2001;Nick
Belaevski;Major;Open;UNRESOLVED;13/Feb/09 10:36 AM;13/Feb/09 10:36 AM;;;;;1
-Bug;RF-6040;Columns: component does not work without value attribute defined;Andrei
Markavtsov;03.03.2001;Andrei Markavtsov;Critical;Open;UNRESOLVED;06/Feb/09 04:57
AM;06/Feb/09 09:28 AM;;;;;0
-Bug;RF-6031;columns: allow to use few columns and to use columns together with static
column components within the one table .;Andrei Markavtsov;03.03.2001;Ilya
Shaikovsky;Major;Open;UNRESOLVED;04/Feb/09 09:05 AM;05/Feb/09 08:40 AM;;;;;0
-Bug;RF-5960;FileUpload sends id parameter to server on each upload.;Andrei
Markavtsov;03.03.2001;Andrei Markavtsov;Major;Open;UNRESOLVED;29/Jan/09 05:57 AM;11/Feb/09
10:58 AM;;;;;1
-Bug;RF-6266;FileUpload: AJAX polling problems;Andrei Markavtsov;03.03.2001;Nick
Belaevski;Major;Open;UNRESOLVED;19/Feb/09 12:16 PM;24/Feb/09 11:56 AM;;;;;0
-Bug;RF-6143;inplaceSelect: is not expanded in FF;Anton Belevich;03.03.2001;Tsikhon
Kuprevich;Critical;Open;UNRESOLVED;11/Feb/09 09:29 AM;12/Feb/09 06:58 AM;;;;;0
-Bug;RF-5735;InplaceInput: input is possible after pressing green (OK) control icon under
FF2-3, Safari;Anton Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;14/Jan/09
08:05 AM;15/Jan/09 05:20 AM;;;;;0
-Bug;RF-5717;editor: special characters escapement problem;Anton Belevich;03.03.2001;Ilya
Shaikovsky;Major;Reopened;UNRESOLVED;13/Jan/09 10:15 AM;15/Jan/09 11:34 AM;;;;;1
-Bug;RF-5790;Editor: converter error if use nesting formatting.;Anton
Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;19/Jan/09 08:34 AM;20/Jan/09
10:42 AM;;;;;1
-Bug;RF-5825;Editor: convertion failed in case past formatted text in editor.;Anton
Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;19/Jan/09 09:20 AM;20/Jan/09
11:36 AM;;;;;0
-Bug;RF-5209;Calendar: currentDateChangeListener does not trigger;Anton
Belevich;03.03.2001;Andrei Markavtsov;Major;Reopened;UNRESOLVED;03/Dec/08 10:02
AM;10/Feb/09 06:04 AM;;;14400;14400;0
-Bug;RF-5265;Calendar does not switch the current month/year properlly if
'preLoadDateRangeStart' & 'preLoadDateRangeEnd' attributes defined in
ajax mode;Anton Belevich;03.03.2001;Andrei Markavtsov;Major;Open;UNRESOLVED;05/Dec/08
12:01 PM;10/Feb/09 06:05 AM;;;;;0
-Bug;RF-6141;ComboBox: Style, styleClass and events attributes wasn't encoded on
highest-level html-element of this component..;Anton Belevich;03.03.2001;Konstantin
Mishin;Major;Open;UNRESOLVED;11/Feb/09 08:45 AM;11/Feb/09 06:55 PM;;;;;0
-Bug;RF-6142;inplaceSelect: symbols are encoded in output;Anton
Belevich;03.03.2001;Tsikhon Kuprevich;Major;Open;UNRESOLVED;11/Feb/09 09:22 AM;11/Feb/09
06:55 PM;;;;;0
-Bug;RF-6000;liveDemo: dropDownMenu bottom example. The 'class' attribute is
incorrect for the tag h:panelGrid;Ilya Shaikovsky;03.03.2001;Tsikhon
Kuprevich;Major;Open;UNRESOLVED;02/Feb/09 04:52 AM;05/Feb/09 03:05 PM;;;;;0
-Bug;RF-5999;liveDemo: dropDownMenu: remove 'border' attribute from the spacer tag
in the top code example;Ilya Shaikovsky;03.03.2001;Tsikhon
Kuprevich;Major;Open;UNRESOLVED;02/Feb/09 04:43 AM;05/Feb/09 03:05 PM;;;;;0
-Bug;RF-6018;panelMenu: Attribute iconCollapsedTopPosition invalid for tag panelMenu
(demo);Ilya Shaikovsky;03.03.2001;Inna Shchibrya;Major;Open;UNRESOLVED;03/Feb/09 10:16
AM;05/Feb/09 03:05 PM;;;;;0
-Bug;RF-5780;DataScroller: incorrect page name in richfaces-demo;Ilya
Shaikovsky;03.03.2001;Alexander Dubovsky;Minor;Open;UNRESOLVED;19/Jan/09 08:04
AM;05/Feb/09 06:22 PM;;;;;0
-Bug;RF-6263;Demo: There is rich:dataList insted of rich:dataOrderedList on
dataOrderedList page.;Ilya Shaikovsky;03.03.2001;Konstantin
Mishin;Minor;Open;UNRESOLVED;19/Feb/09 09:17 AM;24/Feb/09 11:53 AM;;;;;0
-Bug;RF-5764;demosite: preview state mark on extended table to be removed.;Ilya
Shaikovsky;03.03.2001;Ilya Shaikovsky;Trivial;Open;UNRESOLVED;16/Jan/09 04:22 AM;16/Jan/09
04:22 AM;;;;;0
-Bug;RF-5638;DragListener/dropListener do not have 'type' attribute;Nick
Belaevski;03.03.2001;Alexandr Levkovsky;Major;Open;UNRESOLVED;10/Jan/09 10:37 AM;09/Feb/09
06:27 PM;;;;;0
+RF-6338;PanelMenu does not work in 3.3.1.SNAPSHOT;Alex Kolonitsky;03.03.2001;Alexander
Dubovsky;Critical;Open;UNRESOLVED;23/Feb/09 06:17 AM;24/Feb/09 11:59 AM;;;;;1
+RF-3686;listShuttle and s:entityConverter;Alex Kolonitsky;03.03.2001;Marcell
Barbacena;Major;Open;UNRESOLVED;11/Jun/08 05:51 PM;17/Feb/09 10:06 AM;;;;;0
+RF-6278;ScriptUtils: toScript() fails with java.sql.* types;Alex
Kolonitsky;03.03.2001;Nick Belaevski;Major;Open;UNRESOLVED;20/Feb/09 06:47 PM;24/Feb/09
12:07 PM;;;;;0
+RF-5671;Panel Menu. selectedChild problems;Alex Kolonitsky;03.03.2001;Ilya
Shaikovsky;Major;Open;UNRESOLVED;13/Jan/09 05:26 AM;24/Feb/09 08:43 PM;;;;;0
+RF-6155;Column: rendered attribute handled wrong;Alexander Smirnov;03.03.2001;Nick
Belaevski;Major;Open;UNRESOLVED;13/Feb/09 10:36 AM;13/Feb/09 10:36 AM;;;;;1
+RF-6040;Columns: component does not work without value attribute defined;Andrei
Markavtsov;03.03.2001;Andrei Markavtsov;Critical;Open;UNRESOLVED;06/Feb/09 04:57
AM;06/Feb/09 09:28 AM;;;;;0
+RF-6031;columns: allow to use few columns and to use columns together with static column
components within the one table .;Andrei Markavtsov;03.03.2001;Ilya
Shaikovsky;Major;Open;UNRESOLVED;04/Feb/09 09:05 AM;05/Feb/09 08:40 AM;;;;;0
+RF-5960;FileUpload sends id parameter to server on each upload.;Andrei
Markavtsov;03.03.2001;Andrei Markavtsov;Major;Open;UNRESOLVED;29/Jan/09 05:57 AM;11/Feb/09
10:58 AM;;;;;1
+RF-6266;FileUpload: AJAX polling problems;Andrei Markavtsov;03.03.2001;Nick
Belaevski;Major;Open;UNRESOLVED;19/Feb/09 12:16 PM;24/Feb/09 11:56 AM;;;;;0
+RF-6143;inplaceSelect: is not expanded in FF;Anton Belevich;03.03.2001;Tsikhon
Kuprevich;Critical;Open;UNRESOLVED;11/Feb/09 09:29 AM;12/Feb/09 06:58 AM;;;;;0
+RF-5735;InplaceInput: input is possible after pressing green (OK) control icon under
FF2-3, Safari;Anton Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;14/Jan/09
08:05 AM;15/Jan/09 05:20 AM;;;;;0
+RF-5717;editor: special characters escapement problem;Anton Belevich;03.03.2001;Ilya
Shaikovsky;Major;Reopened;UNRESOLVED;13/Jan/09 10:15 AM;15/Jan/09 11:34 AM;;;;;1
+RF-5790;Editor: converter error if use nesting formatting.;Anton
Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;19/Jan/09 08:34 AM;20/Jan/09
10:42 AM;;;;;1
+RF-5825;Editor: convertion failed in case past formatted text in editor.;Anton
Belevich;03.03.2001;Alexander Dubovsky;Major;Open;UNRESOLVED;19/Jan/09 09:20 AM;20/Jan/09
11:36 AM;;;;;0
+RF-5209;Calendar: currentDateChangeListener does not trigger;Anton
Belevich;03.03.2001;Andrei Markavtsov;Major;Reopened;UNRESOLVED;03/Dec/08 10:02
AM;10/Feb/09 06:04 AM;;;14400;14400;0
+RF-5265;Calendar does not switch the current month/year properlly if
'preLoadDateRangeStart' & 'preLoadDateRangeEnd' attributes defined in
ajax mode;Anton Belevich;03.03.2001;Andrei Markavtsov;Major;Open;UNRESOLVED;05/Dec/08
12:01 PM;10/Feb/09 06:05 AM;;;;;0
+RF-6141;ComboBox: Style, styleClass and events attributes wasn't encoded on
highest-level html-element of this component..;Anton Belevich;03.03.2001;Konstantin
Mishin;Major;Open;UNRESOLVED;11/Feb/09 08:45 AM;11/Feb/09 06:55 PM;;;;;0
+RF-6142;inplaceSelect: symbols are encoded in output;Anton Belevich;03.03.2001;Tsikhon
Kuprevich;Major;Open;UNRESOLVED;11/Feb/09 09:22 AM;11/Feb/09 06:55 PM;;;;;0
+RF-6000;liveDemo: dropDownMenu bottom example. The 'class' attribute is incorrect
for the tag h:panelGrid;Ilya Shaikovsky;03.03.2001;Tsikhon
Kuprevich;Major;Open;UNRESOLVED;02/Feb/09 04:52 AM;05/Feb/09 03:05 PM;;;;;0
+RF-5999;liveDemo: dropDownMenu: remove 'border' attribute from the spacer tag in
the top code example;Ilya Shaikovsky;03.03.2001;Tsikhon
Kuprevich;Major;Open;UNRESOLVED;02/Feb/09 04:43 AM;05/Feb/09 03:05 PM;;;;;0
+RF-6018;panelMenu: Attribute iconCollapsedTopPosition invalid for tag panelMenu
(demo);Ilya Shaikovsky;03.03.2001;Inna Shchibrya;Major;Open;UNRESOLVED;03/Feb/09 10:16
AM;05/Feb/09 03:05 PM;;;;;0
+RF-5780;DataScroller: incorrect page name in richfaces-demo;Ilya
Shaikovsky;03.03.2001;Alexander Dubovsky;Minor;Open;UNRESOLVED;19/Jan/09 08:04
AM;05/Feb/09 06:22 PM;;;;;0
+RF-6263;Demo: There is rich:dataList insted of rich:dataOrderedList on dataOrderedList
page.;Ilya Shaikovsky;03.03.2001;Konstantin Mishin;Minor;Open;UNRESOLVED;19/Feb/09 09:17
AM;24/Feb/09 11:53 AM;;;;;0
+RF-5764;demosite: preview state mark on extended table to be removed.;Ilya
Shaikovsky;03.03.2001;Ilya Shaikovsky;Trivial;Open;UNRESOLVED;16/Jan/09 04:22 AM;16/Jan/09
04:22 AM;;;;;0
+RF-5638;DragListener/dropListener do not have 'type' attribute;Nick
Belaevski;03.03.2001;Alexandr Levkovsky;Major;Open;UNRESOLVED;10/Jan/09 10:37 AM;09/Feb/09
06:27 PM;;;;;0
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/resources/hibernate.cfg.xml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/resources/hibernate.cfg.xml 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/resources/hibernate.cfg.xml 2009-07-01
14:47:30 UTC (rev 14764)
@@ -13,5 +13,7 @@
<property name="show_sql">false</property>
<property
name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.hbm2ddl.auto">create</property>
+
+ <mapping resource="dataItem.hbm.xml" />
</session-factory>
</hibernate-configuration>
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/components.xml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/components.xml 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/components.xml 2009-07-01
14:47:30 UTC (rev 14764)
@@ -1,16 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<components
xmlns="http://jboss.com/products/seam/components"
-
xmlns:core="http://jboss.com/products/seam/core"
-
xmlns:persistence="http://jboss.com/products/seam/persistence"
-
xmlns:drools="http://jboss.com/products/seam/drools"
-
xmlns:bpm="http://jboss.com/products/seam/bpm"
-
xmlns:security="http://jboss.com/products/seam/security"
-
xmlns:mail="http://jboss.com/products/seam/mail"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xmlns:pdf="http://jboss.com/products/seam/pdf"
-
xmlns:transaction="http://jboss.com/products/seam/transaction"
- xsi:schemaLocation=
- "http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
+
xmlns:core="http://jboss.com/products/seam/core"
xmlns:persistence="http://jboss.com/products/seam/persistence"
+
xmlns:drools="http://jboss.com/products/seam/drools"
xmlns:bpm="http://jboss.com/products/seam/bpm"
+
xmlns:security="http://jboss.com/products/seam/security"
xmlns:mail="http://jboss.com/products/seam/mail"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pdf="http://jboss.com/products/seam/pdf"
+
xmlns:transaction="http://jboss.com/products/seam/transaction"
+
xsi:schemaLocation="http://jboss.com/products/seam/core
http://jboss.com/products/seam/core-2.0.xsd
http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.1.0.xsd
http://jboss.com/products/seam/persistence
http://jboss.com/products/seam/persistence-2.0.xsd
http://jboss.com/products/seam/drools
http://jboss.com/products/seam/drools-2.0.xsd
@@ -18,12 +13,20 @@
http://jboss.com/products/seam/security
http://jboss.com/products/seam/security-2.0.xsd
http://jboss.com/products/seam/mail
http://jboss.com/products/seam/mail-2.0.xsd
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd">
- <core:init debug="false"
transaction-management-enabled="false"/>
- <transaction:no-transaction/>
- <core:manager concurrent-request-timeout="500"
- conversation-timeout="120000"
- conversation-id-parameter="cid"
- parent-conversation-id-parameter="pid"/>
-
-
+ <core:init debug="false" transaction-management-enabled="true"
/>
+
+ <persistence:hibernate-session-factory
+ name="hibernateSessionFactory" />
+
+ <persistence:managed-hibernate-session
+ name="hibernateSession" auto-create="true"
session-factory="#{hibernateSessionFactory}" />
+
+ <transaction:hibernateTransaction session="#{hibernateSession}" />
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000" conversation-id-parameter="cid"
+ parent-conversation-id-parameter="pid" />
+
+ <component class="org.jboss.seam.ui.HibernateEntityLoader" />
+
</components>
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-01
14:47:30 UTC (rev 14764)
@@ -11,25 +11,11 @@
<converter-class>org.richfaces.demo.orderingList.SongConverter</converter-class>
</converter>
<managed-bean>
- <managed-bean-name>hibernateBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.modifiableModel.HibernateBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
<managed-bean-name>dataTableStateHolder</managed-bean-name>
<managed-bean-class>org.richfaces.demo.modifiableModel.DatatableStateHolder</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
- <managed-bean-name>hibernateDataModel</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.modifiableModel.HibernateDataModel</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>sessionFactory</property-name>
- <value>#{hibernateBean.sessionFactory}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
<managed-bean-name>tabsBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.tab.TabsBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/modifiableModel.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/modifiableModel.xhtml 2009-07-01
13:48:53 UTC (rev 14763)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/modifiableModel.xhtml 2009-07-01
14:47:30 UTC (rev 14764)
@@ -13,7 +13,7 @@
<a4j:queue requestDelay="100" />
<rich:messages />
<rich:dataTable value="#{hibernateDataModel}" var="row"
rows="10"
- rowKeyConverter="javax.faces.Long" reRender="datascroller"
width="650"
+ rowKeyConverter="org.jboss.seam.ui.EntityConverter"
reRender="datascroller" width="650"
rendered="#{componentNavigator.currentComponent.activeTab ==
'modifiableDataModel'}">
<rich:columns value="#{hibernateBean.csvFields}" var="field"
sortBy="#{field}" filterBy="#{field}"
filterEvent="onkeyup"