JBoss Rich Faces SVN: r665 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF: lib and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 12:01:28 -0400 (Sat, 05 May 2007)
New Revision: 665
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/jira-issues.jar
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/jira-issues.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/jira-issues.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 7 months
JBoss Rich Faces SVN: r664 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 12:01:07 -0400 (Sat, 05 May 2007)
New Revision: 664
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-05-05 16:00:49 UTC (rev 663)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-05-05 16:01:07 UTC (rev 664)
@@ -2,4 +2,220 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- </faces-config>
+
+ <managed-bean>
+ <managed-bean-name>priority_blocker</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Priority</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>1</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Showstopper</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>priority_critical</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Priority</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>2</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Critical</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>priority_major</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Priority</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>3</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Major</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>priority_minor</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Priority</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>4</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Minor</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>priority_cosmetic</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Priority</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>5</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Cosmetics</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>status_open</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Status</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>1</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Open</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>status_inprogress</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Status</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>3</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>In Progress</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>status_resolved</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Status</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>5</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Resolved</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>status_reopened</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Status</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>4</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Reopened</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>status_closed</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.model.Status</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>id</property-name>
+ <value>6</value>
+ </managed-property>
+ <managed-property>
+ <property-name>name</property-name>
+ <value>Closed</value>
+ </managed-property>
+ </managed-bean>
+
+
+ <managed-bean>
+ <managed-bean-name>imageStore</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.service.ImageStore</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>images</property-name>
+ <property-class>java.util.HashMap</property-class>
+ <map-entries>
+ <map-entry>
+ <key>#{priority_blocker.name}</key>
+ <value>/images/priority_blocker.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{priority_critical.name}</key>
+ <value>/images/priority_critical.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{priority_major.name}</key>
+ <value>/images/priority_major.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{priority_minor.name}</key>
+ <value>/images/priority_minor.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{priority_cosmetic.name}</key>
+ <value>/images/priority_trivial.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{status_open.name}</key>
+ <value>/images/status_open.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{status_inprogress.name}</key>
+ <value>/images/status_inprogress.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{status_closed.name}</key>
+ <value>/images/status_closed.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{status_reopened.name}</key>
+ <value>/images/status_reopened.gif</value>
+ </map-entry>
+ <map-entry>
+ <key>#{status_resolved.name}</key>
+ <value>/images/status_resolved.gif</value>
+ </map-entry>
+ </map-entries>
+ </managed-property>
+ </managed-bean>
+
+
+ <managed-bean>
+ <managed-bean-name>selectionBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.bean.SelectionBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>dataModel</property-name>
+ <property-class>java.util.List</property-class>
+ <value>#{jiraService.channel.issues}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>channel</property-name>
+ <value>#{jiraService.channel}</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>jiraService</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.service.JiraService</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
17 years, 7 months
JBoss Rich Faces SVN: r663 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 12:00:49 -0400 (Sat, 05 May 2007)
New Revision: 663
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd01.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd02.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd03.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd04.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd05.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd06.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd07.png
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/down.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_blocker.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_critical.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_major.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_minor.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_trivial.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_closed.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_inprogress.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_open.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_reopened.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_resolved.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/up.gif
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/valid-xhtml10.png
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd01.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd01.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd02.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd02.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd03.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd03.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd04.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd04.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd05.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd05.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd06.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd06.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd07.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/dnd07.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/down.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/down.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_blocker.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_critical.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_major.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_minor.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_trivial.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/priority_trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_closed.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_closed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_inprogress.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_inprogress.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_open.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_open.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_reopened.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_reopened.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_resolved.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/status_resolved.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/up.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/up.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/valid-xhtml10.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/images/valid-xhtml10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 7 months
JBoss Rich Faces SVN: r662 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 12:00:24 -0400 (Sat, 05 May 2007)
New Revision: 662
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java 2007-05-05 16:00:24 UTC (rev 662)
@@ -0,0 +1,43 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/service/ImageStore.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ImageStore{
+ public ImageStore() {
+ super();
+ }
+
+ private Map <Object, String> images = new HashMap<Object, String>();
+
+
+ /**
+ * @return the images
+ */
+ public Map <Object, String> getImages() {
+ return images;
+ }
+
+ /**
+ * @param images the images to set
+ */
+ public void setImages(Map <Object, String> images) {
+ this.images = images;
+ }
+
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java 2007-05-05 16:00:24 UTC (rev 662)
@@ -0,0 +1,169 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/service/JiraService.java,v $
+ * $Revision: 1.5 $
+ */
+
+package org.richfaces.demo.datagrid.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.ExtendedBaseRules;
+import org.apache.commons.digester.Rule;
+import org.richfaces.demo.datagrid.model.Channel;
+import org.richfaces.demo.datagrid.model.Issue;
+import org.richfaces.demo.datagrid.model.JiraUser;
+import org.richfaces.demo.datagrid.model.Key;
+import org.richfaces.demo.datagrid.model.Priority;
+import org.richfaces.demo.datagrid.model.Status;
+import org.richfaces.demo.datagrid.model.Type;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class JiraService {
+
+ private static final String KEY = "jiraService";
+
+ private static final JiraService instance = new JiraService();
+
+ /**
+ *
+ */
+ public JiraService() {
+ super();
+ init();
+ }
+
+ private Channel channel = null;
+ public Channel getChannel() {
+
+ if (channel == null) {
+ init();
+ }
+
+ return channel;
+ }
+ public void setChannel(Channel channel) {
+ this.channel = channel;
+ }
+
+
+ static class JiraCursedRule extends Rule {
+
+ private String propertyName;
+
+ public JiraCursedRule(String propertyName) {
+ super();
+ this.propertyName = propertyName;
+ }
+
+ @Override
+ public void body(String namespace, String name, String text) throws Exception {
+ Object bean = digester.peek();
+ PropertyUtils.setSimpleProperty(bean, propertyName, text.trim());
+
+ }
+
+ @Override
+ public void finish() throws Exception {
+ // TODO Auto-generated method stub
+ super.finish();
+ }
+ }
+
+
+ private void init() {
+ channel = new Channel();
+ Digester digester = new Digester();
+ digester.setValidating(false);
+ digester.setNamespaceAware(false);
+ digester.setEntityResolver(new EntityResolver() {
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ });
+ digester.setRules(new ExtendedBaseRules());
+
+ digester.push(channel);
+
+ String path = "rss/channel";
+ digester.addBeanPropertySetter(path + "/?");
+
+ path = path + "/item";
+ String issuePath = path;
+ digester.addObjectCreate(path, Issue.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addSetNext(path, "addIssue");
+
+ path = issuePath + "/key";
+ digester.addObjectCreate(path, Key.class);
+ digester.addSetProperties(path);
+ digester.addRule(path, new JiraCursedRule("value"));
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addSetNext(path, "setKey");
+
+ path = issuePath + "/priority";
+ digester.addObjectCreate(path, Priority.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addRule(path, new JiraCursedRule("name"));
+ digester.addSetNext(path, "setPriority");
+
+ path = issuePath + "/status";
+ digester.addObjectCreate(path, Status.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addRule(path, new JiraCursedRule("name"));
+ digester.addSetNext(path, "setStatus");
+
+ path = issuePath + "/assignee";
+ digester.addObjectCreate(path, JiraUser.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addRule(path, new JiraCursedRule("name"));
+ digester.addSetNext(path, "setAssignee");
+
+ path = issuePath + "/reporter";
+ digester.addObjectCreate(path, JiraUser.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addRule(path, new JiraCursedRule("name"));
+ digester.addSetNext(path, "setReporter");
+
+ path = issuePath + "/type";
+ digester.addObjectCreate(path, Type.class);
+ digester.addSetProperties(path);
+ digester.addBeanPropertySetter(path + "/?");
+ digester.addRule(path, new JiraCursedRule("name"));
+ digester.addSetNext(path, "setType");
+ try {
+ //InputStream stream; //= Thread.currentThread().getContextClassLoader().getResourceAsStream();
+ //stream = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/WEB-INF/xmldata/jira.xml");
+ //JarInputStream stream = getXMLInputStream();
+ InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream("jira.xml");
+ digester.parse(stream);
+ stream.close();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ public static final JiraService getInstance() {
+ return instance;
+ }
+}
17 years, 7 months
JBoss Rich Faces SVN: r661 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 12:00:02 -0400 (Sat, 05 May 2007)
New Revision: 661
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,238 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Channel.java,v $
+ * $Revision: 1.8 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Channel {
+
+ private static final Comparator<Issue> byIdDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o2.getIndex() - o1.getIndex();
+ }
+ };
+ private static final Comparator<Issue> byIdAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o1.getIndex() - o2.getIndex();
+ }
+ };
+
+ private static final Comparator<Issue> byPriAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o1.getPriority().getId() - o2.getPriority().getId();
+ }
+ };
+ private static final Comparator<Issue> byPriDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return o2.getPriority().getId() - o1.getPriority().getId();
+ }
+ };
+
+ private static final Comparator<JiraUser> jiraUserComparator = new Comparator<JiraUser> () {
+ public int compare(JiraUser o1, JiraUser o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ };
+
+ private static final Comparator<Issue> byAssigneeAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getAssignee(), o2.getAssignee());
+ }
+ };
+ private static final Comparator<Issue> byAssigneeDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return -byAssigneeAsc.compare(o1, o2);
+ }
+ };
+
+ static final Comparator<Issue> byReporterAsc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getReporter(), o2.getReporter());
+ }
+ };
+ static final Comparator<Issue> byReporterDesc = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return -byReporterAsc.compare(o1, o2);
+ }
+ };
+
+ static final Comparator<Issue> byStatusAsc = new Comparator<Issue>() {
+ public int compare(Issue o1, Issue o2) {
+ return o1.getStatus().getId() - o2.getStatus().getId();
+ };
+ };
+
+ static final Comparator<Issue> byStatusDesc = new Comparator<Issue>() {
+ public int compare(Issue o1, Issue o2) {
+ return -byStatusAsc.compare(o1, o2);
+ };
+ };
+
+
+ private List<Issue> issues = new ArrayList<Issue>();
+ private String title;
+ private String description;
+ private String link;
+ private String language;
+
+ private Map <Integer, Issue> index = new HashMap<Integer, Issue>();
+
+
+
+
+ public int size() {
+ return issues.size();
+ }
+
+ /**
+ * Execute query. Care for sorting
+ * @param startRow
+ * @param endRow
+ * @param sortOrder
+ * @return
+ */
+// public List <Issue> executeQuery(int startRow, int endRow, SortOrder sortOrder) {
+// System.out.println("Channel.executeQuery()");
+// List <Issue> copy = getIssues();
+// if (sortOrder != null) {
+// copy = new ArrayList<Issue>(getIssues());
+// Comparator<Issue> comparator = createComparator(sortOrder);
+// if (comparator != null) {
+// Collections.sort(copy, comparator);
+// }
+// }
+// List <Issue> issuz = new ArrayList<Issue>(endRow - startRow + 1);
+// for(int i = startRow; i < endRow; i++ ) {
+// issuz.add(copy.get(i));
+// }
+// return issuz;
+// }
+
+
+ /**
+ * @return the language
+ */
+ public String getLanguage() {
+ return language;
+ }
+ /**
+ * @param language the language to set
+ */
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * @return the link
+ */
+ public String getLink() {
+ return link;
+ }
+ /**
+ * @param link the link to set
+ */
+ public void setLink(String link) {
+ this.link = link;
+ }
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ /**
+ * @return the issues
+ */
+ public List<Issue> getIssues() {
+ return issues;
+ }
+ /**
+ * @param issues the issues to set
+ */
+ public void setIssues(List<Issue> issues) {
+ this.issues = issues;
+ }
+
+ public void addIssue(Issue issue) {
+ issues.add(issue);
+ index.put(issue.getIndex(), issue);
+ }
+ /**
+ * @return the index
+ */
+ public Map<Integer, Issue> getIndex() {
+ return index;
+ }
+ /**
+ * @param index the index to set
+ */
+ public void setIndex(Map<Integer, Issue> index) {
+ this.index = index;
+ }
+
+// protected Comparator <Issue> createComparator(SortOrder sortOrder) {
+// String prop = sortOrder.getSortField();
+// boolean asc = sortOrder.isAscending();
+//
+// if ("priority".equals(prop)) {
+// return asc ? byPriAsc : byPriDesc;
+// } else if ("assignee".equals(prop)) {
+// return asc ? byAssigneeAsc : byAssigneeDesc;
+// } else if ("reporter".equals(prop)) {
+// return asc ? byReporterAsc : byReporterDesc;
+// } else if ("id".equals(prop)) {
+// return asc ? byIdAsc : byIdDesc;
+//
+// } else if ("status".equals(prop)) {
+// return asc ? byStatusAsc : byStatusDesc;
+//
+// }
+//
+// return null;
+// }
+//
+ public Issue findById(Integer id) {
+ return getIndex().get(id);
+ }
+
+ public void replace(Integer id, List<Issue> list) {
+ Issue issue = issues.get(id.intValue());
+ issues.removeAll(list);
+ issues.addAll(issues.indexOf(issue)+1, list);
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Issue.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,376 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Issue.java,v $
+ * $Revision: 1.6 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Issue {
+ private static int issueIndex = 0;
+
+ private int index = ++issueIndex;
+
+ private String title;
+ private String link;
+ private String description;
+ private String environment;
+ private Key key;
+ private Type type;
+ private Priority priority;
+ private JiraUser assignee;
+ private JiraUser reporter;
+ private String summary;
+ private Status status;
+ private String resolution;
+ private String created;
+ private String updated;
+ private String version;
+ private String component;
+ private String due;
+ private String votes;
+ private String customfields;
+
+ //TODO: provide correct mapping
+ private String comments;
+ private String fixVersion;
+ private String timeestimate;
+ private String timespent;
+
+ //TODO: provide correct mapping
+ private String issuelinks;
+
+ private String timeoriginalestimate;
+
+ /**
+ * @return the timeoriginalestimate
+ */
+ public String getTimeoriginalestimate() {
+ return timeoriginalestimate;
+ }
+ /**
+ * @param timeoriginalestimate the timeoriginalestimate to set
+ */
+ public void setTimeoriginalestimate(String timeoriginalestimate) {
+ this.timeoriginalestimate = timeoriginalestimate;
+ }
+ /**
+ * @return the timespent
+ */
+ public String getTimespent() {
+ return timespent;
+ }
+ /**
+ * @param timespent the timespent to set
+ */
+ public void setTimespent(String timespent) {
+ this.timespent = timespent;
+ }
+ /**
+ * @return the comments
+ */
+ public String getComments() {
+ return comments;
+ }
+ /**
+ * @param comments the comments to set
+ */
+ public void setComments(String comments) {
+ this.comments = comments;
+ }
+ /**
+ * @return the customfields
+ */
+ public String getCustomfields() {
+ return customfields;
+ }
+ /**
+ * @param customfields the customfields to set
+ */
+ public void setCustomfields(String customfields) {
+ this.customfields = customfields;
+ }
+ /**
+ * @return the votes
+ */
+ public String getVotes() {
+ return votes;
+ }
+ /**
+ * @param votes the votes to set
+ */
+ public void setVotes(String votes) {
+ this.votes = votes;
+ }
+ /**
+ * @return the due
+ */
+ public String getDue() {
+ return due;
+ }
+ /**
+ * @param due the due to set
+ */
+ public void setDue(String due) {
+ this.due = due;
+ }
+ /**
+ * @return the component
+ */
+ public String getComponent() {
+ return component;
+ }
+ /**
+ * @param component the component to set
+ */
+ public void setComponent(String component) {
+ this.component = component;
+ }
+ /**
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+ /**
+ * @param version the version to set
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+ /**
+ * @return the created
+ */
+ public String getCreated() {
+ return created;
+ }
+ /**
+ * @param created the created to set
+ */
+ public void setCreated(String created) {
+ this.created = created;
+ }
+ /**
+ * @return the updated
+ */
+ public String getUpdated() {
+ return updated;
+ }
+ /**
+ * @param updated the updated to set
+ */
+ public void setUpdated(String updated) {
+ this.updated = updated;
+ }
+ /**
+ * @return the resolution
+ */
+ public String getResolution() {
+ return resolution;
+ }
+ /**
+ * @param resolution the resolution to set
+ */
+ public void setResolution(String resolution) {
+ this.resolution = resolution;
+ }
+ /**
+ * @return the status
+ */
+ public Status getStatus() {
+ return status;
+ }
+ /**
+ * @param status the status to set
+ */
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+ /**
+ * @return the summary
+ */
+ public String getSummary() {
+ return summary;
+ }
+ /**
+ * @param summary the summary to set
+ */
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+ /**
+ * @return the assignee
+ */
+ public JiraUser getAssignee() {
+ return assignee;
+ }
+ /**
+ * @param assignee the assignee to set
+ */
+ public void setAssignee(JiraUser assignee) {
+ this.assignee = assignee;
+ }
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ /*if (description != null && description.length() > 2000) {
+ description = description.substring(0, 2000);
+ }*/
+ this.description = description;
+ }
+ /**
+ * @return the environment
+ */
+ public String getEnvironment() {
+ return environment;
+ }
+ /**
+ * @param environment the environment to set
+ */
+ public void setEnvironment(String environment) {
+ this.environment = environment;
+ }
+ /**
+ * @return the key
+ */
+ public Key getKey() {
+ return key;
+ }
+ /**
+ * @param key the key to set
+ */
+ public void setKey(Key key) {
+ this.key = key;
+ }
+ /**
+ * @return the link
+ */
+ public String getLink() {
+ return link;
+ }
+ /**
+ * @param link the link to set
+ */
+ public void setLink(String link) {
+ this.link = link;
+ }
+ /**
+ * @return the priority
+ */
+ public Priority getPriority() {
+ return priority;
+ }
+ /**
+ * @param priority the priority to set
+ */
+ public void setPriority(Priority priority) {
+ this.priority = priority;
+ }
+ /**
+ * @return the reporter
+ */
+ public JiraUser getReporter() {
+ return reporter;
+ }
+ /**
+ * @param reporter the reporter to set
+ */
+ public void setReporter(JiraUser reporter) {
+ this.reporter = reporter;
+ }
+ /**
+ * @return the title
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title the title to set
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ /**
+ * @return the type
+ */
+ public Type getType() {
+ return type;
+ }
+ /**
+ * @param type the type to set
+ */
+ public void setType(Type type) {
+ this.type = type;
+ }
+ /**
+ * @return the fixVersion
+ */
+ public String getFixVersion() {
+ return fixVersion;
+ }
+ /**
+ * @param fixVersion the fixVersion to set
+ */
+ public void setFixVersion(String fixVersion) {
+ this.fixVersion = fixVersion;
+ }
+ /**
+ * @return the timeestimate
+ */
+ public String getTimeestimate() {
+ return timeestimate;
+ }
+ /**
+ * @param timeestimate the timeestimate to set
+ */
+ public void setTimeestimate(String timeestimate) {
+ this.timeestimate = timeestimate;
+ }
+ /**
+ * @return the issuelinks
+ */
+ public String getIssuelinks() {
+ return issuelinks;
+ }
+ /**
+ * @param issuelinks the issuelinks to set
+ */
+ public void setIssuelinks(String issuelinks) {
+ this.issuelinks = issuelinks;
+ }
+ /**
+ * @return the index
+ */
+ public int getIndex() {
+ return index;
+ }
+ /**
+ * @param index the index to set
+ */
+ public void setIndex(int index) {
+ this.index = index;
+ }
+ /**
+ * @return
+ * @see com.exadel.jsf.demo.datagrid.model.Priority#getId()
+ */
+ public int getPriorityId() {
+ return getPriority().getId();
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/JiraUser.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,45 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/JiraUser.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class JiraUser {
+ private String username;
+ private String name;
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return the username
+ */
+ public String getUsername() {
+ return username;
+ }
+ /**
+ * @param username the username to set
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,51 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Key.java,v $
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Key implements Comparable<Key>{
+ private int id;
+ private String value;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the value
+ */
+ public String getValue() {
+ return value;
+ }
+ /**
+ * @param value the value to set
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Key o) {
+ return id - o.id;
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Priority.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,64 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Priority.java,v $
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Priority {
+ private int id;
+ private String name;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Priority) {
+ Priority priority = (Priority) obj;
+ return priority.id == id;
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id;
+ }
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Rss.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,19 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Rss.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Rss {
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Status.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,64 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Status.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Status {
+ private String name;
+ private int id;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Status) {
+ Status status = (Status) obj;
+ return status.id == id;
+ }
+ return false;
+ }
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+}
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Type.java 2007-05-05 16:00:02 UTC (rev 661)
@@ -0,0 +1,44 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/web-projects/data-view-grid-demo/src/com/exadel/jsf/demo/datagrid/model/Type.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.demo.datagrid.model;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class Type {
+ private int id;
+ private String name;
+ /**
+ * @return the id
+ */
+ public int getId() {
+ return id;
+ }
+ /**
+ * @param id the id to set
+ */
+ public void setId(int id) {
+ this.id = id;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
17 years, 7 months
JBoss Rich Faces SVN: r660 - in trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces: demo and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 11:59:50 -0400 (Sat, 05 May 2007)
New Revision: 660
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java 2007-05-05 15:59:50 UTC (rev 660)
@@ -0,0 +1,36 @@
+package org.richfaces.demo.datagrid.bean;
+
+
+import java.util.List;
+
+import org.richfaces.demo.datagrid.model.Channel;
+
+
+
+public class SelectionBean{
+
+ List dataModel;
+
+ Channel channel;
+
+
+ public SelectionBean(){
+ }
+
+ public List getDataModel() {
+ return dataModel;
+ }
+
+ public void setDataModel(List dataModel) {
+ this.dataModel = dataModel;
+ }
+
+ public Channel getChannel() {
+ return channel;
+ }
+
+ public void setChannel(Channel channel) {
+ this.channel = channel;
+ }
+
+}
17 years, 7 months
JBoss Rich Faces SVN: r659 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 11:59:19 -0400 (Sat, 05 May 2007)
New Revision: 659
Added:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
Log:
Added: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-05-05 15:59:19 UTC (rev 659)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:h=" http://ajax4jsf.org/cdk/headers"
+ xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.ScrollableGridCellRenderer"
+ component="javax.faces.component.UIComponent"
+ >
+
+ <span id="c_#{cellId}" style="overflow: hidden; white-space: nowrap; position: absolute; z-index: 28; width: 152px; height: 25px; left: 0px;" class="ClientUI_Grid_BC">
+ <span id="bc_#{cellId}" style="overflow: hidden; white-space: nowrap; position: relative; display: block; width: 142px; height: 19px; vertical-align: middle; text-align: center;" class="ClientUI_Grid_BCBody">
+ <vcp:body/>
+ </span>
+ </span>
+
+</f:root>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r658 - in trunk/sandbox/scrollable-grid/src/main/java/org/richfaces: utils and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 11:59:04 -0400 (Sat, 05 May 2007)
New Revision: 658
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/utils/
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/utils/TemplateLoader.java
Log:
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/utils/TemplateLoader.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/utils/TemplateLoader.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/utils/TemplateLoader.java 2007-05-05 15:59:04 UTC (rev 658)
@@ -0,0 +1,32 @@
+/**
+ * (c) 2006 Exadel Inc.
+ */
+package org.richfaces.utils;
+
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class TemplateLoader {
+
+ private static final Log log = LogFactory.getLog(TemplateLoader.class);
+
+ public static RendererBase loadTemplate(String className) {
+ RendererBase template = null;
+ try{
+ template = (RendererBase)Class.forName(className).newInstance();
+ } catch (ClassNotFoundException e) {
+ log.error("class not found: " + className );
+ throw new RuntimeException(e);
+ } catch (Exception e) {
+ log.error("exception in loading class : " + className);
+ throw new RuntimeException(e);
+ }
+ return template;
+ }
+
+}
17 years, 7 months
JBoss Rich Faces SVN: r657 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 11:58:55 -0400 (Sat, 05 May 2007)
New Revision: 657
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-05-05 15:58:47 UTC (rev 656)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-05-05 15:58:55 UTC (rev 657)
@@ -7,9 +7,11 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.renderer.RendererBase;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
import org.richfaces.component.UIScrollableGrid;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.utils.TemplateLoader;
/**
* @author Anton Belevich
@@ -21,14 +23,16 @@
private final String FOOTER_PART = "footer";
private final String HEADER_PART = "header";
-
+ //private final RendererBase cellTemplate = TemplateLoader.loadTemplate("org.richfaces.renderkit.html.ScrollableGridCellRenderer");
+
private final ColumnVisitor headerRenderer = new ColumnVisitor(){
public void visit(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
writer.startElement(HTML.td_ELEM, component);
getUtils().writeAttribute(writer, "frozen", component.getAttributes().get("frozen"));
+ getUtils().writeAttribute(writer, "style",component.getAttributes().get("style"));
writer.writeText("\n", null);
if(component.getFacet(HEADER_PART) != null){
17 years, 7 months
JBoss Rich Faces SVN: r656 - in trunk/sandbox/scrollable-grid/src/main/java/org/richfaces: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-05 11:58:47 -0400 (Sat, 05 May 2007)
New Revision: 656
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
Log:
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java 2007-05-05 15:58:47 UTC (rev 656)
@@ -0,0 +1,12 @@
+package org.richfaces.model;
+
+import javax.faces.model.DataModel;
+
+import org.ajax4jsf.ajax.repeat.SequenceDataModel;
+
+public class ScrollableGridDataModel extends SequenceDataModel{
+
+ public ScrollableGridDataModel(DataModel model) {
+ super(model);
+ }
+}
17 years, 7 months