JBoss Rich Faces SVN: r8516 - trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-08 15:38:52 -0400 (Thu, 08 May 2008)
New Revision: 8516
Modified:
trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
Log:
http://jira.jboss.com/jira/browse/RF-3359
Modified: trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2008-05-08 18:12:10 UTC (rev 8515)
+++ trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2008-05-08 19:38:52 UTC (rev 8516)
@@ -15,7 +15,7 @@
border-width: 1px 0px 1px 1px;
}
-.dr-spnr-i {
+input.dr-spnr-i {
border: 0px;
padding: 0px 0px 0px 3px;
background: none transparent scroll repeat 0% 0%;
@@ -32,8 +32,17 @@
font-size: 0px;
}
-.dr-spnr-bn{margin: 0px 1px 1px 0px;display:block}
-.dr-spnr-bp{margin: 1px 0px 0px 1px;display:block}
+.dr-spnr-bn{
+ margin: 0px 1px 1px 0px;
+ display: block;
+ border-style: none;
+}
+
+.dr-spnr-bp{
+ margin: 1px 0px 0px 1px;
+ display: block;
+ border-style: none;
+}
]]>
</f:verbatim>
16 years, 8 months
JBoss Rich Faces SVN: r8515 - in trunk/ui/panelmenu/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-08 14:12:10 -0400 (Thu, 08 May 2008)
New Revision: 8515
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2008-05-08 17:19:26 UTC (rev 8514)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2008-05-08 18:12:10 UTC (rev 8515)
@@ -28,9 +28,9 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.ajax4jsf.renderkit.compiler.TemplateContext;
-import org.richfaces.skin.Skin;
import org.ajax4jsf.util.style.CSSFormat;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
@@ -47,7 +47,6 @@
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleLeft;
import org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp;
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
/**
* @author hans
@@ -271,10 +270,13 @@
* @param component
* @throws IOException
*/
- public void drawIcon(ResponseWriter writer, String iconType, String imageSrc, UIComponent component, String id) throws IOException{
+ public void drawIcon(ResponseWriter writer, String iconType, String imageSrc, UIComponent component, String id, boolean drawHidden) throws IOException{
if (iconType != null && !iconType.equals("") && !iconType.equals("none")){
int h = 16; //width(context);
writer.startElement("img", component);
+ if (drawHidden) {
+ writer.writeAttribute("style", "display: none;", null);
+ }
writer.writeAttribute("src", imageSrc, null);
writer.writeAttribute("alt", "", null);
writer.writeAttribute("vspace", "0", null);
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2008-05-08 17:19:26 UTC (rev 8514)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2008-05-08 18:12:10 UTC (rev 8515)
@@ -83,7 +83,7 @@
} else {
String iconType = PANEL_MENU_SPACER_ICON_NAME;
String imageSrc = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
+ drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context), false);
}
}
@@ -165,7 +165,12 @@
if ("".equals(icon))
icon = "custom";
String source = getIconByType(icon, isTopLevel, context, component);
- drawIcon(writer, icon, source, component, id);
+ boolean drawHidden = false;
+ if (source != null && source.trim().length() == 0) {
+ source = getIconByType(PANEL_MENU_SPACER_ICON_NAME, isTopLevel, context, component);
+ drawHidden = true;
+ }
+ drawIcon(writer, icon, source, component, id, drawHidden);
}
public String getFullStyleClass(FacesContext context, UIComponent component) {
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2008-05-08 17:19:26 UTC (rev 8514)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2008-05-08 18:12:10 UTC (rev 8515)
@@ -80,7 +80,7 @@
} else {
String iconType = PANEL_MENU_SPACER_ICON_NAME;
String imageSrc = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
+ drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context), false);
}
}
@@ -90,7 +90,6 @@
UIPanelMenu panelMenu = findMenu(component);
ResponseWriter writer = context.getResponseWriter();
boolean isTopLevel = isTopLevel(component);
- String source = null;
String iconType = null;
UIPanelMenuItem item = (UIPanelMenuItem)component;
@@ -127,8 +126,13 @@
iconType = defaultItemIcon;
} else iconType = customItemIcon;
- source = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(writer, iconType, source, component, from + "Icon" + component.getClientId(context));
+ boolean drawHidden = false;
+ String source = getIconByType(iconType, isTopLevel, context, component);
+ if (source != null && source.trim().length() == 0) {
+ source = getIconByType(PANEL_MENU_SPACER_ICON_NAME, isTopLevel, context, component);
+ drawHidden = true;
+ }
+ drawIcon(writer, iconType, source, component, from + "Icon" + component.getClientId(context), drawHidden);
}
Modified: trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-05-08 17:19:26 UTC (rev 8514)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-05-08 18:12:10 UTC (rev 8515)
@@ -194,15 +194,23 @@
} else {
img = this.leftIcon;
}
- if (img!=null){
- if (this.iconCollapsed!="none"){
- if (this.iconCollapsed!=null) {
+
+ if (img!=null){
+ if (this.iconCollapsed!="none"){
+ if (this.iconCollapsed!=null) {
+ if (this.iconCollapsed.length != 0) {
+ Element.show(img);
img.src = this.iconCollapsed;
} else {
+ Element.hide(img);
img.src = this.iconSpacer;
}
+ } else {
+ Element.show(img);
+ img.src = this.iconSpacer;
}
}
+ }
}
this.childObj[i].collapse();
this.childObj[i].hide();
@@ -234,6 +242,7 @@
if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
this.inputState.value="opened";
}
+
if (this.haveDynamicIcon){
var img = null
if (this.iconAlign=="right"){
@@ -244,9 +253,21 @@
if (img!=null){
if (this.iconExpanded!="none"){
if (this.iconExpanded!=null) {
- img.src = this.iconExpanded;
+ if (this.iconExpanded.length != 0) {
+ Element.show(img);
+ img.src = this.iconExpanded;
+ } else {
+ Element.hide(img);
+ img.src = this.iconSpacer;
+ }
} else {
- img.src = this.iconSpacer;}}}}
+ Element.show(img);
+ img.src = this.iconSpacer;
+ }
+ }
+ }
+ }
+
for (var i = 0; i < this.childObj.length; i++){
this.childObj[i].show();
}
16 years, 8 months
JBoss Rich Faces SVN: r8514 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-05-08 13:19:26 -0400 (Thu, 08 May 2008)
New Revision: 8514
Modified:
trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
===================================================================
(Binary files differ)
16 years, 8 months
JBoss Rich Faces SVN: r8513 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-05-08 13:16:41 -0400 (Thu, 08 May 2008)
New Revision: 8513
Modified:
trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
===================================================================
(Binary files differ)
16 years, 8 months
JBoss Rich Faces SVN: r8512 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-05-08 13:04:19 -0400 (Thu, 08 May 2008)
New Revision: 8512
Added:
trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
Modified:
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3ayanul.xls
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3tkuprevich.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3ayanul.xls
===================================================================
(Binary files differ)
Modified: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3tkuprevich.xls
===================================================================
(Binary files differ)
Added: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/QA test report Build RF 3.2.1 CR3.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 8 months
JBoss Rich Faces SVN: r8511 - trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-05-08 13:02:28 -0400 (Thu, 08 May 2008)
New Revision: 8511
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/ComboBoxTestBean.java
Log:
combobox component test
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/ComboBoxTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/ComboBoxTestBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/ComboBoxTestBean.java 2008-05-08 17:02:28 UTC (rev 8511)
@@ -0,0 +1,38 @@
+package org.ajax4jsf;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+public class ComboBoxTestBean {
+
+ private List<SelectItem> treeItems;
+ private List<String> treeNames;
+
+ public ComboBoxTestBean() {
+ treeNames = Arrays.asList("Pine", "Birch", "Aspen", "Spruce", "Oak", "Maple", "Ash", "Lime");
+ treeItems = new ArrayList<SelectItem>();
+ for (String treeName : treeNames) {
+ treeItems.add(new SelectItem(treeName, treeName));
+ }
+ }
+
+ /**
+ * Gets value of treeItems field.
+ * @return value of treeItems field
+ */
+ public List<SelectItem> getTreeItems() {
+ return treeItems;
+ }
+
+ /**
+ * Gets value of treeNames field.
+ * @return value of treeNames field
+ */
+ public List<String> getTreeNames() {
+ return treeNames;
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/ComboBoxTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 8 months
JBoss Rich Faces SVN: r8510 - in trunk/test-applications/seleniumTest/src: main/webapp/pages and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-05-08 13:01:23 -0400 (Thu, 08 May 2008)
New Revision: 8510
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/
trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
Log:
combobox component test
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-08 16:54:26 UTC (rev 8509)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-05-08 17:01:23 UTC (rev 8510)
@@ -71,5 +71,10 @@
<managed-bean-name>regionBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.A4JRegionTestBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>comboBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.ComboBoxTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>
\ No newline at end of file
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/comboBox/comboBoxTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java 2008-05-08 17:01:23 UTC (rev 8510)
@@ -0,0 +1,57 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.ajax4jsf.test.base.Templates;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class ComboBoxTest extends SeleniumTestBase {
+
+ public ComboBoxTest() {
+ super("http", "localhost", "8080");
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ @BeforeTest
+ @Parameters( { "browser" })
+ public void startSelenium(String browser) {
+ super.startSelenium(browser);
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ @AfterTest
+ public void stopSelenium() {
+ super.stopSelenium();
+ }
+
+ @Test
+ public void testComboBoxComponent() throws Exception {
+ _testComboBoxComponent(Templates.SIMPLE);
+ _testComboBoxComponent(Templates.DATATABLE);
+ }
+
+ private void _testComboBoxComponent(Templates template) {
+ renderPage("/faces/pages/comboBox/comboBoxTest.xhtml", template);
+
+ String parentId = getParentId() + "_form:";
+
+ String predefinedCBId = parentId + "predefinedcomboboxField";
+ String selectItemsCBId = parentId + "selectItemscomboboxField";
+ String suggestionValuesCBId = parentId + "suggestionValuescomboboxField";
+
+ writeStatus("check components\\' default labels");
+
+ getTextById(predefinedCBId).startsWith("Select a");
+ getTextById(selectItemsCBId).startsWith("Select a");
+ getTextById(suggestionValuesCBId).startsWith("Select a");
+
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/ComboBoxTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 8 months
JBoss Rich Faces SVN: r8509 - trunk/ui/inplaceInput/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-05-08 12:54:26 -0400 (Thu, 08 May 2008)
New Revision: 8509
Modified:
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
don't convert submittedValue
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-05-08 16:53:27 UTC (rev 8508)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-05-08 16:54:26 UTC (rev 8509)
@@ -29,8 +29,9 @@
Object value = component.getSubmittedValue();
if (value == null) {
value = component.getValue();
- }
- value = getConvertedStringValue(context, component,value);
+ value = getConvertedStringValue(context, component,value);
+ }
+
Object fieldValue = value;
if (value == null || value.equals("")) {
fieldValue = "";
16 years, 8 months
JBoss Rich Faces SVN: r8508 - in trunk/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-05-08 12:53:27 -0400 (Thu, 08 May 2008)
New Revision: 8508
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3311
Modified: trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-05-08 16:49:36 UTC (rev 8507)
+++ trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-05-08 16:53:27 UTC (rev 8508)
@@ -60,8 +60,10 @@
Map <String,String> request = context.getExternalContext().getRequestParameterMap();
String newValue = (String) request.get(clientId);
- if (newValue != null) {
+ if (newValue != null && newValue.length()!= 0) {
inplaceSelect.setSubmittedValue(newValue);
+ } else {
+ inplaceSelect.setSubmittedValue(null);
}
}
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-05-08 16:49:36 UTC (rev 8507)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-05-08 16:53:27 UTC (rev 8508)
@@ -33,9 +33,9 @@
Object value = component.getSubmittedValue();
if(value == null) {
value = component.getAttributes().get("value");
+ value = getConvertedStringValue(context, component,value);
}
String fieldLabel = getSelectedItemLabel(context, component);
- value = getConvertedStringValue(context, component,value);
String fieldValue = (String)value;
if (value == null || value.equals("")) {
16 years, 8 months
JBoss Rich Faces SVN: r8507 - in trunk/samples: scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-05-08 12:49:36 -0400 (Thu, 08 May 2008)
New Revision: 8507
Removed:
trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
Modified:
trunk/samples/jira-data/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
Log:
RF-2854
Modified: trunk/samples/jira-data/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
===================================================================
--- trunk/samples/jira-data/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2008-05-08 16:37:18 UTC (rev 8506)
+++ trunk/samples/jira-data/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2008-05-08 16:49:36 UTC (rev 8507)
@@ -151,31 +151,6 @@
}
/**
- * Execute query. Care for sorting
- * @param startRow
- * @param endRow
- * @param sortOrder
- * @return
- */
- public List <Issue> executeQuery(int startRow, int endRow, SortOrder sortOrder) {
- log.trace("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() {
@@ -241,7 +216,9 @@
if (maxSize >= 0 && issues.size() > maxSize) {
return;
}
-
+ if (issue.getAssignee().getUsername().startsWith("a")) {
+ issue.setAssignee(null);
+ }
issues.add(issue);
index.put(issue.getIndex(), issue);
}
@@ -259,37 +236,6 @@
}
- protected Comparator <Issue> createComparator(SortOrder sortOrder) {
-
- SortField [] fields = sortOrder.getFields();
- if (fields != null && fields.length > 0) {
- SortField field = fields[0];
- int prop = field.getIndex();
- boolean asc = field.getAscending().booleanValue();
-
- switch (prop) {
- case 0:
- return asc ? byIdAsc : byIdDesc;
- case 1:
- return asc ? byKeyAsc : byKeyDesc;
- case 2:
- return asc ? bySummaryAsc : bySummaryDesc;
- case 3:
- return asc ? byAssigneeAsc : byAssigneeDesc;
- case 4:
- return asc ? byStatusAsc : byStatusDesc;
- case 5:
- return asc ? byReporterAsc : byReporterDesc;
- case 6:
- return asc ? byPriAsc: byPriDesc;
- case 7:
- return asc ? byResolutionAsc : byResolutionDesc;
- }
- }
-
- return null;
- }
-
public Issue findById(Integer id) {
return getIndex().get(id);
}
Deleted: trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
===================================================================
--- trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2008-05-08 16:37:18 UTC (rev 8506)
+++ trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2008-05-08 16:49:36 UTC (rev 8507)
@@ -1,110 +0,0 @@
-/**
- *
- */
-package org.richfaces.demo.datagrid.bean;
-
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.demo.datagrid.model.Channel;
-import org.richfaces.demo.datagrid.model.Issue;
-import org.richfaces.demo.datagrid.model.Key;
-import org.richfaces.model.ScrollableTableDataModel;
-import org.richfaces.model.SortOrder;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class ChannelDataModel2 extends ScrollableTableDataModel<Issue> {
-
- private final Log log = LogFactory.getLog(ChannelDataModel2.class);
-
- public static final int BIG_QUERY_DELAY = 0*1000;
-
- public static final int SMALL_QUERY_DELAY = 0*500;
-
- private Channel channel;
-
- /* (non-Javadoc)
- * @see org.richfaces.model.GridDataModel#getObjectById(java.io.Serializable)
- */
- @Override
- public Issue getObjectById(Object id) {
-
- if (log.isTraceEnabled()) {
- log.trace(id);
- }
-
- if (SMALL_QUERY_DELAY > 0) {
- log.info("sleeping " + SMALL_QUERY_DELAY + "ms");
-
- try {
- Thread.sleep(SMALL_QUERY_DELAY);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- log.info("Awoke from slumber");
- }
-
-
- return channel.findIssueByKey((Key) id);
- }
-
- @Override
- public Object getId(Issue o) {
- Issue issue = (Issue)o;
- return issue.getKey();
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.model.GridDataModel#loadData(int, int, org.richfaces.model.SortOrder)
- */
- @Override
- public List <Issue> loadData(int startRow, int endRow, SortOrder sortOrder) {
-
- if (log.isTraceEnabled()){
- log.trace("startRow=" + startRow + ", endRow=" + endRow + ",sortOrder=" + sortOrder);
- }
-
- if (BIG_QUERY_DELAY > 0) {
- log.info("sleeping " + BIG_QUERY_DELAY);
-
- try {
- Thread.sleep(BIG_QUERY_DELAY);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- log.info("Awoke from slumber");
- }
-
-
- return channel.executeQuery(startRow, endRow, sortOrder);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getRowCount()
- */
- @Override
- public int getRowCount() {
- return channel.size();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getWrappedData()
- */
- @Override
- public Object getWrappedData() {
- return channel;
- }
-
- @Override
- public void setWrappedData(Object arg0) {
- this.channel = (Channel) arg0;
- }
-
-}
16 years, 8 months