JBoss Rich Faces SVN: r11983 - trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-23 05:42:07 -0500 (Tue, 23 Dec 2008)
New Revision: 11983
Modified:
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/js/link.js
Log:
https://jira.jboss.org/jira/browse/RF-5412
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/js/link.js
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/js/link.js 2008-12-23 10:01:58 UTC (rev 11982)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/themes/advanced/js/link.js 2008-12-23 10:42:07 UTC (rev 11983)
@@ -89,8 +89,11 @@
},
checkPrefix : function(n) {
- if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
+ // RF: variable added with regexp to avoid error in JSMin.java
+ var re = /^\s*mailto:/i;
+ if (n.value && Validator.isEmail(n) && !re.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
n.value = 'mailto:' + n.value;
+ // RF: end
if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
n.value = 'http://' + n.value;
16 years, 9 months
JBoss Rich Faces SVN: r11982 - trunk/framework/impl/src/main/resources/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-23 05:01:58 -0500 (Tue, 23 Dec 2008)
New Revision: 11982
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/component/messages_de.properties
Log:
https://jira.jboss.org/jira/browse/RF-5451
Modified: trunk/framework/impl/src/main/resources/org/richfaces/component/messages_de.properties
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/component/messages_de.properties 2008-12-23 10:01:41 UTC (rev 11981)
+++ trunk/framework/impl/src/main/resources/org/richfaces/component/messages_de.properties 2008-12-23 10:01:58 UTC (rev 11982)
@@ -1,9 +1,9 @@
# components
-org.richfaces.component.UIExtendedDataTable.Menu.Columns=Columns de
-org.richfaces.component.UIExtendedDataTable.Menu.SortAscending=Sort Ascending de
-org.richfaces.component.UIExtendedDataTable.Menu.SortDescending=Sort Descending de
-org.richfaces.component.UIExtendedDataTable.Menu.GroupByColumn=Group by this column de
-org.richfaces.component.UIExtendedDataTable.Menu.DisableGrouping=Disable Grouping de
+org.richfaces.component.UIExtendedDataTable.Menu.Columns=Spalten
+org.richfaces.component.UIExtendedDataTable.Menu.SortAscending=Sortieren aufsteigend
+org.richfaces.component.UIExtendedDataTable.Menu.SortDescending=Sortieren absteigend
+org.richfaces.component.UIExtendedDataTable.Menu.GroupByColumn=Gruppe nach Spalte
+org.richfaces.component.UIExtendedDataTable.Menu.DisableGrouping=Deaktivieren Sie Gruppierung
# converters
16 years, 9 months
JBoss Rich Faces SVN: r11981 - trunk/framework/impl/src/main/resources/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-23 05:01:41 -0500 (Tue, 23 Dec 2008)
New Revision: 11981
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/component/messages.properties
Log:
English messages are default
Modified: trunk/framework/impl/src/main/resources/org/richfaces/component/messages.properties
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/component/messages.properties 2008-12-23 09:31:55 UTC (rev 11980)
+++ trunk/framework/impl/src/main/resources/org/richfaces/component/messages.properties 2008-12-23 10:01:41 UTC (rev 11981)
@@ -1,9 +1,9 @@
# components
-org.richfaces.component.UIExtendedDataTable.Menu.Columns=Columns de
-org.richfaces.component.UIExtendedDataTable.Menu.SortAscending=Sort Ascending de
-org.richfaces.component.UIExtendedDataTable.Menu.SortDescending=Sort Descending de
-org.richfaces.component.UIExtendedDataTable.Menu.GroupByColumn=Group by this column de
-org.richfaces.component.UIExtendedDataTable.Menu.DisableGrouping=Disable Grouping de
+org.richfaces.component.UIExtendedDataTable.Menu.Columns=Columns
+org.richfaces.component.UIExtendedDataTable.Menu.SortAscending=Sort Ascending
+org.richfaces.component.UIExtendedDataTable.Menu.SortDescending=Sort Descending
+org.richfaces.component.UIExtendedDataTable.Menu.GroupByColumn=Group by this column
+org.richfaces.component.UIExtendedDataTable.Menu.DisableGrouping=Disable Grouping
# converters
16 years, 9 months
JBoss Rich Faces SVN: r11980 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-23 04:31:55 -0500 (Tue, 23 Dec 2008)
New Revision: 11980
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
change table state before UPDATE_MODEL_VALUE phase
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-23 09:08:49 UTC (rev 11979)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-12-23 09:31:55 UTC (rev 11980)
@@ -113,12 +113,12 @@
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (event instanceof DragDropEvent) {
new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (event instanceof ChangeColumnVisibilityEvent) {
new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (event instanceof ColumnResizeEvent) {
- event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else if (event instanceof ExtTableSortEvent) {
new AjaxEvent(this).queue();
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
@@ -143,7 +143,7 @@
String dropValue = event.getDropValue().toString();// dnd_drop_script
getState().changeColumnsOrder(dragValue, dropValue, event.isDropBefore());
- getFacesContext().renderResponse();
+ //getFacesContext().renderResponse();
}
public List<UIComponent> getSortedChildren() {
@@ -152,7 +152,7 @@
public void processChangeColumnVisibility(ChangeColumnVisibilityEvent event) {
getState().toggleColumnVisibility(this, event.getColumnId());
- getFacesContext().renderResponse();
+ //getFacesContext().renderResponse();
}
public void processSortingChange(ExtTableSortEvent event) {
@@ -184,7 +184,7 @@
public void processColumnResize(ColumnResizeEvent event) {
getState().changeColumnSize(this, event.getColumnWidths());
- getFacesContext().renderResponse();
+ //getFacesContext().renderResponse();
}
public String getColumnSize(UIComponent column) {
16 years, 9 months
JBoss Rich Faces SVN: r11979 - in trunk/samples/richfaces-demo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-12-23 04:08:49 -0500 (Tue, 23 Dec 2008)
New Revision: 11979
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5422
use ExtendedTableDataModel
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java 2008-12-23 01:20:32 UTC (rev 11978)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java 2008-12-23 09:08:49 UTC (rev 11979)
@@ -4,41 +4,23 @@
package org.richfaces.demo.extendedDataTable;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import org.richfaces.component.html.HtmlExtendedDataTable;
import org.richfaces.demo.capitals.Capital;
-import org.richfaces.model.selection.SimpleSelection;
+import org.richfaces.model.DataProvider;
+import org.richfaces.model.ExtendedTableDataModel;
/**
* @author Ilya Shaikovsky
- *
+ *
*/
public class ExtendedTableBean {
private String sortMode="single";
private String selectionMode="multi";
- private HtmlExtendedDataTable table;
- private SimpleSelection selection;
- private List<Capital> selectedCapitals = new ArrayList<Capital>();
+ private ExtendedTableDataModel<Capital> dataModel;
+ private List<Capital> capitals = new ArrayList<Capital>();
- public void takeSelection() {
- getSelectedCapitals().clear();
- Iterator<Object> iterator = getSelection().getKeys();
- while (iterator.hasNext()){
- Object key = iterator.next();
- table.setRowKey(key);
- if (table.isRowAvailable()) {
- getSelectedCapitals().add((Capital) table.getRowData());
- }
- }
- }
-
- public void resetSelection() {
- getSelectedCapitals().clear();
- }
-
public String getSortMode() {
return sortMode;
}
@@ -57,29 +39,41 @@
public ExtendedTableBean() {
}
+
+ public ExtendedTableDataModel<Capital> getCapitalsDataModel() {
+ if (dataModel == null) {
+ dataModel = new ExtendedTableDataModel<Capital>(new DataProvider<Capital>(){
- public HtmlExtendedDataTable getTable() {
- return table;
- }
+ private static final long serialVersionUID = 5054087821033164847L;
- public void setTable(HtmlExtendedDataTable table) {
- this.table = table;
- }
+ public Capital getItemByKey(Object key) {
+ for(Capital c : capitals){
+ if (key.equals(getKey(c))){
+ return c;
+ }
+ }
+ return null;
+ }
- public SimpleSelection getSelection() {
- return selection;
- }
+ public List<Capital> getItemsByRange(int firstRow, int endRow) {
+ return capitals.subList(firstRow, endRow);
+ }
- public void setSelection(SimpleSelection selection) {
- this.selection = selection;
- }
+ public Object getKey(Capital item) {
+ return item.getName();
+ }
- public List<Capital> getSelectedCapitals() {
- return selectedCapitals;
+ public int getRowCount() {
+ return capitals.size();
+ }
+
+ });
+ }
+ return dataModel;
}
- public void setSelectedCapitals(List<Capital> selectedCapitals) {
- this.selectedCapitals = selectedCapitals;
+ public void setCapitals(List<Capital> capitals) {
+ this.capitals = capitals;
}
-
+
}
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-23 01:20:32 UTC (rev 11978)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-12-23 09:08:49 UTC (rev 11979)
@@ -402,6 +402,10 @@
<managed-bean-name>extendedTableBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.extendedDataTable.ExtendedTableBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>capitals</property-name>
+ <value>#{capitalsBean.capitals}</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>queueBean</managed-bean-name>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml 2008-12-23 01:20:32 UTC (rev 11978)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml 2008-12-23 09:08:49 UTC (rev 11979)
@@ -1,88 +1,64 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
-<ui:composition>
- <h:form>
+ <ui:composition>
+ <h:form>
<h:panelGrid columns="2" columnClasses="top,top">
- <rich:extendedDataTable value="#{capitalsBean.capitals}" var="cap"
- id="table" width="580px" height="400px"
- sortMode="#{extendedTableBean.sortMode}"
- selectionMode="#{extendedTableBean.selectionMode}"
- selection="#{extendedTableBean.selection}"
- binding="#{extendedTableBean.table}">
- <rich:column sortable="false" label="Flag">
- <f:facet name="header">
- <h:outputText value="Flag" />
- </f:facet>
- <h:graphicImage value="#{cap.stateFlag}" />
- </rich:column>
- <rich:column sortable="true" sortBy="#{cap.state}"
- filterBy="#{cap.state}" filterEvent="onkeyup" width="170px"
- label="State Name">
- <f:facet name="header">
- <h:outputText value="State Name" />
- </f:facet>
- <h:outputText value="#{cap.state}" />
- </rich:column>
- <rich:column sortable="true" sortBy="#{cap.name}"
- filterBy="#{cap.name}" filterEvent="onkeyup" width="170px"
- label="State Capital">
- <f:facet name="header">
- <h:outputText value="State Capital" />
- </f:facet>
- <h:outputText value="#{cap.name}" />
- </rich:column>
- <rich:column sortable="false" label="Time Zone">
- <f:facet name="header">
- <h:outputText value="Time Zone" />
- </f:facet>
- <h:outputText value="#{cap.timeZone}" />
- </rich:column>
- <a4j:support event="onselectionchange" reRender="restable"
- ajaxSingle="true" action="#{extendedTableBean.takeSelection}"></a4j:support>
- </rich:extendedDataTable>
- <h:panelGrid columns="1">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Sort/Selection modes changing" />
- </f:facet>
- <h:panelGrid columns="2">
- <h:outputText value="Sort Mode:" />
- <h:selectOneMenu value="#{extendedTableBean.sortMode}">
- <f:selectItem itemLabel="Single" itemValue="single" />
- <f:selectItem itemLabel="Multi" itemValue="multi" />
- <a4j:support event="onchange" ajaxSingle="true" reRender="table" />
- </h:selectOneMenu>
- <h:outputText value="Selection Mode:" />
- <h:selectOneMenu value="#{extendedTableBean.selectionMode}">
- <a4j:support ajaxSingle="true" event="onchange" reRender="table" />
- <f:selectItem itemLabel="Single" itemValue="single" />
- <f:selectItem itemLabel="Multi" itemValue="multi" />
- <f:selectItem itemLabel="None" itemValue="none" />
- </h:selectOneMenu>
- </h:panelGrid>
- </rich:panel>
- <rich:panel id="restable">
- <f:facet name="header">
- <h:outputText value="Selected rows(capital names)" />
- </f:facet>
- <rich:dataList value="#{extendedTableBean.selectedCapitals}"
- var="cap" rendered="#{not empty extendedTableBean.selectedCapitals}">
- <h:outputText value="#{cap.name}" />
- </rich:dataList>
- <h:outputText value="Nothing selected"
- rendered="#{empty extendedTableBean.selectedCapitals}" />
- </rich:panel>
+ <rich:extendedDataTable value="#{extendedTableBean.capitalsDataModel}" var="cap" id="table"
+ width="580px" height="400px" sortMode="#{extendedTableBean.sortMode}"
+ selectionMode="#{extendedTableBean.selectionMode}">
+ <rich:column sortable="false" label="Flag">
+ <f:facet name="header">
+ <h:outputText value="Flag"/>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}"/>
+ </rich:column>
+ <rich:column sortable="true" sortBy="#{cap.state}" filterBy="#{cap.state}" filterEvent="onkeyup" width="170px" label="State Name">
+ <f:facet name="header">
+ <h:outputText value="State Name"/>
+ </f:facet>
+ <h:outputText value="#{cap.state}"/>
+ </rich:column>
+ <rich:column sortable="true" sortBy="#{cap.name}" filterBy="#{cap.name}" filterEvent="onkeyup" width="170px" label="State Capital">
+ <f:facet name="header">
+ <h:outputText value="State Capital"/>
+ </f:facet>
+ <h:outputText value="#{cap.name}"/>
+ </rich:column>
+ <rich:column sortable="false" label="Time Zone">
+ <f:facet name="header">
+ <h:outputText value="Time Zone"/>
+ </f:facet>
+ <h:outputText value="#{cap.timeZone}"/>
+ </rich:column>
+ </rich:extendedDataTable>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Sort/Selection modes changing"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Sort Mode:"/>
+ <h:selectOneMenu value="#{extendedTableBean.sortMode}">
+ <f:selectItem itemLabel="Single" itemValue="single"/>
+ <f:selectItem itemLabel="Multi" itemValue="multi"/>
+ <a4j:support event="onchange" ajaxSingle="true" reRender="table"/>
+ </h:selectOneMenu>
+ <h:outputText value="Selection Mode:"/>
+ <h:selectOneMenu value="#{extendedTableBean.selectionMode}">
+ <a4j:support ajaxSingle="true" event="onchange" reRender="table"/>
+ <f:selectItem itemLabel="Single" itemValue="single"/>
+ <f:selectItem itemLabel="Multi" itemValue="multi"/>
+ <f:selectItem itemLabel="None" itemValue="none"/>
+ </h:selectOneMenu>
</h:panelGrid>
-
+ </rich:panel>
</h:panelGrid>
- </h:form>
- <rich:messages></rich:messages>
-</ui:composition>
+ </h:form>
+ </ui:composition>
</html>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11978 - in trunk: docs/xslt and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-12-22 20:20:32 -0500 (Mon, 22 Dec 2008)
New Revision: 11978
Added:
trunk/docs/xslt/
trunk/docs/xslt/en/
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/GraphValidator.java
trunk/ui/message/src/test/java/org/richfaces/component/
trunk/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml
trunk/ui/beanValidator/pom.xml
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java
trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-4433
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -129,27 +129,6 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ViewHandlerWrapper#restoreView(javax.faces.context.FacesContext,
- * java.lang.String)
- */
-// public UIViewRoot restoreView(FacesContext context, String viewId) {
-// UIViewRoot viewRoot = super.restoreView(context, viewId);
-// ExternalContext externalContext = context.getExternalContext();
-// Map<String, Object> requestMap = externalContext.getRequestMap();
-// if (null == viewRoot) {
-// requestMap.put(VIEW_EXPIRED, Messages
-// .getMessage(Messages.AJAX_VIEW_EXPIRED));
-// if (_log.isDebugEnabled()) {
-// _log
-// .debug("Detect session expiration in AJAX request - view don't restored for a viewId "
-// + viewId);
-// }
-// }
-// return viewRoot;
-// }
/*
* (non-Javadoc)
Modified: trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml 2008-12-23 01:20:32 UTC (rev 11978)
@@ -32,7 +32,7 @@
</h:panelGrid>
<h:commandButton value="Submit"></h:commandButton>
</rich:panel>
- <rich:messages />
+ <rich:messages id="fieldsMessages"/>
</h:form>
<h:form id="form1">
<h2>Input fields with label and message in the JSF dataTable.
Modified: trunk/ui/beanValidator/pom.xml
===================================================================
--- trunk/ui/beanValidator/pom.xml 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/pom.xml 2008-12-23 01:20:32 UTC (rev 11978)
@@ -48,6 +48,11 @@
<version>3.3.0-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>message</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.GA</version>
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-23 01:20:32 UTC (rev 11978)
@@ -149,6 +149,15 @@
</property>
<property exist="true">
+ <name>type</name>
+ <classname>java.lang.String</classname>
+ <description>
+ JSF Validator type, that implements GraphValidator interface.This validator is used for the Graph and input fields validation.
+ </description>
+ <defaultvalue>"org.richfaces.BeanValidator"</defaultvalue>
+ </property>
+
+ <property exist="true">
<name>value</name>
<classname>java.lang.Object</classname>
<description>
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -22,16 +22,15 @@
package org.richfaces.component;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
-import java.util.List;
import java.util.Set;
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.EditableValueHolder;
+import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.component.UIInput;
@@ -57,169 +56,206 @@
* JSF component class
*
*/
-public abstract class UIBeanValidator extends UIComponentBase implements AjaxComponent, AjaxSupport, AjaxContainer {
+public abstract class UIBeanValidator extends UIComponentBase implements
+ AjaxComponent, AjaxSupport, AjaxContainer {
- public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
+ public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
- public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
+ public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
- public static final String BEAN_VALIDATOR_FACET = "org.richfaces.validator.";
-
+ public static final String BEAN_VALIDATOR_FACET = "org.richfaces.validator.";
- @Override
- public void setParent(UIComponent parent) {
- super.setParent(parent);
+ @Override
+ public void setParent(UIComponent parent) {
+ super.setParent(parent);
- if (null != parent && parent instanceof EditableValueHolder) {
- setParentProperties(parent);
- }
- }
+ if (null != parent && parent instanceof EditableValueHolder) {
+ setParentProperties(parent);
+ }
+ }
- /**
- * @param parent
- * @throws FacesException
- */
- public void setParentProperties(UIComponent parent) throws FacesException {
- if (!(parent instanceof EditableValueHolder)) {
- throw new FacesException("Parent component must be an EditableValueHolder");
- }
+ /**
+ * @param parent
+ * @throws FacesException
+ */
+ public void setParentProperties(UIComponent parent) throws FacesException {
+ if (!(parent instanceof EditableValueHolder)) {
+ throw new FacesException(
+ "Parent component must be an EditableValueHolder");
+ }
- if (null != getEvent()) {
- ValueExpression binding = new EventValueExpression(this);
- parent.setValueExpression(getEvent(), binding);
- }
- }
+ if (null != getEvent()) {
+ ValueExpression binding = new EventValueExpression(this);
+ parent.setValueExpression(getEvent(), binding);
+ }
+ }
- @Override
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
- if (event.getComponent() == this) {
- FacesContext context = getFacesContext();
- if (event instanceof ValidationEvent) {
- // ByPass UpdateModelValue
- context.renderResponse();
- } else if (event instanceof AjaxEvent) {
- // TODO - find all UIMessages components for a parent UIInput.
- // for an ajaxSingle component, re-render only target message.
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- ajaxContext.setSubmittedRegionClientId(this.getClientId(context));
- }
- }
- }
+ @Override
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ super.broadcast(event);
+ if (event.getComponent() == this) {
+ FacesContext context = getFacesContext();
+ if (event instanceof ValidationEvent) {
+ // ByPass UpdateModelValue
+ context.renderResponse();
+ } else if (event instanceof AjaxEvent) {
+ // TODO - find all UIMessages components for a parent UIInput.
+ // for an ajaxSingle component, re-render only target message.
+ AjaxContext ajaxContext = AjaxContext
+ .getCurrentInstance(context);
+ ajaxContext.setSubmittedRegionClientId(this
+ .getClientId(context));
+ }
+ }
+ }
- @Override
- public void queueEvent(FacesEvent event) {
- if (event instanceof ValidationEvent && event.getComponent() == this) {
- UIComponent parent = getParent();
- if (parent instanceof UIInput) {
- UIInput input = (UIInput) parent;
- if (input.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
- }
- }
- }
- super.queueEvent(event);
- }
+ @Override
+ public void queueEvent(FacesEvent event) {
+ if (event instanceof ValidationEvent && event.getComponent() == this) {
+ UIComponent parent = getParent();
+ if (parent instanceof UIInput) {
+ UIInput input = (UIInput) parent;
+ if (input.isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+ }
+ }
+ }
+ super.queueEvent(event);
+ }
- public String getEventString() {
- StringBuffer buildOnEvent = new StringBuffer();
- String onsubmit = getOnsubmit();
- // Insert script to call before submit ajax request.
- if (null != onsubmit) {
- buildOnEvent.append(onsubmit).append(";");
- }
- buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this, getFacesContext(), getEvent()));
- String script = buildOnEvent.toString();
- return script;
- }
+ public String getEventString() {
+ StringBuffer buildOnEvent = new StringBuffer();
+ String onsubmit = getOnsubmit();
+ // Insert script to call before submit ajax request.
+ if (null != onsubmit) {
+ buildOnEvent.append(onsubmit).append(";");
+ }
+ buildOnEvent.append(AjaxRendererUtils.buildOnEvent(this,
+ getFacesContext(), getEvent()));
+ String script = buildOnEvent.toString();
+ return script;
+ }
- public UIComponent getSingleComponent() {
- return getParent();
- }
+ public UIComponent getSingleComponent() {
+ return getParent();
+ }
- public void encodeAjax(FacesContext context) throws IOException {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- Set<String> renderedAreas = ajaxContext.getAjaxRenderedAreas();
- List<UIComponent> allMessages = getMessages(context);
- for (UIComponent message : allMessages) {
- if (message.isRendered()) {
- message.encodeAll(context);
- renderedAreas.add(message.getClientId(context));
- }
- }
- // Write information about encoded areas after submission.
- AjaxRendererUtils.encodeAreas(context, this);
- }
+ public void encodeAjax(FacesContext context) throws IOException {
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ Set<String> renderedAreas = ajaxContext.getAjaxRenderedAreas();
+ for (UIComponent message : getMessages(context)) {
+ if (message.isRendered()) {
+ message.encodeAll(context);
+ renderedAreas.add(message.getClientId(context));
+ }
+ }
+ // Write information about encoded areas after submission.
+ AjaxRendererUtils.encodeAreas(context, this);
+ }
- public List<UIComponent> getMessages(FacesContext context) {
- ArrayList<UIComponent> messages = new ArrayList<UIComponent>();
- UIComponent form = AjaxRendererUtils.getNestingForm(this);
- if (null == form) {
- form = context.getViewRoot();
- }
- findMessages(form, messages);
- return messages;
- }
+ public Set<UIComponent> getMessages(FacesContext context) {
+ Set<UIComponent> messages = new HashSet<UIComponent>();
+ findMessages(this.getParent(), this, messages,false);
+ findRichMessages(context, context.getViewRoot(), messages);
+ return messages;
+ }
- /**
- * Recursive search messages for the parent component.
- *
- * @param component
- * @param messages
- */
- protected void findMessages(UIComponent component, ArrayList<UIComponent> messages) {
- // TODO create more intellectual search, symmenric for an UIMessage
- // algoritm.
- Iterator<UIComponent> facetsAndChildren = component.getFacetsAndChildren();
- while (facetsAndChildren.hasNext()) {
- UIComponent child = (UIComponent) facetsAndChildren.next();
- if (child instanceof UIMessage || child instanceof UIMessages) {
- UIComponent message = (UIComponent) child;
- Object messag = message.getAttributes().get("for");
- String messageFor = messag != null ? messag.toString() : null ;
-
- if (null != messageFor && messageFor.equals(getParent().getId())) {
- messages.add(message);
- }
- }
- else {
- findMessages(child, messages);
- }
- }
- }
+
+ /**
+ * Find all instances of the {@link UIRichMessages} and update list of the rendered messages.
+ * @param context
+ * @param component
+ * @param messages
+ */
+ protected void findRichMessages(FacesContext context,UIComponent component, Set<UIComponent> messages) {
+ Iterator<UIComponent> facetsAndChildren = component.getFacetsAndChildren();
+ while (facetsAndChildren.hasNext()) {
+ UIComponent child = (UIComponent) facetsAndChildren.next();
+ if (child instanceof UIRichMessages) {
+ UIRichMessages richMessage = (UIRichMessages) child;
+ if(null == richMessage.getFor()){
+ richMessage.updateMessages(context, this.getParent().getClientId(context));
+ messages.add(richMessage);
+ }
+ } else {
+ findRichMessages(context, child, messages);
+ }
+ }
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.event.AjaxSource#addAjaxListener(org.ajax4jsf.event.AjaxListener)
- */
- public void addAjaxListener(AjaxListener listener) {
- addFacesListener(listener);
- }
+ /**
+ * Recursive search messages for the parent component.
+ * @param parent
+ * @param component
+ * @param messages
+ * @return
+ */
+ protected boolean findMessages(UIComponent parent, UIComponent component,
+ Set<UIComponent> messages,boolean found) {
+ Iterator<UIComponent> facetsAndChildren = parent.getFacetsAndChildren();
+ while (facetsAndChildren.hasNext()) {
+ UIComponent child = (UIComponent) facetsAndChildren.next();
+ if (child != component) {
+ if (child instanceof UIMessage || child instanceof UIMessages) {
+ UIComponent message = (UIComponent) child;
+ Object targetId = message.getAttributes().get("for");
+ if (null != targetId
+ && targetId.equals(getParent().getId())) {
+ messages.add(message);
+ found = true;
+ }
+ } else {
+ found |= findMessages(child, null, messages,found);
+ }
+ }
+ }
+ if(!(found && parent instanceof NamingContainer) && component != null){
+ UIComponent newParent = parent.getParent();
+ if(null != newParent){
+ found = findMessages(newParent, parent, messages,found);
+ }
+ }
+ return found;
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.event.AjaxSource#getAjaxListeners()
- */
- public AjaxListener[] getAjaxListeners() {
- return (AjaxListener[]) getFacesListeners(AjaxListener.class);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.ajax4jsf.event.AjaxSource#addAjaxListener(org.ajax4jsf.event.AjaxListener
+ * )
+ */
+ public void addAjaxListener(AjaxListener listener) {
+ addFacesListener(listener);
+ }
- /* (non-Javadoc)
- * @see org.ajax4jsf.event.AjaxSource#removeAjaxListener(org.ajax4jsf.event.AjaxListener)
- */
- public void removeAjaxListener(AjaxListener listener) {
- removeFacesListener(listener);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.event.AjaxSource#getAjaxListeners()
+ */
+ public AjaxListener[] getAjaxListeners() {
+ return (AjaxListener[]) getFacesListeners(AjaxListener.class);
+ }
- public void setAjaxListener(MethodExpression listener) {
- AjaxListener[] ajaxListeners = getAjaxListeners();
- for (int i = 0; i < ajaxListeners.length; i++) {
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.ajax4jsf.event.AjaxSource#removeAjaxListener(org.ajax4jsf.event.
+ * AjaxListener)
+ */
+ public void removeAjaxListener(AjaxListener listener) {
+ removeFacesListener(listener);
+ }
+
+ public void setAjaxListener(MethodExpression listener) {
+ AjaxListener[] ajaxListeners = getAjaxListeners();
+ for (int i = 0; i < ajaxListeners.length; i++) {
AjaxListener ajaxListener = ajaxListeners[i];
- if (ajaxListener.getClass().equals(MethodExpressionAjaxListener.class)) {
+ if (ajaxListener.getClass().equals(
+ MethodExpressionAjaxListener.class)) {
MethodExpressionAjaxListener expressionListener = (MethodExpressionAjaxListener) ajaxListener;
if (expressionListener.getExpression() != listener) {
removeAjaxListener(ajaxListener);
@@ -233,21 +269,22 @@
}
}
}
- }
-
- addAjaxListener(new MethodExpressionAjaxListener(listener));
- }
-
- public MethodExpression getAjaxListener() {
- AjaxListener[] ajaxListeners = getAjaxListeners();
- for (int i = 0; i < ajaxListeners.length; i++) {
+ }
+
+ addAjaxListener(new MethodExpressionAjaxListener(listener));
+ }
+
+ public MethodExpression getAjaxListener() {
+ AjaxListener[] ajaxListeners = getAjaxListeners();
+ for (int i = 0; i < ajaxListeners.length; i++) {
AjaxListener ajaxListener = ajaxListeners[i];
- if (ajaxListener.getClass().equals(MethodExpressionAjaxListener.class)) {
+ if (ajaxListener.getClass().equals(
+ MethodExpressionAjaxListener.class)) {
MethodExpressionAjaxListener expressionListener = (MethodExpressionAjaxListener) ajaxListener;
return expressionListener.getExpression();
}
- }
-
- return null;
- }
+ }
+
+ return null;
+ }
}
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -53,6 +53,7 @@
import org.richfaces.event.ValidationEvent;
import org.richfaces.validator.BeanValidator;
import org.richfaces.validator.FacesBeanValidator;
+import org.richfaces.validator.GraphValidator;
/**
@@ -106,23 +107,43 @@
* @param newvalue
*/
public abstract void setProfile(Set<String> newvalue);
+
+ /**
+ * Get graph validator Id.
+ * @return
+ */
+ public abstract String getType();
+ /**
+ * Set graph validator Id.
+ * @param newvalue
+ */
+ public abstract void setType(String newvalue);
+
+
+
@Override
public void processUpdates(FacesContext context) {
super.processUpdates(context);
Object value = getValue();
if (null != value) {
- BeanValidator beanValidator = BeanValidator.getInstance(context);
- String[] messages = beanValidator.validateGraph(context, value,getProfile());
- if (null != messages) {
- context.renderResponse();
- // send all validation messages.
- for (String msg : messages) {
- // TODO - create Summary message ?
- String summary = null != getSummary() ? getSummary() + msg : msg;
- context.addMessage(null, new FacesMessage(
- FacesMessage.SEVERITY_ERROR, summary, msg));
+ Validator validator = context.getApplication().createValidator(getType());
+ if (validator instanceof GraphValidator) {
+ GraphValidator graphValidator = (GraphValidator) validator;
+ String[] messages = graphValidator.validateGraph(context,this, value,getProfile());
+ if (null != messages) {
+ context.renderResponse();
+ // send all validation messages.
+ for (String msg : messages) {
+ // TODO - create Summary message ?
+ String summary = null != getSummary() ? getSummary() + msg : msg;
+ context.addMessage(null, new FacesMessage(
+ FacesMessage.SEVERITY_ERROR, summary, msg));
+ }
}
+
+ } else {
+ throw new FacesException("Validator "+FacesBeanValidator.BEAN_VALIDATOR_TYPE+" does not implement GraphValidator");
}
}
@@ -131,7 +152,7 @@
@Override
public void encodeBegin(FacesContext context) throws IOException {
super.encodeBegin(context);
- FacesBeanValidator validator = (FacesBeanValidator)context.getApplication().createValidator(FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ FacesBeanValidator validator = (FacesBeanValidator)context.getApplication().createValidator(getType());
validator.setSummary(getSummary());
setupValidators(this,validator);
}
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -21,6 +21,7 @@
package org.richfaces.validator;
import java.io.Serializable;
+import java.util.Set;
import javax.el.ELException;
import javax.el.ValueExpression;
@@ -39,7 +40,7 @@
* @author asmirnov
*
*/
-public class FacesBeanValidator implements Validator,Serializable {
+public class FacesBeanValidator implements Validator,Serializable, GraphValidator {
/**
*
@@ -112,4 +113,11 @@
}
}
}
+
+ public String[] validateGraph(FacesContext context, UIComponent component,
+ Object value, Set<String> profiles) throws ValidatorException {
+ BeanValidator beanValidator = BeanValidator.getInstance(context);
+ String[] messages = beanValidator.validateGraph(context, value,profiles);
+ return messages;
+ }
}
Added: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/GraphValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/GraphValidator.java (rev 0)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/GraphValidator.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package org.richfaces.validator;
+
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * This interface should be implemented by the JSF {@link Validator} which able to
+ * validate entire graph.
+ * @author asmirnov
+ *
+ */
+public interface GraphValidator {
+
+ public String[] validateGraph(FacesContext context, UIComponent component, Object value,
+ Set<String> profiles) throws ValidatorException ;
+
+}
Property changes on: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/GraphValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
===================================================================
--- trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -29,6 +29,7 @@
import javax.el.PropertyNotFoundException;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIForm;
+import javax.faces.component.UIMessage;
import javax.faces.component.UIMessages;
import javax.faces.component.html.HtmlForm;
import javax.faces.el.MethodNotFoundException;
@@ -50,6 +51,7 @@
UIBeanValidator validator = null;
HtmlInputText input = null;
UIMessages messages = null;
+ private UIMessage message;
public BeanValidatorComponentTest(String name) {
super(name);
@@ -64,12 +66,17 @@
validator = (UIBeanValidator)application.createComponent(UIBeanValidator.COMPONENT_TYPE);
validator.setId("validator");
+ input.setId("input");
input.getChildren().add(validator);
- input.setId("input");
form.getChildren().add(input);
- messages = (UIMessages)application.createComponent(UIMessages.COMPONENT_TYPE);
+ messages = (UIRichMessages)application.createComponent(UIRichMessages.COMPONENT_TYPE);
messages.setId("messages");
form.getChildren().add(messages);
+ message = (UIMessage)application.createComponent(UIMessage.COMPONENT_TYPE);
+ message.setId("msg");
+ message.setFor("input");
+ form.getChildren().add(message);
+ facesContext.getViewRoot().getChildren().add(form);
}
public void tearDown() throws Exception {
Modified: trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -20,102 +20,297 @@
*/
package org.richfaces.component;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map.Entry;
+
import javax.el.ELException;
import javax.el.ValueExpression;
import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.application.FacesMessage.Severity;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIMessages;
import javax.faces.context.FacesContext;
import org.ajax4jsf.component.AjaxOutput;
+import org.ajax4jsf.renderkit.RendererUtils;
/**
* @author Anton Belevich
- *
+ *
*/
-public abstract class UIRichMessages extends UIMessages implements AjaxOutput{
+public abstract class UIRichMessages extends UIMessages implements AjaxOutput {
- private String forVal = null;
- private boolean isPassed = true;
-
- /**
- * <p>Return the client identifier of the component for which
- * this component represents associated message(s) (if any).</p>
- */
- public String getFor() {
+ public static final String COMPONENT_TYPE = "org.richfaces.component.RichMessages";
- if (this.forVal != null) {
- return (this.forVal);
+ private String forVal = null;
+ private boolean updated = false;
+
+ private List<FacesMessageWithId> renderedMessages;
+
+ /**
+ * <p>
+ * Return the client identifier of the component for which this component
+ * represents associated message(s) (if any).
+ * </p>
+ */
+ public String getFor() {
+
+ if (this.forVal != null) {
+ return (this.forVal);
+ }
+ ValueExpression ve = getValueExpression("for");
+ if (ve != null) {
+ try {
+ return ((String) ve.getValue(getFacesContext().getELContext()));
+ } catch (ELException e) {
+ throw new FacesException(e);
+ }
+ } else {
+ return (null);
+ }
+
}
- ValueExpression ve = getValueExpression("for");
- if (ve != null) {
- try {
- return ((String) ve.getValue(getFacesContext().getELContext()));
- }
- catch (ELException e) {
- throw new FacesException(e);
- }
- } else {
- return (null);
- }
- }
+ /**
+ * <p>
+ * Set the client identifier of the component for which this component
+ * represents associated message(s) (if any). This property must be set
+ * before the message is displayed.
+ * </p>
+ *
+ * @param newFor
+ * The new client id
+ */
+ public void setFor(String newFor) {
+ forVal = newFor;
- /**
- * <p>Set the client identifier of the component for which this
- * component represents associated message(s) (if any). This
- * property must be set before the message is displayed.</p>
- *
- * @param newFor The new client id
- */
- public void setFor(String newFor) {
+ }
- forVal = newFor;
+ public boolean isUpdated() {
+ return updated;
+ }
- }
-
- public boolean isPassed(){
- return isPassed;
- }
-
public boolean isAjaxRendered() {
return true;
}
- public void setAjaxRendered(boolean ajaxRendered){
- if(!ajaxRendered){
+ public Iterator<FacesMessage> getMessages(FacesContext context) {
+ String forInputId = getFor();
+ if (null == this.renderedMessages || null != forInputId) {
+ List<String> severenities = getSeverenities();
+ renderedMessages = new ArrayList<FacesMessageWithId>();
+ if (isGlobalOnly()) {
+ addMessagesForId(context, null, severenities);
+ } else if (null != forInputId) {
+ UIComponent componentFor = RendererUtils.getInstance()
+ .findComponentFor(context, this, forInputId);
+ if (null != componentFor) {
+ addMessagesForId(context,
+ componentFor.getClientId(context), severenities);
+ }
+ } else {
+ Iterator<String> clientIdsWithMessages = context
+ .getClientIdsWithMessages();
+ while (clientIdsWithMessages.hasNext()) {
+ addMessagesForId(context, clientIdsWithMessages.next(),
+ severenities);
+ }
+ }
+ }
+ ;
+ final Iterator<FacesMessageWithId> iterator = this
+ .renderedMessages.iterator();
+ return new Iterator<FacesMessage>() {
+
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ public FacesMessage next() {
+ return iterator.next().getMessage();
+ }
+
+ public void remove() {
+ }
+ };
+ }
+
+ public void updateMessages(FacesContext context, String forId) {
+ updated = true;
+ if (null == renderedMessages) {
+ renderedMessages = new ArrayList<FacesMessageWithId>();
+ } else {
+ Iterator<FacesMessageWithId> renderedMessageIterator = renderedMessages
+ .iterator();
+ while (renderedMessageIterator.hasNext()) {
+ String clientId = renderedMessageIterator.next().getClientId();
+ if ((null == forId && null == clientId) || (null != forId && forId.equals(clientId))) {
+ renderedMessageIterator.remove();
+ }
+ }
+ }
+ addMessagesForId(context, forId, getSeverenities());
+ }
+
+ /**
+ * @param context
+ * @param forId
+ * @param severenities
+ * TODO
+ */
+ protected void addMessagesForId(FacesContext context, String forId,
+ List<String> severenities) {
+ Iterator<FacesMessage> messages = context.getMessages(forId);
+ while (messages.hasNext()) {
+ FacesMessage message = messages.next();
+ if (severenities.size() == 0 || severenities.contains("ALL")
+ || isApplicableMessage(severenities, message)) {
+ renderedMessages.add(
+ new FacesMessageWithId(forId, message));
+ }
+ }
+ }
+
+ /**
+ * @param severenities
+ * @param message
+ * @return
+ */
+ protected boolean isApplicableMessage(List<String> severenities,
+ FacesMessage message) {
+ if (severenities.size() == 0 || severenities.contains("ALL")) {
+ return true;
+ }
+ Severity severity = message.getSeverity();
+ for (Object key : FacesMessage.VALUES_MAP.keySet()) {
+ Severity sev = (Severity) FacesMessage.VALUES_MAP.get(key);
+ if(0 == sev.compareTo(severity)){
+ return severenities.contains(key);
+ }
+ }
+ return false;
+ }
+
+ public void setAjaxRendered(boolean ajaxRendered) {
+ if (!ajaxRendered) {
new IllegalArgumentException();
- }
+ }
}
-
- public void decode(FacesContext context){
-// isPassed = true;
- super.decode(context);
+
+ @Override
+ public void encodeBegin(FacesContext context) throws IOException {
+ if (!isUpdated()) {
+ setRenderedMessages(null);
+ }
+ super.encodeBegin(context);
}
public abstract String getLevel();
public abstract void setLevel(String level);
+ public List<String> getSeverenities() {
+ String level = getLevel();
+ List<String> severenities;
+ if (null != level) {
+ String[] levels = level.split(",");
+ severenities = new ArrayList<String>(levels.length);
+ for (int i = 0; i < levels.length; i++) {
+ String levelName = levels[i].toUpperCase().trim();
+ severenities.add(levelName);
+ }
+ } else {
+ severenities = Collections.emptyList();
+ }
+ return severenities;
+ }
+
private Object[] values;
public Object saveState(FacesContext context) {
if (values == null) {
- values = new Object[2];
+ values = new Object[3];
}
values[0] = super.saveState(context);
values[1] = this.forVal;
+ values[2] = saveAttachedState(context, getRenderedMessages());
return (values);
}
+ @SuppressWarnings("unchecked")
public void restoreState(FacesContext context, Object state) {
values = (Object[]) state;
super.restoreState(context, values[0]);
forVal = (String) values[1];
+ setRenderedMessages((List<FacesMessageWithId>) restoreAttachedState(
+ context, values[2]));
}
+ /**
+ * @author asmirnov
+ *
+ */
+ @SuppressWarnings("serial")
+ public static class FacesMessageWithId implements
+ Serializable {
+ private FacesMessage message;
+
+ private final String clientId;
+
+ /**
+ * @param clientId
+ * @param message
+ */
+ public FacesMessageWithId(String clientId, FacesMessage message) {
+ this.message = message;
+ this.clientId = clientId;
+ }
+
+ /**
+ * @return the message
+ */
+ public FacesMessage getMessage() {
+ return message;
+ }
+
+ /**
+ * @return the clientId
+ */
+ public String getClientId() {
+ return clientId;
+ }
+
+
+
+
+ }
+
+ /**
+ * @return the renderedMessages
+ */
+ protected List<FacesMessageWithId> getRenderedMessages() {
+ return renderedMessages;
+ }
+
+ /**
+ * @param renderedMessages
+ * the renderedMessages to set
+ */
+ protected void setRenderedMessages(List<FacesMessageWithId> renderedMessages) {
+ this.renderedMessages = renderedMessages;
+ }
+
}
Modified: trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2008-12-22 18:48:42 UTC (rev 11977)
+++ trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -57,17 +57,8 @@
throw new FacesException("The rich:messages component must specify only one of 'for' or 'globalOnly' atribbute");
}
}
- Iterator<FacesMessage> messagesIter = getMessageIterator(context, forIds, component);
+ Iterator<FacesMessage> messagesIter = uiMessages.getMessages(context);
boolean isDisplayNone = !messagesIter.hasNext();
- String [] levels = uiMessages.getLevel().split(",");
- List<String> acceptLevels = creatAcceptLevels(levels);
-
- if(!isDisplayNone){
-
- if (!isAcceptableMessagesPresent(acceptLevels, messagesIter)) {
- isDisplayNone = true;
- }
- }
boolean isWroteTable = false;
layout = (String)uiMessages.getAttributes().get("layout");
if((layout != null) && (layout.equals("table"))){
@@ -89,7 +80,7 @@
}
- messagesIter = getMessageIterator(context, forIds, component);
+// messagesIter = getMessageIterator(context, forIds, component);
if(!messagesIter.hasNext()){
renderBody(uiMessages, context, writer, null,isWroteTable);
@@ -97,11 +88,7 @@
while(messagesIter.hasNext()){
FacesMessage facesMsg = (FacesMessage)(messagesIter.next());
-
- if(isAcceptableMessage(facesMsg, acceptLevels)){
-
- renderBody(uiMessages, context, writer, facesMsg,isWroteTable);
- }
+ renderBody(uiMessages, context, writer, facesMsg,isWroteTable);
}
}
@@ -231,7 +218,7 @@
public void renderBody(UIRichMessages uiMessages, FacesContext context, ResponseWriter writer,FacesMessage facesMsg,boolean isWroteTable) throws IOException{
- if(uiMessages.isPassed() || facesMsg != null ){
+ if(facesMsg != null ){
if(isWroteTable){
writer.startElement(HTML.TR_ELEMENT, uiMessages);
writer.startElement(HTML.td_ELEM, uiMessages);
Added: trunk/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java
===================================================================
--- trunk/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java (rev 0)
+++ trunk/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java 2008-12-23 01:20:32 UTC (rev 11978)
@@ -0,0 +1,239 @@
+/**
+ *
+ */
+package org.richfaces.component;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlInputText;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIRichMessages.FacesMessageWithId;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class UIMessagesTest extends AbstractAjax4JsfTestCase {
+
+ private static final class MockRichMessages extends UIRichMessages {
+ private String level = "ALL";
+
+ @Override
+ public String getLevel() {
+ return level;
+ }
+
+ @Override
+ public void setLevel(String level) {
+ this.level = level;
+
+ }
+
+ public boolean isKeepTransient() {
+ return true;
+ }
+
+ public void setKeepTransient(boolean ajaxRendered) {
+ }
+ }
+
+ private static final String INPUT_ID = "input";
+ private static final String MESSAGES_ID = "messages";
+ private UIRichMessages uiMessages;
+
+ /**
+ * @param name
+ */
+ public UIMessagesTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ uiMessages = new MockRichMessages();
+ uiMessages.setId(MESSAGES_ID);
+ List<UIComponent> children = facesContext.getViewRoot().getChildren();
+ children.add(uiMessages);
+ HtmlInputText inputText = new HtmlInputText();
+ inputText.setId(INPUT_ID);
+ children.add(inputText);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ this.uiMessages = null;
+ super.tearDown();
+ }
+
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#getMessages(javax.faces.context.FacesContext)}.
+ */
+ public void testGetMessages() {
+ prepareMessages();
+ uiMessages.getMessages(facesContext);
+ assertEquals(8, uiMessages.getRenderedMessages().size());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#getMessages(javax.faces.context.FacesContext)}.
+ */
+ public void testGetMessagesWithFor() {
+ prepareMessages();
+ uiMessages.setFor(INPUT_ID);
+ uiMessages.getMessages(facesContext);
+ assertEquals(4, uiMessages.getRenderedMessages().size());
+ assertEquals(INPUT_ID, uiMessages.getRenderedMessages().get(0).getClientId());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#getMessages(javax.faces.context.FacesContext)}.
+ */
+ public void testGetMessagesForGlobal() {
+ prepareMessages();
+ uiMessages.setGlobalOnly(true);
+ Iterator<FacesMessage> iterator = uiMessages.getMessages(facesContext);
+ assertEquals(4, uiMessages.getRenderedMessages().size());
+ assertTrue(iterator.hasNext());
+ }
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#updateMessages(javax.faces.context.FacesContext, java.lang.String)}.
+ */
+ public void testUpdateMessages() {
+ prepareMessages();
+ ArrayList<FacesMessageWithId> savedMessages = prepareSavedMessages();
+ uiMessages.setRenderedMessages(savedMessages);
+ uiMessages.updateMessages(facesContext, INPUT_ID);
+ assertTrue(uiMessages.isUpdated());
+ assertSame(savedMessages,uiMessages.getRenderedMessages());
+ assertEquals(6, uiMessages.getRenderedMessages().size());
+ }
+
+ /**
+ * @return
+ */
+ private ArrayList<FacesMessageWithId> prepareSavedMessages() {
+ ArrayList<FacesMessageWithId> savedMessages = new ArrayList<FacesMessageWithId>();
+ FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_WARN,"Warn","Old Warn level message");
+ savedMessages.add(new FacesMessageWithId(INPUT_ID,facesMessage));
+ savedMessages.add(new FacesMessageWithId(null,facesMessage));
+ savedMessages.add(new FacesMessageWithId("bar",facesMessage));
+ return savedMessages;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#updateMessages(javax.faces.context.FacesContext, java.lang.String)}.
+ */
+ public void testUpdateEmptyMessages() {
+ prepareMessages();
+ uiMessages.updateMessages(facesContext, INPUT_ID);
+ assertTrue(uiMessages.isUpdated());
+ assertNotNull(uiMessages.getRenderedMessages());
+ assertEquals(4, uiMessages.getRenderedMessages().size());
+ }
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#encodeBegin(javax.faces.context.FacesContext)}.
+ * @throws IOException
+ */
+ public void testEncodeBeginFacesContext() throws IOException {
+ prepareMessages();
+ uiMessages.setRenderedMessages(prepareSavedMessages());
+ uiMessages.encodeBegin(facesContext);
+ assertNull(uiMessages.getRenderedMessages());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#encodeBegin(javax.faces.context.FacesContext)}.
+ * @throws IOException
+ */
+ public void testEncodeBeginAfterUpdate() throws IOException {
+ prepareMessages();
+ ArrayList<FacesMessageWithId> savedMessages = prepareSavedMessages();
+ uiMessages.setRenderedMessages(savedMessages);
+ uiMessages.updateMessages(facesContext, null);
+ uiMessages.encodeBegin(facesContext);
+ assertNotNull(uiMessages.getRenderedMessages());
+ assertSame(savedMessages,uiMessages.getRenderedMessages());
+ assertEquals(6, uiMessages.getRenderedMessages().size());
+ }
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#getSeverenities()}.
+ */
+ public void testGetSeverenities() {
+ uiMessages.setLevel("ALL,ERROR");
+ List<String> severenities = uiMessages.getSeverenities();
+ assertEquals(2, severenities.size());
+ assertTrue(severenities.contains("ALL"));
+ assertTrue(severenities.contains("ERROR"));
+ }
+
+ /**
+ * Test method for {@link org.richfaces.component.UIRichMessages#saveState(javax.faces.context.FacesContext)}.
+ */
+ public void testSaveStateFacesContext() {
+ prepareMessages();
+ uiMessages.getMessages(facesContext);
+ Object state = uiMessages.saveState(facesContext);
+ MockRichMessages newMessages = new MockRichMessages();
+ newMessages.restoreState(facesContext, state);
+ assertNotNull(newMessages.getRenderedMessages());
+ assertEquals(uiMessages.getRenderedMessages().size(), newMessages.getRenderedMessages().size());
+
+ }
+
+
+ public void testAddMessagesForId() throws Exception {
+ List<String> severenities = prepareMessages();
+ severenities.add("ALL");
+ uiMessages.setRenderedMessages(new ArrayList<FacesMessageWithId>());
+ uiMessages.addMessagesForId(facesContext, INPUT_ID, severenities);
+ assertEquals(4, uiMessages.getRenderedMessages().size());
+ }
+
+ public void testAddMessagesForIdNull() throws Exception {
+ List<String> severenities = prepareMessages();
+ uiMessages.setRenderedMessages(new ArrayList<FacesMessageWithId>());
+ uiMessages.addMessagesForId(facesContext, null, severenities);
+ assertEquals(4, uiMessages.getRenderedMessages().size());
+ }
+
+ public void testAddMessagesForIdWithLevels() throws Exception {
+ List<String> severenities = prepareMessages();
+ uiMessages.setRenderedMessages(new ArrayList<FacesMessageWithId>());
+ severenities.add("ERROR");
+ uiMessages.addMessagesForId(facesContext, INPUT_ID, severenities);
+ assertEquals(1, uiMessages.getRenderedMessages().size());
+ }
+ /**
+ * @return
+ */
+ private List<String> prepareMessages() {
+ addMessages(INPUT_ID);
+ addMessages(null);
+ List<String> severenities = new ArrayList<String>();
+ return severenities;
+ }
+
+ /**
+ * @param id TODO
+ *
+ */
+ private void addMessages(String id) {
+ facesContext.addMessage(id, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Error","Error level message"));
+ facesContext.addMessage(id, new FacesMessage(FacesMessage.SEVERITY_FATAL,"Fatal","Fatal level message"));
+ facesContext.addMessage(id, new FacesMessage(FacesMessage.SEVERITY_INFO,"Info","Info level message"));
+ facesContext.addMessage(id, new FacesMessage(FacesMessage.SEVERITY_WARN,"Warn","Warn level message"));
+ }
+
+}
Property changes on: trunk/ui/message/src/test/java/org/richfaces/component/UIMessagesTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 9 months
JBoss Rich Faces SVN: r11977 - trunk/ui/inplaceSelect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-22 13:48:42 -0500 (Mon, 22 Dec 2008)
New Revision: 11977
Modified:
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5408
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-12-22 15:59:20 UTC (rev 11976)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-12-22 18:48:42 UTC (rev 11977)
@@ -39,19 +39,23 @@
String fieldValue = null;
String fieldLabel = null;
+ String fieldInputLabel = null;
if (selectedItemLabel == null) {
fieldValue = null;
fieldLabel = createDefaultLabel(component);
+ fieldInputLabel="";
} else {
fieldValue = (String)value;
- fieldLabel = selectedItemLabel;
+ fieldLabel = selectedItemLabel;
+ fieldInputLabel = fieldLabel;
}
String encodedFieldValue = encodeValue(fieldValue);
variables.setVariable("fieldLabel", fieldLabel);
variables.setVariable("fieldValue", fieldValue);
+ variables.setVariable("fieldInputLabel", fieldInputLabel);
variables.setVariable("encodedFieldValue", encodedFieldValue);
String saveIcon = (String)component.getAttributes().get("saveControlIcon");
@@ -116,7 +120,7 @@
<input id="#{clientId}inplaceTmpValue"
type="text"
style='clip:rect(0px 0px 0px 0px)'
- value="#{fieldLabel}"
+ value="#{fieldInputLabel}"
autocomplete="off"
maxlength='#{component.attributes["inputMaxLength"]}'
readonly="readonly"
16 years, 9 months
JBoss Rich Faces SVN: r11976 - trunk/ui/suggestionbox/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 10:59:20 -0500 (Mon, 22 Dec 2008)
New Revision: 11976
Modified:
trunk/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
Log:
Add JUnits for suggestionBox
Modified: trunk/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
===================================================================
--- trunk/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java 2008-12-22 15:38:13 UTC (rev 11975)
+++ trunk/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java 2008-12-22 15:59:20 UTC (rev 11976)
@@ -21,14 +21,24 @@
package org.richfaces.component;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.el.PropertyNotFoundException;
import javax.faces.component.UIForm;
import javax.faces.component.UIInput;
import javax.faces.component.html.HtmlForm;
+import javax.faces.el.MethodNotFoundException;
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
@@ -40,6 +50,7 @@
public class SuggestionBoxComponentTest extends AbstractAjax4JsfTestCase {
private static Set javaScripts = new HashSet();
private static final boolean IS_PAGE_AVAILABILITY_CHECK = true;
+ private static String[] SUGGESTION = new String[]{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"};
static {
javaScripts.add("org.ajax4jsf.javascript.AjaxScript");
@@ -81,6 +92,8 @@
sb = (UISuggestionBox)application.createComponent("org.richfaces.SuggestionBox");
sb.setId("suggestionBox");
sb.setFor(input.getId());
+ sb.setUsingSuggestObjects(true);
+ sb.setSuggestionAction(action);
form.getChildren().add(sb);
}
@@ -146,4 +159,69 @@
//System.out.println(page.asXml());
assertEquals(getCountValidScripts(page, javaScripts, IS_PAGE_AVAILABILITY_CHECK).intValue(), javaScripts.size());
}
+
+ public void testBroadcast() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ sb.setFetchValue("1");
+ sb.setSubmitedValue(null, new String[]{"1"});
+
+ sb.broadcast(new AjaxEvent(sb));
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+ assertFalse(ajaxContext.getAjaxAreasToRender().isEmpty());
+ assertTrue(ajaxContext.getAjaxAreasToRender().iterator().next().contains(sb.getClientId(facesContext)));
+ Map<String, Object> ajaxResponseData = ajaxContext.getResponseDataMap();
+ Map<String, Object> data = (Map<String, Object>) ajaxResponseData.get("_ajax:data");
+ Object suggestinObjects = data.get("suggestionObjects");
+ assertNotNull(suggestinObjects);
+ assertEquals(Arrays.asList(SUGGESTION), suggestinObjects);
+ Map requestedObjectsObjects = (Map)data.get("requestedObjects");
+ assertNotNull(requestedObjectsObjects);
+ assertEquals(requestedObjectsObjects.get("1"), "1");
+ }
+
+ public void testDecode() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ sb.setFetchValue("1");
+ sb.setSubmitedValue(Arrays.asList(SUGGESTION), new String[] { "1" });
+ facesContext.getExternalContext().getRequestParameterMap().put(
+ sb.getClientId(facesContext) + "_selection", "1");
+
+ sb.processDecodes(facesContext);
+ assertEquals(1, sb.getRowNumber());
+ }
+
+ MethodExpression action = new MethodExpression(){
+
+ public Object invoke(ELContext context, Object[] params) throws PropertyNotFoundException, MethodNotFoundException,
+ ELException {
+ return Arrays.asList(SUGGESTION);
+ }
+
+ public MethodInfo getMethodInfo(ELContext context) {
+
+ return null;
+ }
+
+ public boolean equals(Object obj) {
+ return (obj instanceof MethodExpression && obj.hashCode() == this.hashCode());
+ }
+
+
+ public String getExpressionString() {
+ return null;
+ }
+
+ public int hashCode() {
+ return 0;
+ }
+
+ public boolean isLiteralText() {
+ return false;
+ }
+
+ };
+
+
}
16 years, 9 months
JBoss Rich Faces SVN: r11975 - in trunk/docs/migrationguide/en/src/main/docbook: included and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-22 10:38:13 -0500 (Mon, 22 Dec 2008)
New Revision: 11975
Added:
trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml
Modified:
trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
trunk/docs/migrationguide/en/src/main/docbook/master.xml
Log:
RF-3048 - Migration guide
Modified: trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml 2008-12-22 14:25:15 UTC (rev 11974)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml 2008-12-22 15:38:13 UTC (rev 11975)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<section id="asClientId" role="asClientId">
+<section id="asClientId" role="new">
<?dbhtml filename="asClientId.html"?>
<sectioninfo>
<keywordset>
Added: trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml (rev 0)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml 2008-12-22 15:38:13 UTC (rev 11975)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="panelGridClass" role="new">
+ <?dbhtml filename="panelGridClass.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>panelGrid</keyword>
+ <keyword>class</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title><h:panelGrid>: column classes are encoded in a wrong way</title>
+ <section>
+ <title>Description</title>
+ <para>
+ The column classes of <emphasis role="bold"><property><h:panelGrid></property></emphasis> are encoded in a wrong way: only the first <emphasis role="bold"><property><td></property></emphasis> element in a table has the class specified in the <emphasis><property>"columnClasses"</property></emphasis> attribute.
+ </para>
+ </section>
+ <section>
+ <title>Links</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="https://jira.jboss.org/jira/browse/RF-5424">Jira</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=900">JavaServer Faces issues</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>How to reproduce</title>
+ <para>
+ Place <code><h:panelGrid columns="3" columnClasses="cell"></code> on a page and specify styles for the <code>.cell</code> class. As the result only the first <emphasis role="bold"><property><td></property></emphasis> in a table has this class.
+ </para>
+ </section>
+ <section>
+ <title>Causes</title>
+ <para>
+ It is a defect in JSF-RI 1.2.10 and JSF-RI 1.2_11.
+ </para>
+ </section>
+
+ <section>
+ <title>Workarounds</title>
+ <para>
+ The solution is to use as many <emphasis><property>"columnClasses"</property></emphasis> attributes as columns in the <emphasis role="bold"><property><h:panelGrid></property></emphasis>.
+ </para>
+ </section>
+</section>
Property changes on: trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-22 14:25:15 UTC (rev 11974)
+++ trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-22 15:38:13 UTC (rev 11975)
@@ -21,7 +21,9 @@
<!ENTITY myfaces SYSTEM "included/myfaces.xml">
<!ENTITY seamMultipartFilter SYSTEM "included/seamMultipartFilter.xml">
- <!ENTITY asClientId SYSTEM "included/asClientId.xml">
+ <!ENTITY asClientId SYSTEM "included/asClientId.xml">
+ <!ENTITY panelGridClass SYSTEM "included/panelGridClass.xml">
+
]>
<book>
<bookinfo>
@@ -138,6 +140,23 @@
However, <ulink url="http://jira.jboss.com/jira/browse/RF">Jira</ulink> contains all issues
and if you can not find your case there, please, feel free to report it.
</para>
+ <section id="MostImportant32to33">
+ <?dbhtml filename="MostImportant32to33.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>important</keyword>
+ <keyword>issues</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Most important issues</title>
+ <para>
+ Migrating to <property>RichFaces 3.2.x</property> you can encounter
+ with malfunction of the components caused by a number of reasons.
+ However, most of the problems can be positively solved.
+ This section covers the most significant issues you can potentially encounter, providing ways to handle the cases.
+ </para>
+&panelGridClass;
+ </section>
<section id="ThirdPartyFrameworks32to33">
<?dbhtml filename="ThirdPartyFrameworks32to33.html"?>
<sectioninfo>
16 years, 9 months
JBoss Rich Faces SVN: r11974 - trunk/test-applications/jsp/src/main/webapp/styles.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-12-22 09:25:15 -0500 (Mon, 22 Dec 2008)
New Revision: 11974
Modified:
trunk/test-applications/jsp/src/main/webapp/styles/styles.css
Log:
change bgcolor for body
Modified: trunk/test-applications/jsp/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-12-22 13:54:39 UTC (rev 11973)
+++ trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-12-22 14:25:15 UTC (rev 11974)
@@ -3,7 +3,7 @@
float: right;
}
-/* Editor */
+/** Editor */
.EditorStyleClass {
}
@@ -275,9 +275,10 @@
}
.body {
- background-color: purple;
+ background-color: #FFFFFF;
}
.test {
color: green;
+ background-image:url(/*/image.gif)
}
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11973 - trunk/ui/drag-drop/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-22 08:54:39 -0500 (Mon, 22 Dec 2008)
New Revision: 11973
Modified:
trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
Log:
https://jira.jboss.org/jira/browse/RF-5392
Modified: trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2008-12-22 13:53:56 UTC (rev 11972)
+++ trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2008-12-22 13:54:39 UTC (rev 11973)
@@ -80,7 +80,17 @@
<property hidden="true" >
<name>actionExpression</name>
</property>
+
+ <property hidden="true">
+ <name>ajaxSingle</name>
+ <classname>boolean</classname>
+ </property>
+ <property hidden="true">
+ <name>process</name>
+ <classname>java.lang.Object</classname>
+ </property>
+
</component>
16 years, 9 months
JBoss Rich Faces SVN: r11972 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-22 08:53:56 -0500 (Mon, 22 Dec 2008)
New Revision: 11972
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxCommandLinkAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumEvent.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
Fix commandLink test
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxCommandLinkAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxCommandLinkAutoTest.xhtml 2008-12-22 13:49:03 UTC (rev 11971)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxCommandLink/ajaxCommandLinkAutoTest.xhtml 2008-12-22 13:53:56 UTC (rev 11972)
@@ -29,6 +29,8 @@
onmouseout="EventQueue.fire('onmouseout')"
onmouseover="EventQueue.fire('onmouseover')"
onmouseup="EventQueue.fire('onmouseup')"
+ onfocus="EventQueue.fire('onfocus')"
+ onchange="EventQueue.fire('onchange')"
>
<f:param name="parameter1" value="value1" />
<f:param name="parameter2" value="value2" />
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-22 13:49:03 UTC (rev 11971)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-12-22 13:53:56 UTC (rev 11972)
@@ -342,6 +342,7 @@
private void checkComponentReRendered() {
if (base.getReRendersId() == null) {
+ base.sendAjax();
return;
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumEvent.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumEvent.java 2008-12-22 13:49:03 UTC (rev 11971)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumEvent.java 2008-12-22 13:53:56 UTC (rev 11972)
@@ -52,7 +52,7 @@
};
static {
STANDARD_HTML_EVENTS.add(ONCLICK);
- STANDARD_HTML_EVENTS.add(ONDBLCLICK);
+ //STANDARD_HTML_EVENTS.add(ONDBLCLICK);
STANDARD_HTML_EVENTS.add(ONMOUSEOVER);
STANDARD_HTML_EVENTS.add(ONMOUSEMOVE);
STANDARD_HTML_EVENTS.add(ONMOUSEOUT);
@@ -61,7 +61,7 @@
STANDARD_HTML_EVENTS.add(ONKEYDOWN);
STANDARD_HTML_EVENTS.add(ONKEYUP);
STANDARD_HTML_EVENTS.add(ONKEYPRESS);
- STANDARD_HTML_EVENTS.add(ONBLUR);
+ //STANDARD_HTML_EVENTS.add(ONBLUR);
STANDARD_HTML_EVENTS.add(ONFOCUS);
STANDARD_HTML_EVENTS.add(ONCHANGE);
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-22 13:49:03 UTC (rev 11971)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-12-22 13:53:56 UTC (rev 11972)
@@ -1264,6 +1264,8 @@
selenium.keyUp(id, "a");
}else if (ev == SeleniumEvent.ONKEYPRESS) {
selenium.keyPress(id, "a");
+ }else if (ev == SeleniumEvent.ONFOCUS) {
+ selenium.focus(id);
}
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-12-22 13:49:03 UTC (rev 11971)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-12-22 13:53:56 UTC (rev 11972)
@@ -20,7 +20,9 @@
*/
package org.richfaces.testng;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.ajax4jsf.template.Template;
@@ -44,13 +46,45 @@
}
+ private void testEvents (AutoTester tester, Template template) {
+ String id = tester.getClientId(AutoTester.COMPONENT_ID, template);
+ List<String> events = new ArrayList<String>();
+
+ events.add("onfocus");
+ events.add("onclick");
+ clickById(id);
+ assertEvents(events);
+
+ selenium.mouseOver(id);
+ selenium.mouseDown(id);
+ selenium.mouseMove(id);
+ selenium.mouseUp(id);
+ selenium.mouseOut(id);
+ assertEvent("onmouseover");
+ assertEvent("onmousedown");
+ assertEvent("onmousemove");
+ assertEvent("onmouseup");
+ assertEvent("onmouseout");
+
+ selenium.keyDown(id, "a");
+ selenium.keyPress(id, "a");
+ selenium.keyUp(id, "a");
+ assertEvent("onkeydown");
+ assertEvent("onkeypress");
+ assertEvent("onkeyup");
+
+
+ }
+
@Test
public void testHTMLAttributes(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
tester.testStyleAndClasses(new String [] {"noname"}, styleAttributes);
- tester.testHTMLEvents();
+ //tester.testHTMLEvents();
+ testEvents(tester, template);
+
}
16 years, 9 months
JBoss Rich Faces SVN: r11971 - in trunk/test-applications/facelets/src/main: resources and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-22 08:49:03 -0500 (Mon, 22 Dec 2008)
New Revision: 11971
Added:
trunk/test-applications/facelets/src/main/resources/tTree/
trunk/test-applications/facelets/src/main/resources/tTree/pom_sample.xml
trunk/test-applications/facelets/src/main/resources/tTree/test.xml
Removed:
trunk/test-applications/facelets/src/main/java/tTree/pom_sample.xml
trunk/test-applications/facelets/src/main/java/tTree/test.xml
Log:
Move pom-sample.xml to resources
Deleted: trunk/test-applications/facelets/src/main/java/tTree/pom_sample.xml
===================================================================
--- trunk/test-applications/facelets/src/main/java/tTree/pom_sample.xml 2008-12-22 13:46:40 UTC (rev 11970)
+++ trunk/test-applications/facelets/src/main/java/tTree/pom_sample.xml 2008-12-22 13:49:03 UTC (rev 11971)
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>tree</artifactId>
- <version>1.0-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.ajax4jsf.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces</prefix>
- <taglib>
- <shortName>tree</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <repositories>
- <repository>
- <releases />
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>https://maven2-repository.dev.java.net/nonav/repository</url>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.ajax4jsf.org</id>
- <name>Ajax4jsf Repository for Maven Snapshots</name>
- <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.ajax4jsf.org</id>
- <name>Ajax4jsf Repository for Maven Snapshots</name>
- <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
- </pluginRepository>
- </pluginRepositories>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.6</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>framework</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Deleted: trunk/test-applications/facelets/src/main/java/tTree/test.xml
===================================================================
--- trunk/test-applications/facelets/src/main/java/tTree/test.xml 2008-12-22 13:46:40 UTC (rev 11970)
+++ trunk/test-applications/facelets/src/main/java/tTree/test.xml 2008-12-22 13:49:03 UTC (rev 11971)
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <description>RF Test-Application</description>
- <display-name>test-application</display-name>
- <context-param>
- <param-name>org.ajax4jsf.SKIN</param-name>
- <param-value>#{skinBean.skin}</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.REFRESH_PERIOD</param-name>
- <param-value>2</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.verifyObjects</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
- /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
- /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
- /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
- /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
- /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
- /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
- /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
- /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
- /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
- /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
- /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
- /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
- </context-param>
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
-</web-app>
Added: trunk/test-applications/facelets/src/main/resources/tTree/pom_sample.xml
===================================================================
--- trunk/test-applications/facelets/src/main/resources/tTree/pom_sample.xml (rev 0)
+++ trunk/test-applications/facelets/src/main/resources/tTree/pom_sample.xml 2008-12-22 13:49:03 UTC (rev 11971)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tree</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tree</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>https://maven2-repository.dev.java.net/nonav/repository</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>framework</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/resources/tTree/test.xml
===================================================================
--- trunk/test-applications/facelets/src/main/resources/tTree/test.xml (rev 0)
+++ trunk/test-applications/facelets/src/main/resources/tTree/test.xml 2008-12-22 13:49:03 UTC (rev 11971)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>RF Test-Application</description>
+ <display-name>test-application</display-name>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
+ /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
+ /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
+ /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
+ /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
+ /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
+ /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
+ /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
+ /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
+ /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
+ /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
+ /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
+ /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
16 years, 9 months
JBoss Rich Faces SVN: r11970 - in trunk/test-applications/jsp/src/main: resources and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-22 08:46:40 -0500 (Mon, 22 Dec 2008)
New Revision: 11970
Added:
trunk/test-applications/jsp/src/main/resources/tTree/
trunk/test-applications/jsp/src/main/resources/tTree/pom_sample.xml
trunk/test-applications/jsp/src/main/resources/tTree/test.xml
Removed:
trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml
trunk/test-applications/jsp/src/main/java/tTree/test.xml
Log:
Move pom-sample.xml to resources
Deleted: trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml 2008-12-22 13:26:44 UTC (rev 11969)
+++ trunk/test-applications/jsp/src/main/java/tTree/pom_sample.xml 2008-12-22 13:46:40 UTC (rev 11970)
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>tree</artifactId>
- <version>1.0-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.ajax4jsf.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces</prefix>
- <taglib>
- <shortName>tree</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <repositories>
- <repository>
- <releases />
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>https://maven2-repository.dev.java.net/nonav/repository</url>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.ajax4jsf.org</id>
- <name>Ajax4jsf Repository for Maven Snapshots</name>
- <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.ajax4jsf.org</id>
- <name>Ajax4jsf Repository for Maven Snapshots</name>
- <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
- </pluginRepository>
- </pluginRepositories>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.6</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>framework</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Deleted: trunk/test-applications/jsp/src/main/java/tTree/test.xml
===================================================================
--- trunk/test-applications/jsp/src/main/java/tTree/test.xml 2008-12-22 13:26:44 UTC (rev 11969)
+++ trunk/test-applications/jsp/src/main/java/tTree/test.xml 2008-12-22 13:46:40 UTC (rev 11970)
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <description>RF Test-Application</description>
- <display-name>test-application</display-name>
- <context-param>
- <param-name>org.ajax4jsf.SKIN</param-name>
- <param-value>#{skinBean.skin}</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.REFRESH_PERIOD</param-name>
- <param-value>2</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.verifyObjects</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
- /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
- /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
- /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
- /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
- /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
- /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
- /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
- /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
- /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
- /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
- /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
- /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
- </context-param>
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
-</web-app>
Added: trunk/test-applications/jsp/src/main/resources/tTree/pom_sample.xml
===================================================================
--- trunk/test-applications/jsp/src/main/resources/tTree/pom_sample.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/resources/tTree/pom_sample.xml 2008-12-22 13:46:40 UTC (rev 11970)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>tree</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.ajax4jsf.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>tree</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>https://maven2-repository.dev.java.net/nonav/repository</url>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.ajax4jsf.org</id>
+ <name>Ajax4jsf Repository for Maven Snapshots</name>
+ <url>https://ajax4jsf.dev.java.net/nonav/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>framework</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/resources/tTree/test.xml
===================================================================
--- trunk/test-applications/jsp/src/main/resources/tTree/test.xml (rev 0)
+++ trunk/test-applications/jsp/src/main/resources/tTree/test.xml 2008-12-22 13:46:40 UTC (rev 11970)
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>RF Test-Application</description>
+ <display-name>test-application</display-name>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config-RichPanelsBean.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,
+ /WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,
+ /WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,
+ /WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,
+ /WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,
+ /WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,
+ /WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,
+ /WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,
+ /WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,
+ /WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,
+ /WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,
+ /WEB-INF/faces-config-RichTest.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,
+ /WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
16 years, 9 months
JBoss Rich Faces SVN: r11969 - in trunk: test-applications/seamApp/ear and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-22 08:26:44 -0500 (Mon, 22 Dec 2008)
New Revision: 11969
Modified:
trunk/docs/common-resources/en/
trunk/test-applications/seamApp/ear/
trunk/test-applications/seamApp/ejb/
trunk/test-applications/seamApp/web/
Log:
target folders svn:ignored
Property changes on: trunk/docs/common-resources/en
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/test-applications/seamApp/ear
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/test-applications/seamApp/ejb
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/test-applications/seamApp/web
___________________________________________________________________
Name: svn:ignore
+ target
16 years, 9 months
JBoss Rich Faces SVN: r11968 - trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:14:50 -0500 (Mon, 22 Dec 2008)
New Revision: 11968
Modified:
trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Log:
https://jira.jboss.org/jira/browse/RF-5374
Modified: trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-12-22 13:13:30 UTC (rev 11967)
+++ trunk/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-12-22 13:14:50 UTC (rev 11968)
@@ -22,23 +22,14 @@
this.synchronizeConfiguration();
this.setDialogType();
+ this.redefineCallbacks();
this.tinyMCE_editor = null;
- this.onInitInstanceCallbackFunction = this.tinyparams.init_instance_callback;
- this.onChangeCallbackFunction = this.tinyparams.onchange_callback;
- this.onInitCallbackFunction = this.tinyparams.oninit;
- this.onSaveCallbackFunction = this.tinyparams.save_callback;
- this.onSetupCallbackFunction = this.tinyparams.setup;
this.tinyparams.mode = 'exact';
this.tinyparams.elements = this.editorTextAreaId;
this.tinyparams.editor_selector = null;
this.tinyparams.editor_deselector = null;
- this.tinyparams.init_instance_callback = this.onInitInstanceCallback.bind(this);
- this.tinyparams.onchange_callback = this.onChangeCallback.bind(this);
- this.tinyparams.oninit = this.onInitCallback.bind(this);
- this.tinyparams.save_callback = this.onSaveCallback.bind(this);
- this.tinyparams.setup = this.onSetupCallback.bind(this);
tinyMCE.init(this.tinyparams);
@@ -60,6 +51,31 @@
this.tinyMCE_editor = null;
},
+ redefineCallbacks: function() {
+ this.onInitInstanceCallbackFunction = this.tinyparams.init_instance_callback;
+ this.tinyparams.init_instance_callback = this.onInitInstanceCallback.bind(this);
+
+ if(this.tinyparams.onchange_callback && typeof this.tinyparams.onchange_callback != 'string'){
+ this.onChangeCallbackFunction = this.tinyparams.onchange_callback;
+ this.tinyparams.onchange_callback = this.onChangeCallback.bind(this);
+ }
+
+ if(this.tinyparams.onchange_callback && typeof this.tinyparams.oninit != 'string'){
+ this.onInitCallbackFunction = this.tinyparams.oninit;
+ this.tinyparams.oninit = this.onInitCallback.bind(this);
+ }
+
+ if(this.tinyparams.onchange_callback && typeof this.tinyparams.save_callback != 'string'){
+ this.onSaveCallbackFunction = this.tinyparams.save_callback;
+ this.tinyparams.save_callback = this.onSaveCallback.bind(this);
+ }
+
+ if(this.tinyparams.onchange_callback && typeof this.tinyparams.setup != 'string'){
+ this.onSetupCallbackFunction = this.tinyparams.setup;
+ this.tinyparams.setup = this.onSetupCallback.bind(this);
+ }
+ },
+
onBeforeAjax: function() {
this.tinyMCE_editor.save();
},
16 years, 9 months
JBoss Rich Faces SVN: r11967 - in trunk/ui/progressBAR/src/test/java/org/richfaces: renderkit and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:13:30 -0500 (Mon, 22 Dec 2008)
New Revision: 11967
Added:
trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/
trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/
trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/
trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/ProgressBarImagesTest.java
Modified:
trunk/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java
Log:
Add JUnits for progressBar
Added: trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/ProgressBarImagesTest.java
===================================================================
--- trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/ProgressBarImagesTest.java (rev 0)
+++ trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/ProgressBarImagesTest.java 2008-12-22 13:13:30 UTC (rev 11967)
@@ -0,0 +1,102 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * Unit test for Progress bar component.
+ */
+public class ProgressBarImagesTest extends AbstractAjax4JsfTestCase {
+
+
+ public ProgressBarImagesTest(String name) {
+ super(name);
+ }
+
+
+ public void testColorUtils() throws Exception {
+ float[] hsl = ColorUtils.RGBtoHSL(100, 160, 120);
+ assertEquals(ColorUtils.HSLtoRGB(hsl[0], hsl[1], hsl[2]), new Color(101, 159, 120));
+ hsl = ColorUtils.RGBtoHSL(0, 0, 0);
+ assertEquals(ColorUtils.HSLtoRGB(hsl[0], hsl[1], hsl[2]), new Color(0, 0, 0));
+ hsl = ColorUtils.RGBtoHSL(201, 203, 1);
+ assertEquals(ColorUtils.HSLtoRGB(hsl[0], hsl[1], hsl[2]), new Color(168, 169, 35));
+ assertNotNull(ColorUtils.adjustBrightness(Color.BLACK, 1));
+ assertNotNull(ColorUtils.adjustLightness(Color.BLACK, 1));
+ assertNotNull(ColorUtils.overwriteAlpha(Color.BLACK, 1));
+ }
+
+ public void testProgressBarBg() throws Exception {
+ ProgressBarBg bg = new ProgressBarBg();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String backgroundColor = getSkinParameter(skin, defaultSkin, facesContext, "selectControlColor");
+ assertNotNull(backgroundColor);
+
+ byte [] data = (byte []) bg.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+ byte[] results = (byte[])bg.deserializeData(data);
+ assertNotNull(results);
+
+ assertEquals(data, results);
+ }
+
+ public void testProgressBarAnimatedBg() throws Exception {
+ ProgressBarAnimatedBg bg = new ProgressBarAnimatedBg();
+
+ Skin skin = SkinFactory.getInstance().getSkin(facesContext);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
+
+ String backgroundColor = getSkinParameter(skin, defaultSkin, facesContext, "selectControlColor");
+ assertNotNull(backgroundColor);
+
+ byte [] data = (byte []) bg.getDataToStore(facesContext, null);
+
+ assertNotNull(data);
+ byte[] results = (byte[])bg.deserializeData(data);
+ assertNotNull(results);
+
+ assertEquals(data, results);
+ assertEquals(0, bg.getRepeat());
+ assertEquals(12, bg.getNumberOfFrames());
+ }
+
+ private String getSkinParameter(Skin skin, Skin defaultSkin, FacesContext context, String parameterName) {
+ String value = (String) skin.getParameter(context, parameterName);
+ if (null == value || "".equals(value)) {
+ value = (String) defaultSkin.getParameter(context, parameterName);
+ }
+ return value;
+
+ }
+
+}
Property changes on: trunk/ui/progressBAR/src/test/java/org/richfaces/renderkit/html/images/ProgressBarImagesTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java
===================================================================
--- trunk/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java 2008-12-22 13:13:01 UTC (rev 11966)
+++ trunk/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java 2008-12-22 13:13:30 UTC (rev 11967)
@@ -24,12 +24,14 @@
import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlForm;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.richfaces.component.UIProgressBar;
import com.gargoylesoftware.htmlunit.html.DomText;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.sun.org.apache.bcel.internal.generic.NEW;
/**
* Unit test for Progress bar component.
@@ -128,7 +130,15 @@
assertTrue(text.getData().contains("$('" + clientId + "').component"));
assertTrue(text.getData().contains("renderLabel"));
-
+ assertEquals(1L, progressBar.getNumber(1));
+ assertEquals(new Double(1), progressBar.getNumber("1"));
+ assertEquals(0, progressBar.getNumber(null));
+
+ facesContext.getExternalContext().getRequestParameterMap().put("percent", "100");
+ facesContext.getExternalContext().getRequestParameterMap().put(progressBar.getClientId(facesContext), progressBar.getClientId(facesContext));
+
+ progressBar.broadcast(new AjaxEvent(progressBar));
+
}
}
16 years, 9 months
JBoss Rich Faces SVN: r11966 - trunk/ui/panelmenu/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:13:01 -0500 (Mon, 22 Dec 2008)
New Revision: 11966
Modified:
trunk/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java
Log:
Add JUnits for panelMenu
Modified: trunk/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java
===================================================================
--- trunk/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java 2008-12-22 13:12:04 UTC (rev 11965)
+++ trunk/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java 2008-12-22 13:13:01 UTC (rev 11966)
@@ -22,28 +22,22 @@
package org.richfaces.component;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import javax.faces.application.FacesMessage;
import javax.faces.component.UIForm;
import javax.faces.component.html.HtmlForm;
-import javax.servlet.http.HttpServletResponse;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
-import org.ajax4jsf.resource.InternetResource;
-import org.ajax4jsf.resource.InternetResourceBuilder;
-import org.ajax4jsf.resource.ResourceBuilderImpl;
import org.ajax4jsf.resource.image.ImageInfo;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.apache.commons.lang.StringUtils;
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.component.UIPanelMenuItem;
-import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
+import com.sun.faces.application.ActionListenerImpl;
/**
* Unit test for simple Component.
@@ -297,4 +291,40 @@
assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
}
}
+
+ public void testAddRemoveListener() throws Exception {
+ ActionListener listener = new ActionListenerImpl();
+ group2.addActionListener(listener);
+ HtmlPage view = renderView();
+ assertNotNull(view);
+
+ assertNotNull(group2.getActionListeners());
+ assertTrue(group2.getActionListeners().length > 0);
+ assertEquals(listener, group2.getActionListeners()[0]);
+ group2.removeActionListener(listener);
+ assertTrue(group2.getActionListeners().length == 0);
+ }
+
+ public void testBroadcast() throws Exception {
+ group3.addActionListener(testListener);
+ HtmlPage view = renderView();
+ assertNotNull(view);
+ group3.broadcast(new ActionEvent(group3));
+ assertTrue(facesContext.getMessages(group3.getClientId(facesContext)).hasNext());
+ }
+
+ public void testQueueEvent() throws Exception {
+ HtmlPage view = renderView();
+ assertNotNull(view);
+ group3.queueEvent(new ActionEvent(group3));
+ }
+
+ ActionListener testListener = new ActionListener(){
+
+ public void processAction(ActionEvent event)
+ throws AbortProcessingException {
+ facesContext.addMessage(group3.getClientId(facesContext), new FacesMessage("Method invoked!"));
+ }
+
+ };
}
16 years, 9 months
JBoss Rich Faces SVN: r11965 - trunk/ui/modal-panel/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:12:04 -0500 (Mon, 22 Dec 2008)
New Revision: 11965
Modified:
trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
Log:
Add JUnits for modalPanel
Modified: trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
===================================================================
--- trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-12-22 13:11:31 UTC (rev 11964)
+++ trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-12-22 13:12:04 UTC (rev 11965)
@@ -56,7 +56,7 @@
javaScripts.add("scripts/browser_info.js");
}
- private UIComponent modalPanel;
+ private UIModalPanel modalPanel;
private UIComponent form;
/**
@@ -78,13 +78,14 @@
form = new HtmlForm();
facesContext.getViewRoot().getChildren().add(form);
- modalPanel = application.createComponent(UIModalPanel.COMPONENT_TYPE);
+ modalPanel = (UIModalPanel) application.createComponent(UIModalPanel.COMPONENT_TYPE);
modalPanel.setId("modalPanel");
HtmlOutputText outputText = new HtmlOutputText();
outputText.setValue("test");
modalPanel.getFacets().put("header", outputText);
-
+ modalPanel.setKeepVisualState(true);
+ modalPanel.setVisualOptions("border: 1px");
form.getChildren().add(modalPanel);
}
@@ -156,9 +157,18 @@
* @throws Exception
*/
public void testRenderScript() throws Exception {
+ modalPanel.setShowWhenRendered(true);
HtmlPage page = renderView();
assertNotNull(page);
assertEquals(getCountValidScripts(page, javaScripts, IS_PAGE_AVAILABILITY_CHECK).intValue(), javaScripts.size());
}
+ public void testDecode() throws Exception {
+ HtmlPage renderedView = renderView();
+
+ assertNotNull(renderedView);
+ modalPanel.decode(facesContext);
+
+ }
+
}
16 years, 9 months
JBoss Rich Faces SVN: r11964 - in trunk/ui/extendedDataTable/src: test/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:11:31 -0500 (Mon, 22 Dec 2008)
New Revision: 11964
Modified:
trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
Log:
Add JUnits for extendedDataTable
Modified: trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
===================================================================
--- trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2008-12-22 13:10:57 UTC (rev 11963)
+++ trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2008-12-22 13:11:31 UTC (rev 11964)
@@ -8,6 +8,10 @@
<superclass>org.richfaces.component.UIExtendedDataTable</superclass>
<description> The <rich:extendedDataTable> component is used for
tables extending standard component <rich:dataTable> . </description>
+ <test>
+ <classname>org.richfaces.component.html.HtmlExtendedDataTableComponentTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
<renderer generate="true" override="true">
<name>org.richfaces.ExtendedDataTableRenderer</name>
<template>org/richfaces/htmlExtendedDataTable.jspx</template>
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-12-22 13:10:57 UTC (rev 11963)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-12-22 13:11:31 UTC (rev 11964)
@@ -71,6 +71,11 @@
column.setId("columnId" + i);
column.setRendered(true);
column.setSortable(true);
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class
+ .getName(), null, null, null);
+ column.getFacets().put("header", text);
+ column.getFacets().put("footer", text);
if (i == 0) {
column.setSortOrder(Ordering.ASCENDING);
}
@@ -434,11 +439,11 @@
// }
public void testDoDecodeFacesContextUIComponent() {
- // facesContext.getExternalContext().getRequestParameterMap().put(
- // table.getClientId(facesContext), "fsp");
- // facesContext.getExternalContext().getRequestParameterMap().put(
- // "fsp", "extDT:columnId0");
- // renderer.doDecode(facesContext, table);
+ facesContext.getExternalContext().getRequestParameterMap().put(
+ table.getClientId(facesContext), "fsp");
+ facesContext.getExternalContext().getRequestParameterMap().put(
+ "fsp", "extDT:columnId0");
+ renderer.doDecode(facesContext, table);
}
// public void testEncodeEndFacesContextUIComponent() {
16 years, 9 months
JBoss Rich Faces SVN: r11963 - trunk/ui/effect/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:10:57 -0500 (Mon, 22 Dec 2008)
New Revision: 11963
Modified:
trunk/ui/effect/src/test/java/org/richfaces/component/EffectComponentTest.java
Log:
Add JUnits for effect
Modified: trunk/ui/effect/src/test/java/org/richfaces/component/EffectComponentTest.java
===================================================================
--- trunk/ui/effect/src/test/java/org/richfaces/component/EffectComponentTest.java 2008-12-22 13:10:24 UTC (rev 11962)
+++ trunk/ui/effect/src/test/java/org/richfaces/component/EffectComponentTest.java 2008-12-22 13:10:57 UTC (rev 11963)
@@ -28,6 +28,7 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
+import javax.faces.component.UIPanel;
import javax.faces.component.html.HtmlForm;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
@@ -42,7 +43,8 @@
*/
public class EffectComponentTest extends AbstractAjax4JsfTestCase {
private UIForm form = null;
- private UIComponent effect = null;
+ private UIEffect effect = null;
+ private UIComponent panel = null;
private static Set javaScripts = new HashSet();
private static final boolean IS_PAGE_AVAILABILITY_CHECK = true;
@@ -69,12 +71,17 @@
super.setUp();
form = new HtmlForm();
facesContext.getViewRoot().getChildren().add(form);
-
- effect = application.createComponent(UIEffect.COMPONENT_TYPE);
+ panel = application.createComponent(UIPanel.COMPONENT_TYPE);
+ panel.setId("panel");
+ effect = (UIEffect)application.createComponent(UIEffect.COMPONENT_TYPE);
effect.setId("effect");
+ effect.setFor("panel");
+ effect.setEvent("onclick");
+ effect.setType("Appear");
+ effect.setParams("delay:3.0,duration:0.5");
- effect.getAttributes().put("var", "testEffect");
+ panel.getChildren().add(effect);
form.getChildren().add(effect);
}
@@ -85,7 +92,10 @@
}
public void testRenderComponent() throws Exception {
-
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ assertNotNull(effect.getEvent());
+ assertNotNull(effect.getEventString());
}
public void testRenderStyle() throws Exception {
16 years, 9 months
JBoss Rich Faces SVN: r11962 - trunk/ui/editor/src/test/java/org/richfaces/renderkit/html/images.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:10:24 -0500 (Mon, 22 Dec 2008)
New Revision: 11962
Modified:
trunk/ui/editor/src/test/java/org/richfaces/renderkit/html/images/EditorIconTest.java
Log:
Add JUnits for editor
Modified: trunk/ui/editor/src/test/java/org/richfaces/renderkit/html/images/EditorIconTest.java
===================================================================
--- trunk/ui/editor/src/test/java/org/richfaces/renderkit/html/images/EditorIconTest.java 2008-12-22 13:09:07 UTC (rev 11961)
+++ trunk/ui/editor/src/test/java/org/richfaces/renderkit/html/images/EditorIconTest.java 2008-12-22 13:10:24 UTC (rev 11962)
@@ -21,6 +21,7 @@
package org.richfaces.renderkit.html.images;
import java.awt.Color;
+import java.awt.image.BufferedImage;
import javax.faces.context.FacesContext;
@@ -92,6 +93,16 @@
assertEquals(color2, results[1]);
assertEquals(color3, results[2]);
assertEquals(color4, results[3]);
+
+ BufferedImage image = advIcon.paintFirstTriangleBlock(results, true);
+ assertNotNull(image);
+ image = advIcon.paintMainBlock(results, true, true);
+ assertNotNull(image);
+ image = advIcon.paintSecondTriangleBlock(results, true);
+ assertNotNull(image);
+ image = advIcon.paintSeparatorBlock(results);
+ assertNotNull(image);
+
}
/**
16 years, 9 months
JBoss Rich Faces SVN: r11961 - in trunk/ui/dataFilterSlider/src: test/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:09:07 -0500 (Mon, 22 Dec 2008)
New Revision: 11961
Modified:
trunk/ui/dataFilterSlider/src/main/config/component/dataFilterSlider.xml
trunk/ui/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java
Log:
Add JUnits for dataFilterSlider
Modified: trunk/ui/dataFilterSlider/src/main/config/component/dataFilterSlider.xml
===================================================================
--- trunk/ui/dataFilterSlider/src/main/config/component/dataFilterSlider.xml 2008-12-22 13:08:17 UTC (rev 11960)
+++ trunk/ui/dataFilterSlider/src/main/config/component/dataFilterSlider.xml 2008-12-22 13:09:07 UTC (rev 11961)
@@ -10,7 +10,10 @@
<family>org.richfaces.DataFilterSlider</family>
<classname>org.richfaces.component.html.HtmlDataFilterSlider</classname>
<superclass>org.richfaces.component.UIDataFltrSlider</superclass>
- <!--test/-->
+ <test>
+ <classname>org.richfaces.component.html.HtmlDataFilterSliderComponentTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
<description>
<![CDATA[A slider-based action component used for filtering table data.
]]>
Modified: trunk/ui/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java
===================================================================
--- trunk/ui/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java 2008-12-22 13:08:17 UTC (rev 11960)
+++ trunk/ui/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java 2008-12-22 13:09:07 UTC (rev 11961)
@@ -22,6 +22,7 @@
package org.richfaces.component;
import java.awt.Dimension;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -30,8 +31,10 @@
import javax.faces.application.FacesMessage;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
import javax.faces.component.UIForm;
import javax.faces.component.html.HtmlCommandLink;
+import javax.faces.component.html.HtmlDataTable;
import javax.faces.component.html.HtmlForm;
import javax.faces.context.FacesContext;
import javax.faces.el.EvaluationException;
@@ -66,7 +69,9 @@
public class DataFilterSliderComponentTest extends AbstractAjax4JsfTestCase {
private UIForm form = null;
- private UIComponent dfSlider = null;
+ private UIDataFltrSlider dfSlider = null;
+ private UIDataFltrSlider dfSlider2 = null;
+ private UIData data = null;
private UICommand command = null;
private static Set<String> javaScripts = new HashSet<String>();
private static final boolean IS_PAGE_AVAILABILITY_CHECK = true;
@@ -94,17 +99,35 @@
form = new HtmlForm();
facesContext.getViewRoot().getChildren().add(form);
+
+ ArrayList dat = new ArrayList();
+ for (int i=0;i<20;i++){
+ dat.add(new Integer(i));
+ }
+ data = (UIData) application.createComponent(HtmlDataTable.COMPONENT_TYPE);
+ data.setValue(dat);
+ data.setId("data");
+ data.setRows(5);
+ form.getChildren().add(data);
command = new HtmlCommandLink();
command.setId("command");
form.getChildren().add(command);
- dfSlider = application.createComponent(UIDataFltrSlider.COMPONENT_TYPE);
+ dfSlider = (UIDataFltrSlider) application.createComponent(UIDataFltrSlider.COMPONENT_TYPE);
dfSlider.setId("slider");
- ((UIDataFltrSlider)dfSlider).setStartRange(Integer.valueOf(0));
- ((UIDataFltrSlider)dfSlider).setEndRange(Integer.valueOf(100));
- ((UIDataFltrSlider)dfSlider).setIncrement(Integer.valueOf(1));
+ dfSlider.setStartRange(Integer.valueOf(0));
+ dfSlider.setEndRange(Integer.valueOf(100));
+ dfSlider.setIncrement(Integer.valueOf(1));
form.getChildren().add(dfSlider);
+
+ dfSlider2 = (UIDataFltrSlider) application.createComponent(UIDataFltrSlider.COMPONENT_TYPE);
+ dfSlider2.setId("slider2");
+ dfSlider2.setFor("data");
+ dfSlider2.setStartRange(Integer.valueOf(0));
+ dfSlider2.setEndRange(Integer.valueOf(100));
+ dfSlider2.setIncrement(Integer.valueOf(1));
+ form.getChildren().add(dfSlider2);
}
public void tearDown() throws Exception {
@@ -272,6 +295,12 @@
assertTrue(facesContext.getMessages().hasNext());
}
+
+ public void testGetDataTable() throws Exception{
+ HtmlPage renderedView = renderView();
+ UIData data = dfSlider2.getUIData();
+ assertNotNull(data);
+ }
private final class SliderBean {
16 years, 9 months
JBoss Rich Faces SVN: r11960 - in trunk/ui/calendar/src/test: java/org/richfaces/component and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:08:17 -0500 (Mon, 22 Dec 2008)
New Revision: 11960
Added:
trunk/ui/calendar/src/test/resources/
trunk/ui/calendar/src/test/resources/org/
trunk/ui/calendar/src/test/resources/org/richfaces/
trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/
trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/calendar_ru_RU.properties
Modified:
trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java
Log:
Add JUnits for calendar
Modified: trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2008-12-22 13:06:14 UTC (rev 11959)
+++ trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2008-12-22 13:08:17 UTC (rev 11960)
@@ -35,6 +35,8 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
+import org.richfaces.renderkit.CalendarRendererBase;
+import org.richfaces.renderkit.html.CalendarRenderer;
import com.gargoylesoftware.htmlunit.ElementNotFoundException;
import com.gargoylesoftware.htmlunit.html.HtmlButton;
@@ -43,6 +45,7 @@
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlScript;
import com.gargoylesoftware.htmlunit.html.HtmlSpan;
+import com.sun.org.apache.bcel.internal.generic.NEW;
/**
* @author Nick Belaevski - mailto:nbelaevski@exadel.com created 08.06.2007
@@ -58,6 +61,8 @@
private UICalendar calendar2;
+ private UICalendar calendar3;
+
private static Set<String> javaScripts = new HashSet<String>();
static {
@@ -114,6 +119,18 @@
calendar2.setValue(calendarObject.getTime());
calendar2.setId("timecalendar");
form.getChildren().add(calendar2);
+
+ calendar3 = (UICalendar) application
+ .createComponent(UICalendar.COMPONENT_TYPE);
+ calendar3.setDatePattern("dd/M/yy HH:mm");
+ calendarObject.set(2001, Calendar.SEPTEMBER, 11, 13, 36);
+ calendar3.setValue(calendarObject.getTime());
+ calendar3.setId("timecalendar");
+ calendar3.setMode(UICalendar.AJAX_MODE);
+ calendar3.setLocale(new Locale("ru", "RU", ""));
+ calendar3.setCellHeight("50");
+ calendar3.setCellWidth("50");
+ form.getChildren().add(calendar3);
}
/*
@@ -313,6 +330,22 @@
}
+ public void testCalendarGetConvertedValue() throws Exception{
+ UICalendar calendar = (UICalendar) application
+ .createComponent(UICalendar.COMPONENT_TYPE);
+ Calendar calendarObject = Calendar.getInstance();
+ calendarObject.clear();
+ calendarObject.set(2007, Calendar.JUNE, 10);
+ calendar.setCurrentDate(calendarObject.getTime());
+ calendar2.setDatePattern("dd/M/yy");
+ calendar.getConvertedValue(facesContext, "01/01/01");
+ calendar.getAsDate(new Date());
+ calendar.getAsLocale("ru_RU");
+ CalendarRendererBase renderer = new CalendarRenderer();
+
+ renderer.getConvertedValue(facesContext, calendar, new Date());
+ }
+
public void tearDown() throws Exception {
super.tearDown();
form = null;
Modified: trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java 2008-12-22 13:06:14 UTC (rev 11959)
+++ trunk/ui/calendar/src/test/java/org/richfaces/renderkit/html/iconimages/CalendarIconTest.java 2008-12-22 13:08:17 UTC (rev 11960)
@@ -21,7 +21,9 @@
package org.richfaces.renderkit.html.iconimages;
import java.awt.Color;
+import java.awt.image.BufferedImage;
+import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.ajax4jsf.util.HtmlColor;
import org.richfaces.skin.Skin;
@@ -74,5 +76,8 @@
assertEquals(color1, results[0]);
assertEquals(color2, results[1]);
+ BufferedImage img = icon.paintImage(results);
+ assertNotNull(img);
}
+
}
Added: trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/calendar_ru_RU.properties
===================================================================
--- trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/calendar_ru_RU.properties (rev 0)
+++ trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/calendar_ru_RU.properties 2008-12-22 13:08:17 UTC (rev 11960)
@@ -0,0 +1,6 @@
+RICH_CALENDAR_APPLY_LABEL=\u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C
+RICH_CALENDAR_TODAY_LABEL=\u0441\u0435\u0433\u043E\u0434\u043D\u044F
+RICH_CALENDAR_CLOSE_LABEL=\u0437\u0430\u043A\u0440\u044B\u0442\u044C
+RICH_CALENDAR_OK_LABEL=\u043E\u043A\u0435\u0439
+RICH_CALENDAR_CLEAN_LABEL=\u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C
+RICH_CALENDAR_CANCEL_LABEL=\u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C
Property changes on: trunk/ui/calendar/src/test/resources/org/richfaces/renderkit/calendar_ru_RU.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 9 months
JBoss Rich Faces SVN: r11959 - in trunk/ui/beanValidator/src: test/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-22 08:06:14 -0500 (Mon, 22 Dec 2008)
New Revision: 11959
Added:
trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
trunk/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java
Removed:
trunk/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
Modified:
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
Log:
Add JUnits for BeanValidator and GraphValidator
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-21 16:23:05 UTC (rev 11958)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-12-22 13:06:14 UTC (rev 11959)
@@ -103,6 +103,14 @@
org.richfaces.component.html.HtmlGraphValidator
</classname>
<superclass>org.richfaces.component.UIGraphValidator</superclass>
+ <test>
+ <classname>
+ org.richfaces.component.html.GraphValidatorTest
+ </classname>
+ <superclassname>
+ org.ajax4jsf.tests.AbstractAjax4JsfTestCase
+ </superclassname>
+ </test>
<description><![CDATA[The <rich:graphValidator> component allows to register Hibernate Validators for multiple input components.]]></description>
<tag>
<name>graphValidator</name>
@@ -156,6 +164,14 @@
<classname>
org.richfaces.validator.FacesBeanValidator
</classname>
+ <test>
+ <classname>
+ org.richfaces.component.html.BeanValidatorTest
+ </classname>
+ <superclassname>
+ org.ajax4jsf.tests.AbstractAjax4JsfTestCase
+ </superclassname>
+ </test>
<description>
<![CDATA[Validate Input by the Bean/Hibernate validator annotations]]>
</description>
Added: trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
===================================================================
--- trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java (rev 0)
+++ trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java 2008-12-22 13:06:14 UTC (rev 11959)
@@ -0,0 +1,186 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.component;
+
+import java.util.Set;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.el.PropertyNotFoundException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIMessages;
+import javax.faces.component.html.HtmlForm;
+import javax.faces.el.MethodNotFoundException;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.webapp.taglib.MethodExpressionAjaxListener;
+import org.richfaces.component.html.HtmlInputText;
+import org.richfaces.event.ValidationEvent;
+
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class BeanValidatorComponentTest extends AbstractAjax4JsfTestCase {
+
+ UIForm form = null;
+ UIBeanValidator validator = null;
+ HtmlInputText input = null;
+ UIMessages messages = null;
+
+ public BeanValidatorComponentTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+ input = (HtmlInputText)application.createComponent(HtmlInputText.COMPONENT_TYPE);
+ validator = (UIBeanValidator)application.createComponent(UIBeanValidator.COMPONENT_TYPE);
+ validator.setId("validator");
+
+ input.getChildren().add(validator);
+ input.setId("input");
+ form.getChildren().add(input);
+ messages = (UIMessages)application.createComponent(UIMessages.COMPONENT_TYPE);
+ messages.setId("messages");
+ form.getChildren().add(messages);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testValidator() throws Exception {
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ assertNotNull(validator.getMessages(facesContext));
+ }
+
+ public void testAddRemoveListenerValidator() throws Exception {
+
+ AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
+ validator.addAjaxListener(listener);
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ assertEquals(1, validator.getAjaxListeners().length);
+ assertEquals(listenerExpression, validator.getAjaxListener());
+ validator.setAjaxListener(listenerExpression2);
+ assertEquals(1, validator.getAjaxListeners().length);
+ }
+
+ public void testBroadcast() throws Exception {
+
+ AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
+ validator.addAjaxListener(listener);
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ validator.broadcast(new AjaxEvent(validator));
+ assertTrue(facesContext.getMessages(validator.getClientId(facesContext)).hasNext());
+
+ }
+
+ public void testQueueEvent() throws Exception {
+
+ AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
+ validator.addAjaxListener(listener);
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ validator.queueEvent(new ValidationEvent(validator));
+ }
+
+ MethodExpression listenerExpression = new MethodExpression(){
+
+ public Object invoke(ELContext context, Object[] params) throws PropertyNotFoundException, MethodNotFoundException,
+ ELException {
+ facesContext.addMessage(validator.getClientId(facesContext), new FacesMessage("Method invoked!"));
+ return "invoked";
+ }
+
+ public MethodInfo getMethodInfo(ELContext context) {
+
+ return null;
+ }
+
+ public boolean equals(Object obj) {
+ return (obj instanceof MethodExpression && obj.hashCode() == this.hashCode());
+ }
+
+
+ public String getExpressionString() {
+ return null;
+ }
+
+ public int hashCode() {
+ return 0;
+ }
+
+ public boolean isLiteralText() {
+ return false;
+ }
+
+ };
+
+ MethodExpression listenerExpression2 = new MethodExpression(){
+
+ public Object invoke(ELContext context, Object[] params) throws PropertyNotFoundException, MethodNotFoundException,
+ ELException {
+ facesContext.addMessage(validator.getClientId(facesContext), new FacesMessage("Method invoked!"));
+ return "invoked";
+ }
+
+ public MethodInfo getMethodInfo(ELContext context) {
+
+ return null;
+ }
+
+ public boolean equals(Object obj) {
+ return (obj instanceof MethodExpression && obj.hashCode() == this.hashCode());
+ }
+
+
+ public String getExpressionString() {
+ return null;
+ }
+
+ public int hashCode() {
+ return 0;
+ }
+
+ public boolean isLiteralText() {
+ return false;
+ }
+
+ };
+
+
+}
Property changes on: trunk/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java
===================================================================
--- trunk/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java (rev 0)
+++ trunk/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java 2008-12-22 13:06:14 UTC (rev 11959)
@@ -0,0 +1,72 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.component;
+
+import javax.faces.component.UIForm;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIMessages;
+import javax.faces.component.html.HtmlForm;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class GraphValidatorComponentTest extends AbstractAjax4JsfTestCase {
+
+ UIForm form = null;
+ UIGraphValidator validator = null;
+ UIInput input = null;
+ UIMessages messages = null;
+
+ public GraphValidatorComponentTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ validator = (UIGraphValidator) application
+ .createComponent(UIGraphValidator.COMPONENT_TYPE);
+ validator.setId("validator");
+ input = (UIInput) application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("input");
+ validator.getChildren().add(input);
+ form.getChildren().add(validator);
+ messages = (UIMessages) application
+ .createComponent(UIMessages.COMPONENT_TYPE);
+ messages.setId("messages");
+ form.getChildren().add(messages);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testValidator() throws Exception {
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ }
+
+}
Property changes on: trunk/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-12-21 16:23:05 UTC (rev 11958)
+++ trunk/ui/beanValidator/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-12-22 13:06:14 UTC (rev 11959)
@@ -1,53 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import javax.faces.component.UIComponent;
-
-/**
- * Unit test for simple Component.
- */
-public class JSFComponentTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public JSFComponentTest( String testName )
- {
- super( testName );
- }
-
-
- /**
- * Rigourous Test :-)
- */
- public void testComponent()
- {
- assertTrue( true );
- }
-}
16 years, 9 months
JBoss Rich Faces SVN: r11958 - in trunk: framework/impl/src/main/java/org/ajax4jsf/webapp and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-21 11:23:05 -0500 (Sun, 21 Dec 2008)
New Revision: 11958
Added:
trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4906
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-12-21 15:42:19 UTC (rev 11957)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-12-21 16:23:05 UTC (rev 11958)
@@ -44,9 +44,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
-import org.ajax4jsf.Filter;
import org.ajax4jsf.exception.FileUploadException;
import org.ajax4jsf.webapp.BaseXMLFilter;
+import org.richfaces.component.FileUploadConstants;
import org.richfaces.model.UploadItem;
/**
@@ -524,7 +524,7 @@
@SuppressWarnings("unchecked")
private Map<String, Object> getProgressData() {
percentMap = (Map<String, Object>) getSession().getAttribute(
- Filter.PERCENT_BEAN_NAME);
+ FileUploadConstants.PERCENT_BEAN_NAME);
return percentMap;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-12-21 15:42:19 UTC (rev 11957)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-12-21 16:23:05 UTC (rev 11958)
@@ -52,6 +52,7 @@
import org.ajax4jsf.resource.InternetResourceService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.richfaces.component.FileUploadConstants;
/**
* Base class for request processing filters, with convert Htmp content to XML
@@ -133,25 +134,7 @@
/** Multipart request start */
public static final String MULTIPART = "multipart/";
- /** Session bean name where multipart requests map will be stored */
- public static final String REQUESTS_SESSIONS_BEAN_NAME = "_richfaces_upload_sessions";
-
- /** Session bean name where progress bar's percent map will be stored */
- public static final String PERCENT_BEAN_NAME = "_richfaces_upload_percents";
-
/**
- * Request parameter that indicates if multipart request forced by rich file
- * upload component
- */
- public static final String UPLOAD_FILES_ID = "_richfaces_upload_uid";
-
- /** Session bean name to store max files count allowed to upload */
- public static final String UPLOADED_COUNTER = "_richfaces_uploaded_file_counter";
-
- /** Request parameter name indicated that file was uploaded by RF component */
- public static final String FILE_UPLOAD_INDICATOR = "_richfaces_upload_file_indicator";
-
- /**
* Request parameter that allow to send HTTP error instead of html message
*/
public static final String SEND_HTTP_ERROR = "_richfaces_send_http_error";
@@ -265,7 +248,7 @@
HttpSession session = request.getSession(false);
if (session != null) {
- Map<String, Integer> map = (Map<String, Integer>) session.getAttribute(UPLOADED_COUNTER);
+ Map<String, Integer> map = (Map<String, Integer>) session.getAttribute(FileUploadConstants.UPLOADED_COUNTER);
if (map != null) {
String id = idParameter;
@@ -335,7 +318,7 @@
HttpServletRequest httpRequest = (HttpServletRequest) request;
Map<String, String> queryParamMap = parseQueryString(httpRequest.getQueryString());
- String uid = queryParamMap.get(UPLOAD_FILES_ID);
+ String uid = queryParamMap.get(FileUploadConstants.UPLOAD_FILES_ID);
if (uid != null) {
@@ -362,15 +345,15 @@
HttpSession session = httpRequest.getSession();
synchronized (session) {
- sessionsMap = (Map<String, MultipartRequest>) session.getAttribute(REQUESTS_SESSIONS_BEAN_NAME);
- percentMap = (Map<String, Object>) session.getAttribute(PERCENT_BEAN_NAME);
+ sessionsMap = (Map<String, MultipartRequest>) session.getAttribute(FileUploadConstants.REQUESTS_SESSIONS_BEAN_NAME);
+ percentMap = (Map<String, Object>) session.getAttribute(FileUploadConstants.PERCENT_BEAN_NAME);
if (sessionsMap == null) {
sessionsMap = Collections.synchronizedMap(new HashMap<String, MultipartRequest>());
- session.setAttribute(REQUESTS_SESSIONS_BEAN_NAME, sessionsMap);
+ session.setAttribute(FileUploadConstants.REQUESTS_SESSIONS_BEAN_NAME, sessionsMap);
}
if (percentMap == null) {
percentMap = new HashMap<String, Object>();
- session.setAttribute(PERCENT_BEAN_NAME, percentMap);
+ session.setAttribute(FileUploadConstants.PERCENT_BEAN_NAME, percentMap);
}
}
Added: trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/richfaces/component/FileUploadConstants.java 2008-12-21 16:23:05 UTC (rev 11958)
@@ -0,0 +1,53 @@
+/**
+ * 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.component;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.0
+ */
+
+public final class FileUploadConstants {
+
+ /**
+ * Request parameter that indicates if multipart request forced by rich file
+ * upload component
+ */
+ public static final String UPLOAD_FILES_ID = "_richfaces_upload_uid";
+
+ /** Session bean name to store max files count allowed to upload */
+ public static final String UPLOADED_COUNTER = "_richfaces_uploaded_file_counter";
+
+ /** Request parameter name indicated that file was uploaded by RF component */
+ public static final String FILE_UPLOAD_INDICATOR = "_richfaces_upload_file_indicator";
+
+ /** Session bean name where multipart requests map will be stored */
+ public static final String REQUESTS_SESSIONS_BEAN_NAME = "_richfaces_upload_sessions";
+
+ /** Session bean name where progress bar's percent map will be stored */
+ public static final String PERCENT_BEAN_NAME = "_richfaces_upload_percents";
+
+ private FileUploadConstants() {
+ //private constructor
+ }
+
+}
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-12-21 15:42:19 UTC (rev 11957)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-12-21 16:23:05 UTC (rev 11958)
@@ -37,7 +37,6 @@
import javax.faces.el.MethodBinding;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.Filter;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.context.AjaxContextImpl;
import org.ajax4jsf.request.MultipartRequest;
@@ -78,7 +77,7 @@
private void setupProgressBarValueExpression(FacesContext context, String uid) {
FileUploadRendererBase renderer = (FileUploadRendererBase)this.getRenderer(context);
UIComponent progressBar = renderer.getProgressBar(context, this);
- String percentExpression = Filter.PERCENT_BEAN_NAME + "['"+uid+"']";
+ String percentExpression = FileUploadConstants.PERCENT_BEAN_NAME + "['"+uid+"']";
ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
ELContext elContext = context.getELContext();
@@ -199,12 +198,12 @@
if (actionString != null && requestParameterMap.containsKey(this.getClientId(facesContext))) {
AjaxContext ajaxContext = AjaxContextImpl.getCurrentInstance(facesContext);
- String uid = requestParameterMap.get(Filter.UPLOAD_FILES_ID);
+ String uid = requestParameterMap.get(FileUploadConstants.UPLOAD_FILES_ID);
Map<String, Object> sessionMap = externalContext.getSessionMap();
Map<String, MultipartRequest> sessions = (Map<String, MultipartRequest>) sessionMap
- .get(Filter.REQUESTS_SESSIONS_BEAN_NAME);
+ .get(FileUploadConstants.REQUESTS_SESSIONS_BEAN_NAME);
if (sessions != null) {
MultipartRequest multipartRequest = sessions.get(uid);
if (multipartRequest != null) {
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-12-21 15:42:19 UTC (rev 11957)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-12-21 16:23:05 UTC (rev 11958)
@@ -47,7 +47,6 @@
import javax.faces.render.RenderKitFactory;
import javax.servlet.http.HttpSession;
-import org.ajax4jsf.Filter;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.javascript.JSFunction;
@@ -61,6 +60,7 @@
import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.request.MultipartRequest;
import org.ajax4jsf.resource.CountingOutputWriter;
+import org.richfaces.component.FileUploadConstants;
import org.richfaces.component.UIFileUpload;
import org.richfaces.component.UIProgressBar;
import org.richfaces.component.util.HtmlUtil;
@@ -120,7 +120,7 @@
ExternalContext externalContext = context.getExternalContext();
Map<String, String> requestParameterMap = externalContext.getRequestParameterMap();
- String fileUploadIndicator = requestParameterMap.get(Filter.FILE_UPLOAD_INDICATOR);
+ String fileUploadIndicator = requestParameterMap.get(FileUploadConstants.FILE_UPLOAD_INDICATOR);
if (fileUploadIndicator != null && Boolean.TRUE.toString().equals(fileUploadIndicator)) {
UIFileUpload fileUpload = (UIFileUpload) component;
@@ -131,10 +131,10 @@
return; // Avoid listener calling for another fileUpload
}
- String uid = requestParameterMap.get(Filter.UPLOAD_FILES_ID);
+ String uid = requestParameterMap.get(FileUploadConstants.UPLOAD_FILES_ID);
decreaseFileCounter(context, id);
Map<String, MultipartRequest> map = (Map<String, MultipartRequest>) externalContext.getSessionMap()
- .get(Filter.REQUESTS_SESSIONS_BEAN_NAME);
+ .get(FileUploadConstants.REQUESTS_SESSIONS_BEAN_NAME);
MultipartRequest multipartRequest = map.get(uid);
@@ -182,7 +182,7 @@
Object session = context.getExternalContext()
.getSession(false);
synchronized (session) {
- Map<String, Integer> map = (Map<String, Integer>) context.getExternalContext().getSessionMap().get(Filter.UPLOADED_COUNTER);
+ Map<String, Integer> map = (Map<String, Integer>) context.getExternalContext().getSessionMap().get(FileUploadConstants.UPLOADED_COUNTER);
if (map == null) {
map = Collections
.synchronizedMap(new HashMap<String, Integer>());
@@ -364,7 +364,7 @@
@SuppressWarnings("unchecked")
private void decreaseFileCounter(FacesContext context, String id) {
Map<String, Integer> map = (Map<String, Integer>) context.getExternalContext().getSessionMap()
- .get(Filter.UPLOADED_COUNTER);
+ .get(FileUploadConstants.UPLOADED_COUNTER);
if (map != null) {
Integer i = map.get(id);
if (i == null) {
@@ -458,7 +458,7 @@
Map options = AjaxRendererUtils.buildEventOptions(context, component);
Map parameters = (Map) options.get("parameters");
parameters.put("action", action);
- parameters.put(Filter.UPLOAD_FILES_ID, new JSReference("uid"));
+ parameters.put(FileUploadConstants.UPLOAD_FILES_ID, new JSReference("uid"));
parameters.put(clientId, clientId);
parameters.put(AjaxRendererUtils.AJAX_SINGLE_ATTR, clientId);
if (oncomplete != null) {
@@ -710,6 +710,13 @@
parameters.put(p.getName(), p.getValue());
}
}
+
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ Map<String, Object> commonAjaxParameters = ajaxContext.getCommonAjaxParameters();
+ if (commonAjaxParameters != null) {
+ parameters.putAll(commonAjaxParameters);
+ }
+
return ((parameters.size() > 0) ? ScriptUtils.toScript(parameters) : JSReference.NULL);
}
Modified: trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-12-21 15:42:19 UTC (rev 11957)
+++ trunk/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-12-21 16:23:05 UTC (rev 11958)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<f:root
xmlns:f="http://ajax4jsf.org/cdk/template"
xmlns:h=" http://ajax4jsf.org/cdk/headers"
@@ -48,7 +49,10 @@
variables.setVariable("uploadLabel",labels.get("upload"));
variables.setVariable("clearAllLabel",labels.get("clear_all"));
- variables.setVariable("actionUrl",org.ajax4jsf.context.AjaxContextImpl.getCurrentInstance().getAjaxActionURL(context));
+ org.ajax4jsf.context.AjaxContext ajaxContext = org.ajax4jsf.context.AjaxContext.getCurrentInstance(context);
+ String ajaxActionUrl = ajaxContext.getAjaxActionURL(context);
+
+ variables.setVariable("actionUrl", ajaxActionUrl);
variables.setVariable("formId",getFormId(context, component));
variables.setVariable("containerId",getContainerId(context, component));
16 years, 9 months
JBoss Rich Faces SVN: r11956 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-12-21 10:42:02 -0500 (Sun, 21 Dec 2008)
New Revision: 11956
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5238
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-20 23:52:37 UTC (rev 11955)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-21 15:42:02 UTC (rev 11956)
@@ -68,6 +68,8 @@
static final String IMMEDIATE_TEST_URL = "pages/calendar/testImmediate.xhtml";
static final String EVENTS_TEST_URL = "pages/calendar/testEventsAttributes.xhtml";
+
+ static final String STYLES_AND_CLASSES_TEST_URL = "pages/calendar/styleAndClassesTest.xhtml";
static final String JOINTPOINT_DIRECTION_TEST_URL = "pages/calendar/jointPointAndDirectionAttributesTest.xhtml";
@@ -432,6 +434,23 @@
Assert.fail("Calendar displays invalid date. It should contain ["+expected+"]. But was ["+headerDate+"]");
}
}
+
+ @Test
+ public void testStylesAndClasses(Template template) {
+ renderPage(STYLES_AND_CLASSES_TEST_URL, template, RESET_METHOD);
+ initIds(getParentId());
+
+ showPopup();
+
+ AssertTextEquals(popupButtonId, "Click", "Text for popup button has not been applied");
+ assertStyleAttributeContains(inputDateId, "color: green", "Style for input has bot been applied");
+ assertClassNames(inputDateId, new String [] {"inputClass"}, "Css class for input has not been applied", true);
+
+ assertClassNames(calendarId, new String [] {"rich-calendar-exterior","rich-calendar-popup","styleClass"}, "Css classes for component were rendered incorrectly", true);
+ assertStyleAttributeContains(calendarId, "font-weight: bold", "Style was not applied for component");
+
+ assertClassNames(calendarHeaderId, new String [] { "rich-calendar-header" }, "", true);
+ }
@Test
public void testEventsAttributes(Template template) {
@@ -1275,7 +1294,7 @@
AssertTextEquals(firstWeekDayCellId, weekDayShortName, "It looks as if 'firstWeekDay' attribute doesn't work");
}
- @Test
+ @Test
public void testDisabledAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
16 years, 9 months
JBoss Rich Faces SVN: r11955 - in trunk/sandbox/ui: colorPicker and 16 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-20 18:52:37 -0500 (Sat, 20 Dec 2008)
New Revision: 11955
Added:
trunk/sandbox/ui/colorPicker/
trunk/sandbox/ui/colorPicker/pom.xml
trunk/sandbox/ui/colorPicker/src/
trunk/sandbox/ui/colorPicker/src/main/
trunk/sandbox/ui/colorPicker/src/main/config/
trunk/sandbox/ui/colorPicker/src/main/config/component/
trunk/sandbox/ui/colorPicker/src/main/config/component/README
trunk/sandbox/ui/colorPicker/src/main/java/
trunk/sandbox/ui/colorPicker/src/main/java/org/
trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/
trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/ui/
trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/ui/component/
trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/ui/component/README
trunk/sandbox/ui/colorPicker/src/main/resources/
trunk/sandbox/ui/colorPicker/src/main/templates/
trunk/sandbox/ui/colorPicker/src/main/templates/README
trunk/sandbox/ui/colorPicker/src/test/
trunk/sandbox/ui/colorPicker/src/test/java/
trunk/sandbox/ui/colorPicker/src/test/java/org/
trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/
trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/
trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/
trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/JSFComponentTest.java
Modified:
trunk/sandbox/ui/pom.xml
Log:
rich:colorPicker was added
Added: trunk/sandbox/ui/colorPicker/pom.xml
===================================================================
--- trunk/sandbox/ui/colorPicker/pom.xml (rev 0)
+++ trunk/sandbox/ui/colorPicker/pom.xml 2008-12-20 23:52:37 UTC (rev 11955)
@@ -0,0 +1,50 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>colorPicker</artifactId>
+ <name>colorPicker</name>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces.ui</prefix>
+ <taglib>
+ <shortName>colorPicker</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/sandbox/ui/colorPicker/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/ui/colorPicker/src/main/config/component/README
===================================================================
Property changes on: trunk/sandbox/ui/colorPicker/src/main/config/component/README
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/ui/component/README
===================================================================
Property changes on: trunk/sandbox/ui/colorPicker/src/main/java/org/richfaces/ui/component/README
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/ui/colorPicker/src/main/templates/README
===================================================================
Property changes on: trunk/sandbox/ui/colorPicker/src/main/templates/README
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/JSFComponentTest.java (rev 0)
+++ trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/JSFComponentTest.java 2008-12-20 23:52:37 UTC (rev 11955)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.ui.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
Property changes on: trunk/sandbox/ui/colorPicker/src/test/java/org/richfaces/ui/component/JSFComponentTest.java
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2008-12-20 18:04:21 UTC (rev 11954)
+++ trunk/sandbox/ui/pom.xml 2008-12-20 23:52:37 UTC (rev 11955)
@@ -18,5 +18,6 @@
<module>rex-messageBox</module>
<!--module>rex-button</module-->
<module>sortableHeader</module>
+ <module>colorPicker</module>
</modules>
</project>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11954 - trunk/ui/combobox/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-20 13:04:21 -0500 (Sat, 20 Dec 2008)
New Revision: 11954
Modified:
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4479
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-20 18:02:34 UTC (rev 11953)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-20 18:04:21 UTC (rev 11954)
@@ -223,12 +223,19 @@
tabindex="#{component.attributes['tabindex']}"
/>
<input id="#{clientId}comboBoxButtonBG"
+ tabindex="-1"
readonly="true"
type="text"
value=""
class="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"/>
- <input id="#{clientId}comboboxButton" readonly="true" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}; background-image: #{buttonIconInactive};"
- class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonInactiveClass}"/>
+ <input id="#{clientId}comboboxButton"
+ tabindex="-1"
+ readonly="true"
+ disabled="#{disabled}"
+ type="text"
+ value=""
+ style="#{buttonStyle}; background-image: #{buttonIconInactive};"
+ class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonInactiveClass}"/>
<div class="rich-combobox-strut rich-combobox-font" style="width:#{correction}">Strut</div>
</div>
16 years, 9 months
JBoss Rich Faces SVN: r11953 - trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-20 13:02:34 -0500 (Sat, 20 Dec 2008)
New Revision: 11953
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-4932
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-12-20 16:18:38 UTC (rev 11952)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-12-20 18:02:34 UTC (rev 11953)
@@ -23,6 +23,8 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -34,6 +36,7 @@
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;
+import javax.faces.FacesException;
import javax.faces.FactoryFinder;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
@@ -712,10 +715,30 @@
public String getSessionId(FacesContext context, UIComponent component) {
String id = null;
- HttpSession session = (HttpSession)context.getExternalContext().getSession(false);
+ Object session = context.getExternalContext().getSession(false);
if (session != null) {
- id = session.getId();
+ if (session instanceof HttpSession) {
+ id = ((HttpSession) session).getId();
+ } else {
+ Class<? extends Object> sesssionClass = session.getClass();
+ try {
+ Method getIdMethod = sesssionClass.getMethod("getId");
+ id = (String) getIdMethod.invoke(session);
+ } catch (SecurityException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (NoSuchMethodException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (IllegalArgumentException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (IllegalAccessException e) {
+ throw new FacesException(e.getMessage(), e);
+ } catch (InvocationTargetException e) {
+ Throwable cause = e.getCause();
+ throw new FacesException(cause.getMessage(), cause);
+ }
+ }
}
+
return id;
}
16 years, 9 months
JBoss Rich Faces SVN: r11952 - in trunk/docs/migrationguide/en/src/main/docbook: included and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-20 11:18:38 -0500 (Sat, 20 Dec 2008)
New Revision: 11952
Added:
trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
Modified:
trunk/docs/migrationguide/en/src/main/docbook/master.xml
trunk/docs/migrationguide/en/src/main/docbook/modules/intro.xml
trunk/docs/migrationguide/en/src/main/docbook/modules/req.xml
Log:
https://jira.jboss.org/jira/browse/RF-3048 - new chapter "The RichFaces Migration Issues 3.2.x - 3.3.0" was added
Added: trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml (rev 0)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml 2008-12-20 16:18:38 UTC (rev 11952)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="asClientId" role="asClientId">
+ <?dbhtml filename="asClientId.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>clientId</keyword>
+ <keyword>AS</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title></title>
+ <!--section>
+ <title>Description</title>
+ <para>
+
+ </para>
+ </section-->
+ <section>
+ <title>Links</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.org/jira/browse/RF-5088">Jira</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=144620&a...">RichFaces Forum</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <!--section>
+ <title>How to reproduce</title>
+ <para>
+
+ </para>
+ </section>
+ <section>
+ <title>Causes</title>
+ <para>
+
+ </para>
+ </section>
+
+ <section>
+ <title>Workarounds</title>
+ <para>
+
+ </para>
+ </section-->
+</section>
Property changes on: trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-20 16:08:52 UTC (rev 11951)
+++ trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-20 16:18:38 UTC (rev 11952)
@@ -19,11 +19,18 @@
<!ENTITY fileUploadListener SYSTEM "included/fileUploadListener.xml">
<!ENTITY myfaces SYSTEM "included/myfaces.xml">
- <!ENTITY seamMultipartFilter SYSTEM "included/seamMultipartFilter.xml">
+ <!ENTITY seamMultipartFilter SYSTEM "included/seamMultipartFilter.xml">
+
+ <!ENTITY asClientId SYSTEM "included/asClientId.xml">
]>
<book>
<bookinfo>
- <title>RichFaces Migration Guide</title>
+ <title>RichFaces Migration Guide</title>
+ <author>
+ <firstname>Gleb</firstname>
+ <surname>Galkin</surname>
+ <email>ggalkin(a)exadel.com</email>
+ </author>
<copyright>
<year>2008</year>
<holder>Red Hat</holder>
@@ -43,24 +50,24 @@
&scope;
&req;
- <chapter id="RichFacesMigrationIssues" xreflabel="RichFacesMigrationIssues">
- <?dbhtml filename="RichFacesMigrationIssues.html"?>
+ <chapter id="RichFacesMigrationIssues31to32" xreflabel="RichFacesMigrationIssues31to32">
+ <?dbhtml filename="RichFacesMigrationIssues31to32.html"?>
<chapterinfo>
<keywordset>
<keyword>RichFaces</keyword>
<keyword>Migration Guide</keyword>
</keywordset>
</chapterinfo>
- <title>The RichFaces Migration Issues</title>
+ <title>The RichFaces Migration Issues 3.1.x - 3.2.0</title>
<para>
- This chapter includes only those issues that concern migration from the previous versions to 3.2.0.
+ This chapter includes only those issues that concern migration from from 3.1.x versions to 3.2.0.
Issues, related to the new components and other problems are not covered here.
However, <ulink url="http://jira.jboss.com/jira/browse/RF">Jira</ulink> contains all issues
and if you can not find your case there, please, feel free to report it.
</para>
- <section id="MostImportant">
- <?dbhtml filename="MostImportant.html"?>
+ <section id="MostImportant31to32">
+ <?dbhtml filename="MostImportant31to32.html"?>
<sectioninfo>
<keywordset>
<keyword>important</keyword>
@@ -81,8 +88,8 @@
&resource;
</section>
- <section id="PreviousVersions">
- <?dbhtml filename="PreviousVersions.html"?>
+ <section id="PreviousVersions31to32">
+ <?dbhtml filename="PreviousVersions31to32.html"?>
<sectioninfo>
<keywordset>
<keyword>upgrade</keyword>
@@ -99,8 +106,8 @@
&actionparam;
</section>
- <section id="ThirdPartyFrameworks">
- <?dbhtml filename="ThirdPartyFrameworks.html"?>
+ <section id="ThirdPartyFrameworks31to32">
+ <?dbhtml filename="ThirdPartyFrameworks31to32.html"?>
<sectioninfo>
<keywordset>
<keyword>third</keyword>
@@ -114,5 +121,35 @@
&myfaces;
&seamMultipartFilter;
</section>
+ </chapter>
+
+ <chapter id="RichFacesMigrationIssues32to33" xreflabel="RichFacesMigrationIssues32to33">
+ <?dbhtml filename="RichFacesMigrationIssues32to33.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>RichFaces</keyword>
+ <keyword>Migration Guide</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>The RichFaces Migration Issues 3.2.x - 3.3.0</title>
+ <para>
+ This chapter includes only those issues that concern migration from from 3.2.x versions to 3.3.0.
+ Issues, that are related to the new components and other problems are not covered here.
+ However, <ulink url="http://jira.jboss.com/jira/browse/RF">Jira</ulink> contains all issues
+ and if you can not find your case there, please, feel free to report it.
+ </para>
+ <section id="ThirdPartyFrameworks32to33">
+ <?dbhtml filename="ThirdPartyFrameworks32to33.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>third</keyword>
+ <keyword>party</keyword>
+ <keyword>frameworks</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Issues with compatibility with third party frameworks</title>
+ <para>This section covers issues related to compatibility with third party frameworks.</para>
+&asClientId;
+ </section>
</chapter>
</book>
Modified: trunk/docs/migrationguide/en/src/main/docbook/modules/intro.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/modules/intro.xml 2008-12-20 16:08:52 UTC (rev 11951)
+++ trunk/docs/migrationguide/en/src/main/docbook/modules/intro.xml 2008-12-20 16:18:38 UTC (rev 11952)
@@ -10,10 +10,10 @@
<title>Introduction</title>
<para>
- This document is aimed to provide guidelines for migrating <property>RichFaces</property> projects from 3.1.x versions to 3.2.0.
+ This document is aimed to provide guidelines for migrating <property>RichFaces</property> projects.
</para>
<para>
<property>RichFaces</property> Migration Guide covers troublesome issues caused by migration and provides
suitable workarounds and examples.
</para>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/docs/migrationguide/en/src/main/docbook/modules/req.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/modules/req.xml 2008-12-20 16:08:52 UTC (rev 11951)
+++ trunk/docs/migrationguide/en/src/main/docbook/modules/req.xml 2008-12-20 16:18:38 UTC (rev 11952)
@@ -11,7 +11,7 @@
<title>Minimum requirements for the project with RichFaces 3.2.0</title>
<para>
- You can find all technical requirements to start working with <property>RichFaces 3.2.0</property>
+ You can find all technical requirements to start working with <property>RichFaces</property>
in the <ulink url="http://www.jboss.org/jbossrichfaces/docs/index.html">Developer Guide</ulink>.
</para>
16 years, 9 months
JBoss Rich Faces SVN: r11951 - in trunk/ui/calendar/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-12-20 11:08:52 -0500 (Sat, 20 Dec 2008)
New Revision: 11951
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4881
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2008-12-20 15:58:34 UTC (rev 11950)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2008-12-20 16:08:52 UTC (rev 11951)
@@ -329,8 +329,17 @@
replacing any message that comes from the converter
</description>
</property>
-
<property>
+ <name>oninputmouseover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
+ <name>oninputmouseout</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
<name>ondateselect</name>
<classname>java.lang.String</classname>
<description>onDateSelect event handler</description>
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2008-12-20 15:58:34 UTC (rev 11950)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2008-12-20 16:08:52 UTC (rev 11951)
@@ -65,6 +65,8 @@
onkeypress="#{component.attributes['oninputkeypress']}"
onkeydown="#{component.attributes['oninputkeydown']}"
onkeyup="#{component.attributes['oninputkeyup']}"
+ onmouseover="#{component.attributes['oninputmouseover']}"
+ onmouseout="#{component.attributes['oninputmouseout']}"
size="#{component.attributes['inputSize']}"
style="vertical-align: middle; #{component.attributes['inputStyle']}"
class="rich-calendar-input #{component.attributes['inputClass']}"
16 years, 9 months
JBoss Rich Faces SVN: r11950 - in trunk/test-applications/realworld: ear and 17 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-20 10:58:34 -0500 (Sat, 20 Dec 2008)
New Revision: 11950
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageBinder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingBinder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java
Removed:
trunk/test-applications/realworld/ear/src/main/application/security.drl
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationEnum.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java
Modified:
trunk/test-applications/realworld/ear/pom.xml
trunk/test-applications/realworld/ejb/pom.xml
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
trunk/test-applications/realworld/ejb/src/main/resources/import.sql
trunk/test-applications/realworld/pom.xml
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileItem.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileWrapper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBeanHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeAlbumItem.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeImageItem.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeRootItem.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ComboboxHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/addComment.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/confirmation.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/message.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/realworld/web/src/main/webapp/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/navigation.xhtml
trunk/test-applications/realworld/web/src/main/webapp/readMessages.xhtml
trunk/test-applications/realworld/web/src/main/webapp/tree.xhtml
Log:
Modified: trunk/test-applications/realworld/ear/pom.xml
===================================================================
--- trunk/test-applications/realworld/ear/pom.xml 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ear/pom.xml 2008-12-20 15:58:34 UTC (rev 11950)
@@ -21,45 +21,13 @@
<artifactId>richfaces-api</artifactId>
<version>${richfacesVersion}</version>
</dependency>
- <!-- EJB -->
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>${projectName}-ejb</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
</dependency>
-
- <dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-core</artifactId>
- <version>${droolsVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- <version>${droolsVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
@@ -88,7 +56,6 @@
</exclusion>
</exclusions>
</dependency>
-
</dependencies>
<build>
<finalName>${projectName}-ear-1.0-SNAPSHOT</finalName>
@@ -119,45 +86,6 @@
</modules>
</configuration>
</plugin>
- <!--<plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>deployer-deploy</goal>
- </goals>
- </execution>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <container>
- <containerId>jboss4x</containerId>
- <zipUrlInstaller>
- <url>${jbossDownloadURL}</url>
- <installDir>${installDir}</installDir>
- </zipUrlInstaller>
- <output>${project.build.directory}/jboss4x.log</output>
- <log>${project.build.directory}/cargo.log</log>
- </container>
- <configuration>
- <type>existing</type>
- <home>${installDir}/${jbossDeployDir}</home>
- <properties>
- <cargo.servlet.port>8080</cargo.servlet.port>
- <cargo.jboss.configuration>default</cargo.jboss.configuration>
- </properties>
- </configuration>
- </configuration>
- </plugin>-->
</plugins>
</build>
</project>
Deleted: trunk/test-applications/realworld/ear/src/main/application/security.drl
===================================================================
--- trunk/test-applications/realworld/ear/src/main/application/security.drl 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ear/src/main/application/security.drl 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,6 +0,0 @@
-package Permissions;
-
-import java.security.Principal;
-
-import org.jboss.seam.security.PermissionCheck;
-import org.jboss.seam.security.Role;
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/pom.xml
===================================================================
--- trunk/test-applications/realworld/ejb/pom.xml 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/pom.xml 2008-12-20 15:58:34 UTC (rev 11950)
@@ -82,5 +82,4 @@
</plugin>
</plugins>
</build>
-
</project>
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -7,9 +7,7 @@
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -20,10 +18,11 @@
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
-import javax.persistence.Version;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
@@ -31,7 +30,6 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;
-import org.jboss.seam.annotations.Scope;
/**
* Class for representing Album Entity
@@ -39,6 +37,13 @@
*
* @author Andrey Markhel
*/
+@NamedQueries({
+ @NamedQuery(
+ name = "album-byAlbumNameAndLogin",
+ query = "from Album a where a.name=:albumName and a.owner.login=:login"
+ )
+})
+
@Entity
@Name("album")
@Table(name = "albums")
@@ -51,10 +56,6 @@
@GeneratedValue
@Column(name = "ALBUM_ID")
private Long id = null;
-
- @Version
- @Column(name = "OBJ_VERSION")
- private int version = 0;
@Column(length = 255, nullable = false)
@NotNull
@@ -127,15 +128,6 @@
public String getName() {
return name;
}
-
- /**
- * Getter for property version
- *
- * @return version of current album object
- */
- public int getVersion() {
- return version;
- }
/**
* Setter for property name
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -13,20 +13,19 @@
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
-import javax.persistence.Version;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
@Entity
@Name("comment")
@Table(name = "comments")
public class Comment implements Serializable{
+ private static final long serialVersionUID = 3429270322123226071L;
+
@Id
@GeneratedValue
@Column(name = "COMMENT_ID")
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -11,9 +11,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
import org.jboss.seam.annotations.Name;
@Entity
@@ -21,6 +18,8 @@
@Table(name = "friendship_requests")
public class FriendshipRequest implements Serializable{
+ private static final long serialVersionUID = 1218079203119021096L;
+
@Id
@GeneratedValue
@Column(name = "REQUEST_ID")
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -18,13 +18,14 @@
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import javax.persistence.Version;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
@@ -32,7 +33,6 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;
-import org.jboss.seam.annotations.Scope;
/**
* Class for representing Image Entity
@@ -40,6 +40,7 @@
*
* @author Andrey Markhel
*/
+
@Entity
@Name("image")
@Table(name = "Images")
@@ -52,10 +53,6 @@
@GeneratedValue
@Column(name = "IMAGE_ID")
private Long id = null;
-
- @Version
- @Column(name = "OBJ_VERSION")
- private int version = 0;
@Column(length = 255, nullable = false)
@NotNull
@@ -82,9 +79,6 @@
@Transient
private String albumName;
- @NotNull
- private boolean shared;
-
@Temporal(TemporalType.TIMESTAMP)
private Date created;
@@ -141,15 +135,6 @@
public String getName() {
return name;
}
-
- /**
- * Getter for property version
- *
- * @return version of current album object
- */
- public int getVersion() {
- return version;
- }
/**
* Setter for property name
@@ -186,14 +171,6 @@
this.path = path;
}
- public boolean isShared() {
- return shared;
- }
-
- public void setShared(boolean shared) {
- this.shared = shared;
- }
-
public Date getCreated() {
return created;
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -18,14 +18,14 @@
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
@Entity
@Name("message")
@Table(name = "messages")
public class Message implements Serializable{
+ private static final long serialVersionUID = -2449408843982851550L;
+
@Id
@GeneratedValue
@Column(name = "MESSAGE_ID")
@@ -48,7 +48,7 @@
private String theme;
@ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "AUTHOR_ID", updatable = false)
+ @JoinColumn(name = "AUTHOR_ID",nullable = false, updatable = false)
@org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERS_ID")
private User author;
@@ -59,7 +59,7 @@
private String message;
@ManyToOne(fetch = FetchType.EAGER)
- @JoinColumn(name = "OWNER_ID", nullable = false, updatable = false)
+ @JoinColumn(name = "OWNER_ID", updatable = false)
@org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERS2_ID")
private User owner;
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -19,6 +19,9 @@
@Name("metaTag")
@Table(name = "metatags")
public class MetaTag implements Serializable{
+
+ private static final long serialVersionUID = -9065024051468971330L;
+
@Id
@GeneratedValue
@Column(name = "METATAG_ID")
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -9,7 +9,6 @@
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
-import javax.persistence.Transient;
import org.jboss.seam.annotations.Name;
@@ -18,6 +17,8 @@
@Table(name = "Ranks")
public class Rank implements Serializable{
+ private static final long serialVersionUID = -3106134752407013128L;
+
@Id
@GeneratedValue
@Column(name = "RANK_ID")
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -3,9 +3,7 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -23,41 +21,50 @@
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import javax.persistence.Version;
+
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
import org.hibernate.validator.Pattern;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Role;
import org.jboss.seam.annotations.Scope;
-/*@NamedQueries({
+@NamedQueries({
@NamedQuery(
- name = "User-rootAlbums",
- query = "select a from Album a where a.parent is null and a.owner=:owner"
+ name = "user-login",
+ query = "from User u where u.login = :username and u.password = :password"
+ ),
+ @NamedQuery(
+ name = "user-exist",
+ query = "from User u where u.login = :login"
+ ),
+ @NamedQuery(
+ name = "user-availableUsers",
+ query = "select u.login from User u where u.login like :login"
+ ),
+ @NamedQuery(
+ name = "user-countMessages",
+ query = "SELECT count(u) FROM User u JOIN u.messages mg WHERE u.login=:login and mg.readed = false"
+ ),
+ @NamedQuery(
+ name = "user-friendExist",
+ query = "SELECT count(u) FROM User u JOIN u.friendshipRequests fr WHERE u.login=:login and fr.friend.login=:friend"
)
-})*/
+})
@Entity
@Scope(ScopeType.CONVERSATION)
@Name("user")
-@Role(name="selectedUser", scope = ScopeType.CONVERSATION)
@Table(name = "Users")
public class User implements Serializable {
-
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name = "USER_ID")
private Long id = null;
-
- @Version
- @Column(name = "OBJ_VERSION")
- private int version = 0;
@Column(length = 255, nullable = false)
@NotNull
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,12 +1,8 @@
package org.richfaces.realworld.service;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
+import javax.ejb.Stateless;
import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
@@ -14,6 +10,7 @@
import org.richfaces.realworld.domain.User;
@Name("albumAction")
+@Stateless
public class AlbumAction implements IAlbumAction {
@In(value="entityManager")
@@ -42,20 +39,4 @@
public void editAlbum(Album album){
em.flush();
}
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#remove()
- */
- @Remove
- public void remove(){
-
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#destroy()
- */
- @Destroy
- public void destroy(){
-
- }
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,22 +1,16 @@
package org.richfaces.realworld.service;
-import javax.ejb.Remove;
+import javax.ejb.Local;
-import org.jboss.seam.annotations.Destroy;
import org.richfaces.realworld.domain.Album;
+@Local
public interface IAlbumAction {
public abstract void addAlbum(Album album);
-
- @Remove
- public abstract void remove();
public void deleteAlbum(Album album);
public void editAlbum(Album album);
-
- @Destroy
- public abstract void destroy();
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,30 +1,17 @@
package org.richfaces.realworld.service;
-import javax.ejb.Remove;
+import javax.ejb.Local;
-import org.jboss.seam.annotations.Destroy;
-import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
+@Local
public interface IImageAction {
public abstract void deleteImage(Image image);
public abstract void editImage(Image image, boolean parentChanged);
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#remove()
- */
- @Remove
- public abstract void remove();
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#destroy()
- */
- @Destroy
- public abstract void destroy();
-
public abstract void addImage(Image image);
public void deleteComment(Comment comment);
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,10 +1,7 @@
package org.richfaces.realworld.service;
import javax.ejb.Local;
-import javax.ejb.Remove;
-import org.jboss.seam.annotations.Destroy;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Message;
@Local
@@ -13,12 +10,6 @@
public abstract void sendMessage(Message message);
public abstract void deleteMessage(Message message);
-
- @Remove
- public void remove();
-
- @Destroy
- public void destroy();
public void markAsReaded(Message message);
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ISearchService.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -4,9 +4,7 @@
import java.util.Map;
import javax.ejb.Local;
-import javax.ejb.Remove;
-import org.jboss.seam.annotations.Destroy;
import org.richfaces.realworld.domain.Image;
@Local
public interface ISearchService {
@@ -16,10 +14,4 @@
public List<Image> popularImages(String additionalParams, Map<String, Object> paramMap);
public List<Image> worstImages(String additionalParams, Map<String, Object> paramMap);
-
- @Remove
- public void remove();
-
- @Destroy
- public void destroy();
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,13 +1,9 @@
package org.richfaces.realworld.service;
-import java.util.ArrayList;
import java.util.List;
import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Remove;
-import org.jboss.seam.annotations.Destroy;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.FriendshipRequest;
import org.richfaces.realworld.domain.User;
@@ -15,16 +11,9 @@
@Local
public interface IUserAction {
public User login(String username, String password);
- @Remove
- public void remove();
-
- @Destroy
- public void destroy();
-
public void register(User user);
public boolean isUserExist(String login);
public void updateUser(User user);
-
public void resetUser(User user);
public List<String> getUsers(String suggest);
public long countNotReadedMessages(User user);
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,55 +1,28 @@
package org.richfaces.realworld.service;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
+import javax.ejb.Stateless;
import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
@Name("imageAction")
+@Stateless
public class ImageAction implements IImageAction {
+ private static final String ALBUM_BY_ALBUM_NAME_AND_LOGIN_QUERY = "album-byAlbumNameAndLogin";
+ private static final String LOGIN_PARAMETER = "login";
+ private static final String ALBUM_NAME_PARAMETER = "albumName";
@In(value="entityManager")
EntityManager em;
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IImageAction#deleteImage(org.richfaces.realworld.domain.Image)
- */
public void deleteImage(Image image){
image.getAlbum().removeImage(image);
em.flush();
}
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#remove()
- */
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IImageAction#remove()
- */
- @Remove
- public void remove(){
-
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#destroy()
- */
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IImageAction#destroy()
- */
- @Destroy
- public void destroy(){
-
- }
public void editImage(Image image, boolean parentChanged) {
if(parentChanged){
@@ -57,7 +30,7 @@
String login = albumPrevious.getOwner().getLogin();
String albumName = image.getAlbumName();
albumPrevious.removeImage(image);
- Album album = (Album)em.createQuery("from Album a where a.name=:albumName and a.owner.login=:login").setParameter("albumName", albumName).setParameter("login", login).getSingleResult();
+ Album album = (Album)em.createNamedQuery(ALBUM_BY_ALBUM_NAME_AND_LOGIN_QUERY).setParameter(ALBUM_NAME_PARAMETER, albumName).setParameter(LOGIN_PARAMETER, login).getSingleResult();
album.addImage(image);
}
image.getTags().clear();
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,34 +1,28 @@
package org.richfaces.realworld.service;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
+import javax.ejb.Stateless;
import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
@Name("messageAction")
+@Stateless
public class MessageAction implements IMessageAction {
- //@PersistenceContext(unitName = "entityManager", type=PersistenceContextType.EXTENDED)
+
+ private static final String LOGIN_PARAMETER = "login";
@In(value="entityManager")
EntityManager em;
/* (non-Javadoc)
* @see org.richfaces.realworld.service.IMessageAction#sendMessage(org.richfaces.realworld.domain.Message)
*/
- @Transactional(TransactionPropagationType.REQUIRED)
public void sendMessage(Message message){
if(message.getOwnerLogin() != null){
User user = (User)em.createQuery("from User u where u.login = :login")
- .setParameter("login", message.getOwnerLogin())
+ .setParameter(LOGIN_PARAMETER, message.getOwnerLogin())
.getSingleResult();
message.setOwner(user);
message.setOwnerLogin(null);
@@ -43,10 +37,8 @@
/* (non-Javadoc)
* @see org.richfaces.realworld.service.IMessageAction#deleteMessage(org.richfaces.realworld.domain.Message)
*/
- @Transactional(TransactionPropagationType.REQUIRED)
public void deleteMessage(Message message){
- //message = em.merge(message);
- //em.remove(message);
+ em.remove(message);
message.getOwner().removeMessage(message);
em.flush();
}
@@ -55,19 +47,4 @@
message.setReaded(true);
em.flush();
}
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#remove()
- */
- @Remove
- public void remove(){
-
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#destroy()
- */
- @Destroy
- public void destroy(){
-
- }
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -4,103 +4,78 @@
import java.util.List;
import java.util.Map;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
+import javax.ejb.Stateless;
import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
import javax.persistence.Query;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.richfaces.realworld.domain.Image;
@Name("searchService")
+@Stateless
public class SearchService implements ISearchService, Serializable
{
+ private static final String PERCENT = "%";
+ public static final String DATE_NAMED_PARAMETER = ":date";
+ public static final String CHOICE_NAMED_PARAMETER = ":choice";
+ public static final String SPINNER_VALUE_NAMED_PARAMETER = ":spinnerValue";
+ private static final String DATE_PARAMETER = "date";
+ private static final String CHOICE_PARAMETER = "choice";
+ private static final String SPINNER_VALUE_PARAMETER = "spinnerValue";
+ private static final String METATAG_PARAMETER = "metatag";
+ private static final String SEARCH_UNPOPULAR_QUERY_END = " order by r.total/r.hits asc";
+ private static final String SEARCH_POPULAR_QUERY_END = " order by r.total/r.hits desc";
+ private static final String SEARCH_RELEVANT_QUERY_BEGIN = "select i from Image i join i.rank r where i.album.shared=true";
+ private static final String SEARCH_QUERY_END = " order by i.rank.total/i.rank.hits desc";
+ private static final String SEARCH_QUERY_BEGIN = "select i from MetaTag t join t.parent i where t.tag like:metatag and i.album.shared=true";
private static final long serialVersionUID = -2750591521413940277L;
@In(value="entityManager")
EntityManager em;
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.ISearchService#searchImages(java.lang.String)
- */
public List<Image> searchImages(String searchPattern, String additionalParams, Map<String, Object> paramMap){
- String fullQuery = "select i from MetaTag t join t.parent i where t.tag like:metatag and i.album.shared=true" + additionalParams + " order by i.rank.total/i.rank.hits desc";
- Query prepared = em.createQuery(fullQuery).setParameter("metatag", searchPattern+"%");
- if(paramMap != null && paramMap.get(":spinnerValue") != null){
- prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
- }
- if(paramMap != null && paramMap.get(":choice") != null){
- prepared.setParameter("choice", paramMap.get(":choice"));
- }
- if(paramMap != null && paramMap.get(":date") != null){
- prepared.setParameter("date", paramMap.get(":date"));
- }
- prepared.setMaxResults(20);
- List<Image> images = prepared.getResultList();
- for(Image image:images){
- image.getAlbum().getOwner().getLogin();
- }
- return images;
+ String fullQuery = SEARCH_QUERY_BEGIN + additionalParams + SEARCH_QUERY_END;
+ Query prepared = prepareQuery(fullQuery, searchPattern, additionalParams, paramMap);
+ return initImages(prepared);
}
public List<Image> popularImages(String additionalParams, Map<String, Object> paramMap){
- String fullQuery = "select i from Image i join i.rank r where i.album.shared=true" + additionalParams + " order by r.total/r.hits desc";
- Query prepared = em.createQuery(fullQuery);
- if(paramMap != null && paramMap.get(":spinnerValue") != null){
- prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
- }
- if(paramMap != null && paramMap.get(":choice") != null){
- prepared.setParameter("choice", paramMap.get(":choice"));
- }
- if(paramMap != null && paramMap.get(":date") != null){
- prepared.setParameter("date", paramMap.get(":date"));
- }
- prepared.setMaxResults(20);
- List<Image> images = prepared.getResultList();
- for(Image image:images){
- image.getAlbum().getOwner().getLogin();
- }
- return images;
+ String fullQuery = SEARCH_RELEVANT_QUERY_BEGIN + additionalParams + SEARCH_POPULAR_QUERY_END;
+ Query prepared = prepareQuery(fullQuery, null, additionalParams, paramMap);
+ return initImages(prepared);
}
public List<Image> worstImages(String additionalParams, Map<String, Object> paramMap){
- String fullQuery = "select i from Image i join i.rank r where i.album.shared=true" + additionalParams + " order by r.total/r.hits asc";
+ String fullQuery = SEARCH_RELEVANT_QUERY_BEGIN + additionalParams + SEARCH_UNPOPULAR_QUERY_END;
+ Query prepared = prepareQuery(fullQuery, null, additionalParams, paramMap);
+ return initImages(prepared);
+ }
+
+ private Query prepareQuery(String fullQuery ,String searchPattern, String additionalParams,
+ Map<String, Object> paramMap) {
Query prepared = em.createQuery(fullQuery);
- if(paramMap != null && paramMap.get(":spinnerValue") != null){
- prepared.setParameter("spinnerValue", paramMap.get(":spinnerValue"));
+ if(searchPattern != null){
+ prepared.setParameter(METATAG_PARAMETER, searchPattern+PERCENT);
}
- if(paramMap != null && paramMap.get(":choice") != null){
- prepared.setParameter("choice", paramMap.get(":choice"));
+ if(paramMap != null && paramMap.get(SPINNER_VALUE_NAMED_PARAMETER) != null){
+ prepared.setParameter(SPINNER_VALUE_PARAMETER, paramMap.get(SPINNER_VALUE_NAMED_PARAMETER));
}
- if(paramMap != null && paramMap.get(":date") != null){
- prepared.setParameter("date", paramMap.get(":date"));
+ if(paramMap != null && paramMap.get(CHOICE_NAMED_PARAMETER) != null){
+ prepared.setParameter(CHOICE_PARAMETER, paramMap.get(CHOICE_NAMED_PARAMETER));
}
+ if(paramMap != null && paramMap.get(DATE_NAMED_PARAMETER) != null){
+ prepared.setParameter(DATE_PARAMETER, paramMap.get(DATE_NAMED_PARAMETER));
+ }
prepared.setMaxResults(20);
+ return prepared;
+ }
+
+ private List<Image> initImages(Query prepared) {
List<Image> images = prepared.getResultList();
for(Image image:images){
image.getAlbum().getOwner().getLogin();
}
return images;
}
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#remove()
- */
- @Remove
- public void remove(){
-
- }
-
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#destroy()
- */
- @Destroy
- public void destroy(){
-
- }
}
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,33 +1,61 @@
+/**
+ * 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.realworld.service;
-import java.util.ArrayList;
-import java.util.Date;
import java.util.List;
-import java.util.Set;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceContextType;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.FriendshipRequest;
-import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
@Name("userAction")
+@Stateless
public class UserAction implements IUserAction {
+ private static final String USER_FRIEND_EXIST_QUERY = "user-friendExist";
+
+ private static final String USER_COUNT_MESSAGES_QUERY = "user-countMessages";
+
+ private static final String USER_AVAILABLE_USERS_QUERY = "user-availableUsers";
+
+ private static final String USER_EXIST_QUERY = "user-exist";
+
+ private static final String USER_LOGIN_QUERY = "user-login";
+
+ private static final String FRIEND_PARAMETER = "friend";
+
+ private static final String PERCENT = "%";
+
+ private static final String LOGIN_PARAMETER = "login";
+
+ private static final String PASSWORD_PARAMETER = "password";
+
+ private static final String USERNAME_PARAMETER = "username";
+
@In(value="entityManager")
EntityManager em;
@@ -35,24 +63,15 @@
private User user;
public User login(String username, String password) {
- return user = (User)em.createQuery("from User u where u.login = :username and u.password = :password")
- .setParameter("username", username)
- .setParameter("password", password)
+ return user = (User)em.createNamedQuery(USER_LOGIN_QUERY)
+ .setParameter(USERNAME_PARAMETER, username)
+ .setParameter(PASSWORD_PARAMETER, password)
.getSingleResult();
}
-
- @Remove
- public void remove(){
-
- }
-
- @Destroy
- public void destroy(){
-
- }
public void register(User user) {
em.persist(user);
+ em.flush();
}
public void updateUser(User user) {
@@ -67,28 +86,37 @@
}
public boolean isUserExist(String login) {
- return em.createQuery("from User u where u.login = :login")
- .setParameter("login", login)
+ return em.createNamedQuery(USER_EXIST_QUERY)
+ .setParameter(LOGIN_PARAMETER, login)
.getResultList().size() == 0;
}
public List<String> getUsers(String suggest) {
- List<String> users = em.createQuery("select u.login from User u where u.login like :login").setParameter("login", suggest + "%").setMaxResults(10).getResultList();
+ List<String> users = em.createNamedQuery(USER_AVAILABLE_USERS_QUERY)
+ .setParameter(LOGIN_PARAMETER, suggest + PERCENT)
+ .setMaxResults(10)
+ .getResultList();
return users;
}
public long countNotReadedMessages(User user){
- Long result = (Long)em.createQuery("SELECT count(u) FROM User u JOIN u.messages mg WHERE u.login=:login and mg.readed = false").setParameter("login", user.getLogin()).getSingleResult();
+ Long result = (Long)em.createNamedQuery(USER_COUNT_MESSAGES_QUERY)
+ .setParameter(LOGIN_PARAMETER, user.getLogin())
+ .getSingleResult();
return result;
}
public void removeFromFriends(User owner, User removed) {
owner.removeFriend(removed);
removed.removeFriend(owner);
+ em.flush();
}
public boolean friendExist(User user, User friend) {
- Long result = (Long)em.createQuery("SELECT count(u) FROM User u JOIN u.friendshipRequests fr WHERE u.login=:login and fr.friend.login=:friend").setParameter("login", user.getLogin()).setParameter("friend", friend.getLogin()).getSingleResult();
+ Long result = (Long)em.createNamedQuery(USER_FRIEND_EXIST_QUERY)
+ .setParameter(LOGIN_PARAMETER, user.getLogin())
+ .setParameter(FRIEND_PARAMETER, friend.getLogin())
+ .getSingleResult();
return result > 0;
}
@@ -96,12 +124,12 @@
friend.removeFriendshipRequest(request);
user.addFriend(friend);
friend.addFriend(user);
- //em.flush();
+ em.flush();
}
public void removeFromSharedAlbums(User user, Album album) {
user.removeFromSharedAlbums(album);
- //em.flush();
+ em.flush();
}
public void addSharedAlbum(Album album) {
Modified: trunk/test-applications/realworld/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,11 +1,11 @@
-INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (1, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'amarkhel', '12345', '1985-01-08');
-INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (2, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'root', '12345', '1985-01-08');
-INSERT INTO Users(user_id, obj_version, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (3, 0, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'qqqq', '12345', '1985-01-08');
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (1, 0, 'Cars', 'Photo of my dog', true, 1);
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (2, 0, 'Tetki', 'Simple Album 2', true, 1);
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (3, 0, 'Football', 'Simple Album 3', true, 2);
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (4, 0, 'Japan', 'Simple Album', true, 3);
-INSERT INTO albums(album_id, obj_version, name, description, shared, album_user_id) VALUES (5, 0, 'Music', 'Simple Album 2', true, 3);
+INSERT INTO Users(user_id, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'amarkhel', '12345', '1985-01-08');
+INSERT INTO Users(user_id, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (2, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'root', '12345', '1985-01-08');
+INSERT INTO Users(user_id, firstname, secondname, email, avatarpath, login, password, birthdate) VALUES (3, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'avatar.jpg', 'qqqq', '12345', '1985-01-08');
+INSERT INTO albums(album_id, name, description, shared, album_user_id) VALUES (1, 'Cars', 'Photo of my dog', true, 1);
+INSERT INTO albums(album_id, name, description, shared, album_user_id) VALUES (2, 'Tetki', 'Simple Album 2', true, 1);
+INSERT INTO albums(album_id, name, description, shared, album_user_id) VALUES (3, 'Football', 'Simple Album 3', true, 2);
+INSERT INTO albums(album_id, name, description, shared, album_user_id) VALUES (4, 'Japan', 'Simple Album', true, 3);
+INSERT INTO albums(album_id, name, description, shared, album_user_id) VALUES (5, 'Music', 'Simple Album 2', true, 3);
INSERT INTO Ranks(rank_id, total, hits) VALUES (1, 100, 21);
INSERT INTO Ranks(rank_id, total, hits) VALUES (2, 200, 21);
INSERT INTO Ranks(rank_id, total, hits) VALUES (3, 100, 31);
@@ -38,37 +38,37 @@
INSERT INTO Ranks(rank_id, total, hits) VALUES (30, 100, 30);
INSERT INTO Ranks(rank_id, total, hits) VALUES (31, 110, 31);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (1, 0, 'Aston Martin', 'aston_martin.jpg', 'Where is the Batman?', true, '2008-12-18', 1, 1);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (2, 0, 'Ferrari', 'ferrari_profile.jpg', 'Beauty!', true, '2008-12-18', 1, 2);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (3, 0, 'Australian supercar', 'holden-efijy-1809.jpg', 'This one glitters in my garage ;)', true, '2008-12-18', 1, 3);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (4, 0, 'Hulme Supercar', 'hulme_supercar_side_parked.jpg', 'Saw it in Germany in summer 2007', true, '2008-12-18', 1, 4);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (5, 0, 'Pagani Zonda', 'Pagani_Zonda.jpg', 'The picture is provided by my friend photographer', true, '2008-12-18', 1, 5);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (6, 0, 'Codatronca (concept)', 'spadaconcept codatronca.jpg', 'Just concept', true, '2008-12-18', 1, 6);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (7, 0, 'Unknown supercar', 'supercar.jpg', 'Tell me it name if you know', true, '2008-12-18', 1, 7);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (8, 0, 'Audrey Tautou', 'Audrey_Tautou.jpg', 'Pretty girl!', true, '2008-12-18', 2, 8);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (9, 0, 'Juliette Binoche', 'Juliette_Binoche.jpg', 'Saw her in "Chocolate" at first', true, '2008-12-18', 2, 9);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (10, 0, 'Penelope Cruz', 'Penelope_Cruz.jpg', 'Without comments', true, '2008-12-18', 2, 10);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (11, 0, 'Rihanna', 'Rihanna.jpg', 'Was born in Barbados. True or false?', true, '2008-12-18', 2, 11);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (12, 0, 'Uma Turman', 'Uma_Turman.jpg', 'Share the delight with Tarantino )', true, '2008-12-18', 2, 12);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (13, 0, 'Basketball soccer', 'Basketball_soccer.jpg', 'They never saw camera', true, '2008-12-18', 3, 13);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (14, 0, 'bdysch!!!', 'bdysch!!!.jpg', 'Dermo sluchaetsia', true, '2008-12-18', 3, 14);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (15, 0, 'Training', 'euro2008_holland_wideweb__470x321,0.jpg', ' ) ', true, '2008-12-18', 3, 15);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (16, 0, 'Also football', 'flag_football.jpg', 'This is also football, but I do not understand it at all', true, '2008-12-18', 3, 16);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (17, 0, 'Soccer', 'soccer.jpg', 'Soccer differs from football', true, '2008-12-18', 3, 17);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (18, 0, 'from birds fly', 'birds_fly.jpg', 'One of the megalopolices', true, '2008-12-18', 4, 18);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (19, 0, 'Haruki Murakami', 'Haruki_Murakami.jpg', 'World famous aouthor', true, '2008-12-18', 4, 19);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (20, 0, 'Street fashion', 'Japanese_Street_Fashion.jpg', 'Venture to walk in such in our streets?', true, '2008-12-18', 4, 20);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (21, 0, 'Kendo Championship', 'Kendo_Championship_2006.jpg', 'Samurais steel alive!', true, '2008-12-18', 4, 21);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (22, 0, 'Live in peace', 'live_in_piece.jpg', 'The best place for meditation', true, '2008-12-18', 4, 22);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (23, 0, 'Modern family', 'modern_japanesse_family.jpg', 'Where is his mother?!', true, '2008-12-18', 4, 23);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (24, 0, 'Zen garden', 'zen-garden_landscape_design.jpg', 'Fen Shui i vsia fignia', true, '2008-12-18', 4, 24);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (25, 0, 'Sergei Babkin', 'Babkin.jpg', 'Also plays in theatre', true, '2008-12-18', 5, 25);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (26, 0, 'Bob Marley', 'Bob_Marley.jpg', 'Everyone should know him', true, '2008-12-18', 5, 26);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (27, 0, 'Infected Mushroom', 'Infected_Mushroom.jpg', 'Famous psyhedelic trance group from Israel', true, '2008-12-18', 5, 27);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (28, 0, 'Massive Attack', 'massiveAttack.jpg', 'They play theme to "House"', true, '2008-12-18', 5, 28);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (29, 0, 'Street musician', 'StreetMusician.jpg', 'unknown musician', true, '2008-12-18', 5, 29);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (30, 0, 'SOAD', 'system-of-a-down.jpg', 'Try not to loose your innervision!', true, '2008-12-18', 5, 30);
-INSERT INTO images(image_id, obj_version, name, path, description, shared, created, img_album_id, rank_id) VALUES (31, 0, 'Amon Tobin', 'tobin.jpg', 'Brasilian, works in London. Try his "Supermodified2000" album', true, '2008-12-18', 5, 31);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (1, 'Aston Martin', 'aston_martin.jpg', 'Where is the Batman?', '2008-12-18', 1, 1);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (2, 'Ferrari', 'ferrari_profile.jpg', 'Beauty!', '2008-12-18', 1, 2);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (3, 'Australian supercar', 'holden-efijy-1809.jpg', 'This one glitters in my garage ;)', '2008-12-18', 1, 3);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (4, 'Hulme Supercar', 'hulme_supercar_side_parked.jpg', 'Saw it in Germany in summer 2007', '2008-12-18', 1, 4);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (5, 'Pagani Zonda', 'Pagani_Zonda.jpg', 'The picture is provided by my friend photographer', '2008-12-18', 1, 5);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (6, 'Codatronca (concept)', 'spadaconcept codatronca.jpg', 'Just concept', '2008-12-18', 1, 6);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (7, 'Unknown supercar', 'supercar.jpg', 'Tell me it name if you know', '2008-12-18', 1, 7);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (8, 'Audrey Tautou', 'Audrey_Tautou.jpg', 'Pretty girl!', '2008-12-18', 2, 8);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (9, 'Juliette Binoche', 'Juliette_Binoche.jpg', 'Saw her in "Chocolate" at first', '2008-12-18', 2, 9);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (10, 'Penelope Cruz', 'Penelope_Cruz.jpg', 'Without comments', '2008-12-18', 2, 10);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (11, 'Rihanna', 'Rihanna.jpg', 'Was born in Barbados. True or false?', '2008-12-18', 2, 11);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (12, 'Uma Turman', 'Uma_Turman.jpg', 'Share the delight with Tarantino )', '2008-12-18', 2, 12);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (13, 'Basketball soccer', 'Basketball_soccer.jpg', 'They never saw camera', '2008-12-18', 3, 13);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (14, 'bdysch!!!', 'bdysch!!!.jpg', 'Dermo sluchaetsia', '2008-12-18', 3, 14);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (15, 'Training', 'euro2008_holland_wideweb__470x321,0.jpg', ' ) ', '2008-12-18', 3, 15);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (16, 'Also football', 'flag_football.jpg', 'This is also football, but I do not understand it at all', '2008-12-18', 3, 16);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (17, 'Soccer', 'soccer.jpg', 'Soccer differs from football', '2008-12-18', 3, 17);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (18, 'from birds fly', 'birds_fly.jpg', 'One of the megalopolices', '2008-12-18', 4, 18);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (19, 'Haruki Murakami', 'Haruki_Murakami.jpg', 'World famous aouthor', '2008-12-18', 4, 19);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (20, 'Street fashion', 'Japanese_Street_Fashion.jpg', 'Venture to walk in such in our streets?', '2008-12-18', 4, 20);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (21, 'Kendo Championship', 'Kendo_Championship_2006.jpg', 'Samurais steel alive!', '2008-12-18', 4, 21);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (22, 'Live in peace', 'live_in_piece.jpg', 'The best place for meditation', '2008-12-18', 4, 22);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (23, 'Modern family', 'modern_japanesse_family.jpg', 'Where is his mother?!', '2008-12-18', 4, 23);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (24, 'Zen garden', 'zen-garden_landscape_design.jpg', 'Fen Shui i vsia fignia', '2008-12-18', 4, 24);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (25, 'Sergei Babkin', 'Babkin.jpg', 'Also plays in theatre', '2008-12-18', 5, 25);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (26, 'Bob Marley', 'Bob_Marley.jpg', 'Everyone should know him', '2008-12-18', 5, 26);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (27, 'Infected Mushroom', 'Infected_Mushroom.jpg', 'Famous psyhedelic trance group from Israel', '2008-12-18', 5, 27);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (28, 'Massive Attack', 'massiveAttack.jpg', 'They play theme to "House"', '2008-12-18', 5, 28);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (29, 'Street musician', 'StreetMusician.jpg', 'unknown musician', '2008-12-18', 5, 29);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (30, 'SOAD', 'system-of-a-down.jpg', 'Try not to loose your innervision!', '2008-12-18', 5, 30);
+INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (31, 'Amon Tobin', 'tobin.jpg', 'Brasilian, works in London. Try his "Supermodified2000" album', '2008-12-18', 5, 31);
INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (1, 'Cool', 1);
INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (2, 'Cool2', 1);
INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (3, 'richfaces', 2);
Modified: trunk/test-applications/realworld/pom.xml
===================================================================
--- trunk/test-applications/realworld/pom.xml 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/pom.xml 2008-12-20 15:58:34 UTC (rev 11950)
@@ -16,11 +16,7 @@
<projectName>realworld</projectName>
<richfacesVersion>3.3.0-SNAPSHOT</richfacesVersion>
<seamVersion>2.1.0.SP1</seamVersion>
- <jbossDownloadURL>http://downloads.sourceforge.net/jboss/jboss-4.2.3.GA.zip</jbossDownloadURL>
- <jbossDeployDir>jboss-4.2.3.GA/jboss-4.2.3.GA/server/default/</jbossDeployDir>
- <droolsVersion>4.0.0</droolsVersion>
<faceletsVersion>1.1.14</faceletsVersion>
- <installDir>E:/apps/jboss</installDir>
</properties>
<repositories>
<repository>
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/AvatarUpload.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,35 +1,44 @@
+/**
+ * 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.realworld.fileupload;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
@Name("avatarUpload")
@Scope(ScopeType.CONVERSATION)
public class AvatarUpload implements Serializable{
- @In(create=true)
- private FileManager fileManager;
+ private static final long serialVersionUID = -3653686566159143678L;
private FileItem avatarItem;
- private boolean autoUpload = false;
-
public void avatarListener(UploadEvent event){
UploadItem item = event.getUploadItem();
FileItem file = new FileItem();
@@ -44,14 +53,7 @@
public synchronized void paintAvatar(OutputStream stream, Object object) throws IOException {
stream.write(this.getAvatarItem().getData());
}
- public boolean isAutoUpload() {
- return autoUpload;
- }
- public void setAutoUpload(boolean autoUpload) {
- this.autoUpload = autoUpload;
- }
-
public FileItem getAvatarItem() {
return avatarItem;
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileItem.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileItem.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileItem.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.fileupload;
import org.richfaces.realworld.domain.Image;
@@ -5,9 +25,13 @@
public class FileItem {
private Image image = new Image();
+
private boolean selected;
+
private long length;
+
private byte[] data;
+
public byte[] getData() {
return data;
}
@@ -25,12 +49,15 @@
public boolean isSelected() {
return selected;
}
+
public void setSelected(boolean selected) {
this.selected = selected;
}
+
public Image getImage() {
return image;
}
+
public void setImage(Image image) {
this.image = image;
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileLoader.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.fileupload;
import java.io.IOException;
@@ -4,8 +24,6 @@
import java.io.OutputStream;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.fileupload;
import java.io.File;
@@ -14,10 +34,10 @@
@Scope(ScopeType.CONVERSATION)
public class FileManager {
+ private static final String UPLOAD_ROOT = "uploadRoot";
+ private static final String FILE_SEPARATOR = "file.separator";
+ private String uploadRoot;
-private String uploadRoot;
-
-
public String getUploadRoot() {
return uploadRoot;
}
@@ -28,11 +48,11 @@
public FileManager(){
FacesContext fc = FacesContext.getCurrentInstance();
- this.setUploadRoot(fc.getExternalContext().getInitParameter("uploadRoot"));
+ this.setUploadRoot(fc.getExternalContext().getInitParameter(UPLOAD_ROOT));
}
public String getFileSeparator() {
- return System.getProperty("file.separator");
+ return System.getProperty(FILE_SEPARATOR);
}
public boolean isDirectoryPresent(String directory) {
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -22,31 +22,22 @@
package org.richfaces.realworld.fileupload;
import java.io.IOException;
-import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Synchronized;
import org.jboss.seam.core.Events;
-import org.jboss.seam.faces.FacesMessages;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.tree.TreeActionManager;
-import org.richfaces.realworld.tree.TreeSelectionManager;
-import org.richfaces.realworld.util.NavigationEnum;
-import org.richfaces.realworld.util.SelectedImageIndex;
/**
* @author $Autor$
@@ -57,6 +48,14 @@
public class FileUploadBean implements Serializable{
+ private static final String SAMPLE_NAME = "Sample Name";
+
+ private static final String SAMPLE_DESCRIPTION = "Sample Description";
+
+ private static final String ADD_IMAGE_EVENT = "addImage";
+
+ private static final long serialVersionUID = 4969087557225414955L;
+
@In
private User user;
@@ -68,8 +67,6 @@
@In(create=true)
private FileManager fileManager;
-
- private boolean autoUpload = false;
public synchronized void listener(UploadEvent event) throws Exception{
UploadItem item = event.getUploadItem();
@@ -79,8 +76,8 @@
file.setSelected(false);
Image image = new Image();
image.setCreated(new Date());
- image.setDescription("Sample Description");
- image.setName("Sample Name");
+ image.setDescription(SAMPLE_DESCRIPTION);
+ image.setName(SAMPLE_NAME);
image.setPath(item.getFileName());
image.setAlbumName(selectedAlbum.getName());
image.setAlbum(selectedAlbum);
@@ -112,7 +109,7 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
- Events.instance().raiseEvent("addImage", file.getImage());
+ Events.instance().raiseEvent(ADD_IMAGE_EVENT, file.getImage());
}else{
temp.add(file);
}
@@ -132,21 +129,9 @@
e.printStackTrace();
}
//Update domain model
- Events.instance().raiseEvent("addImage", file.getImage());
+ Events.instance().raiseEvent(ADD_IMAGE_EVENT, file.getImage());
}
fileWrapper.getFiles().clear();
}
- public long getTimeStamp(){
- return System.currentTimeMillis();
- }
-
- public boolean isAutoUpload() {
- return autoUpload;
- }
-
- public void setAutoUpload(boolean autoUpload) {
- this.autoUpload = autoUpload;
- }
-
}
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileWrapper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileWrapper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileWrapper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.fileupload;
import java.util.ArrayList;
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,181 @@
+/**
+ * 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.realworld.fileupload;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import javax.imageio.ImageIO;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.User;
+
+@Name("imageLoader")
+(a)Scope(ScopeType.CONVERSATION)
+public class ImageLoader implements Serializable{
+
+ private static final String DELIMITER = ":";
+
+ private static final String JPEG = "jpeg";
+
+ private static final long serialVersionUID = -1572789608594870285L;
+
+ @In(create=true)
+ FileManager fileManager;
+
+ public synchronized void paintSearchImage(OutputStream stream, Object object) throws IOException {
+ Image painted = (Image)object;
+
+ File image = fileManager.getImage(painted.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + painted.getAlbum().getName()+ fileManager.getFileSeparator() + painted.getPath());
+ InputStream paintData = null;
+ byte[] data = new byte[(int)image.length() - 1];
+ FileInputStream fileInputStream = null;
+ BufferedInputStream bufferedInputStream = null;
+ if (image != null) {
+ try {
+ fileInputStream = new FileInputStream(image);
+ bufferedInputStream = new BufferedInputStream(fileInputStream);
+ paintData = bufferedInputStream;
+ paintData.read(data);
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }finally{
+ try {
+ fileInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ bufferedInputStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ try {
+ paintData.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ stream.write(data);
+ }
+
+ public synchronized void paint(OutputStream out, Object data) throws IOException{
+ if (null == data) {
+ return;
+ }
+ Image image = (Image)data;
+ File imageResource = fileManager.getImage(image.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + image.getAlbum().getName() + fileManager.getFileSeparator() + image.getPath());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ // throw new Exception("");
+ // TODO
+ }
+ try{
+ BufferedImage images = ImageIO.read(paintData);
+ ImageIO.write(images, JPEG, out);
+ }catch(Exception e){
+
+ }finally{
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+
+ public synchronized void paintAvatar(OutputStream out, Object data) throws IOException{
+ if (null == data) {
+ return;
+ }
+ User user = (User)data;
+ File imageResource = fileManager.getImage(user.getLogin() + fileManager.getFileSeparator() + "avatars" + fileManager.getFileSeparator() + user.getAvatarPath());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ // throw new Exception("");
+ // TODO
+ }
+ try{
+ BufferedImage image = ImageIO.read(paintData);
+ ImageIO.write(image, JPEG, out);
+ }catch(Exception e){
+
+ }finally{
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+
+ public synchronized void paintFriendAvatar(OutputStream out, Object data) throws IOException{
+ if (null == data) {
+ return;
+ }
+ String temp = data.toString();
+ String[] array = temp.split(DELIMITER);
+ File imageResource = fileManager.getImage(array[0] + fileManager.getFileSeparator() + "avatars" + fileManager.getFileSeparator() + array[1]);
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ // throw new Exception("");
+ // TODO
+ }
+ try{
+ BufferedImage image = ImageIO.read(paintData);
+ ImageIO.write(image, JPEG, out);
+ }catch(Exception e){
+
+ }finally{
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,27 @@
+/**
+ * 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.realworld.navigation;
+
+public enum NavigationEnum {
+ IMAGE_PREVIEW,
+ FILE_UPLOAD,
+ USER_PREFS, SEARCH, READ_MESSAGES,
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,56 @@
+/**
+ * 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.realworld.navigation;
+
+import java.io.Serializable;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name(value="navigationHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class NavigationHelper implements Serializable{
+
+ private static final long serialVersionUID = -89683694316344212L;
+
+ private NavigationEnum navigationEnum;
+
+ public NavigationEnum getNavigationEnumUserPrefs(){
+ return NavigationEnum.USER_PREFS;
+ }
+
+ public NavigationEnum getNavigationEnumSearch(){
+ return NavigationEnum.SEARCH;
+ }
+
+ public NavigationEnum getNavigationEnumReadMessages(){
+ return NavigationEnum.READ_MESSAGES;
+ }
+
+ public NavigationEnum getNavigationEnumImagePreview(){
+ return NavigationEnum.IMAGE_PREVIEW;
+ }
+
+ public NavigationEnum getNavigationEnumFileUpload(){
+ return NavigationEnum.FILE_UPLOAD;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/navigation/NavigationHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,12 +1,25 @@
+/**
+ * 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.realworld.search;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
@@ -17,23 +30,37 @@
import javax.faces.model.SelectItem;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.richfaces.component.UIInputNumberSpinner;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.fileupload.FileManager;
import org.richfaces.realworld.service.ISearchService;
+import org.richfaces.realworld.service.SearchService;
@Name("searchBean")
@Scope(ScopeType.CONVERSATION)
public class SearchBean implements Serializable {
- /**
- *
- */
+ private static final String EQUALS_CHOICE = "Equals";
+
+ private static final String LESS_CHOICE = "Less";
+
+ private static final String MORE_CHOICE = "More";
+
+ private static final String NO_MATTER_CHOICE = "No Matter";
+
+ private static final String EQUALS = "= ";
+
+ private static final String LESSTHEN = "< ";
+
+ private static final String GREATTHEN = "> ";
+
+ private static final String DATE_ADDON = " and i.created";
+
+ private static final String VOTES_ADDON = " and i.rank.hits";
+
+ private static final String SPINNER_ADDON = " and i.rank.total/i.rank.hits";
+
private static final long serialVersionUID = 5071655218132021316L;
@In(required=false)
@@ -58,20 +85,20 @@
public List<SelectItem> getItems() {
List<SelectItem> list = new ArrayList<SelectItem>(4);
- list.add(new SelectItem(Long.valueOf(0L), "No Matter"));
- list.add(new SelectItem(Long.valueOf(1L), "More"));
- list.add(new SelectItem(Long.valueOf(2L), "Less"));
- list.add(new SelectItem(Long.valueOf(3L), "Equals"));
+ list.add(new SelectItem(Long.valueOf(0L), NO_MATTER_CHOICE));
+ list.add(new SelectItem(Long.valueOf(1L), MORE_CHOICE));
+ list.add(new SelectItem(Long.valueOf(2L), LESS_CHOICE));
+ list.add(new SelectItem(Long.valueOf(3L), EQUALS_CHOICE));
return list;
}
private String getAstFromIndex(Long item){
if(item == 1L){
- return "> ";
+ return GREATTHEN;
}else if(item == 2L){
- return "< ";
+ return LESSTHEN;
}else if(item == 3L){
- return "= ";
+ return EQUALS;
}
return null;
}
@@ -98,14 +125,14 @@
private Map<String, Object> populateMap(String additionalParams) {
Map<String, Object> map = new HashMap<String, Object>();
- if(additionalParams.lastIndexOf(":spinnerValue") != -1){
- map.put(":spinnerValue", Long.valueOf(helper.getInputSpinner().getValue().toString()));
+ if(additionalParams.lastIndexOf(SearchService.SPINNER_VALUE_NAMED_PARAMETER) != -1){
+ map.put(SearchService.SPINNER_VALUE_NAMED_PARAMETER, Long.valueOf(helper.getInputSpinner().getValue().toString()));
}
- if(additionalParams.lastIndexOf(":choice") != -1){
- map.put(":choice", numberOfVotes);
+ if(additionalParams.lastIndexOf(SearchService.CHOICE_NAMED_PARAMETER) != -1){
+ map.put(SearchService.CHOICE_NAMED_PARAMETER, numberOfVotes);
}
- if(additionalParams.lastIndexOf(":date") != -1){
- map.put(":date", date);
+ if(additionalParams.lastIndexOf(SearchService.DATE_NAMED_PARAMETER) != -1){
+ map.put(SearchService.DATE_NAMED_PARAMETER, date);
}
return map;
}
@@ -113,19 +140,19 @@
private String populateAdditionalParams() {
StringBuilder additionalParams = new StringBuilder("");
if(spinnerChoice != null && spinnerChoice > 0L){
- additionalParams.append(" and i.rank.total/i.rank.hits");
+ additionalParams.append(SPINNER_ADDON);
additionalParams.append(getAstFromIndex(spinnerChoice));
- additionalParams.append(":spinnerValue");
+ additionalParams.append(SearchService.SPINNER_VALUE_NAMED_PARAMETER);
}
if(votesChoice != null && votesChoice > 0L){
- additionalParams.append(" and i.rank.hits");
+ additionalParams.append(VOTES_ADDON);
additionalParams.append(getAstFromIndex(votesChoice));
- additionalParams.append(":choice");
+ additionalParams.append(SearchService.CHOICE_NAMED_PARAMETER);
}
if(dateChoice != null && dateChoice > 0L && date != null){
- additionalParams.append(" and i.created");
+ additionalParams.append(DATE_ADDON);
additionalParams.append(getAstFromIndex(dateChoice));
- additionalParams.append(":date");
+ additionalParams.append(SearchService.DATE_NAMED_PARAMETER);
}
return additionalParams.toString();
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBeanHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBeanHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBeanHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.search;
import org.jboss.seam.ScopeType;
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/Authenticator.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.session;
import java.io.IOException;
@@ -8,42 +28,53 @@
import javax.faces.context.FacesContext;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.core.Events;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;
-import org.jboss.seam.web.Session;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.fileupload.AvatarUpload;
import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.IUserAction;
-import org.richfaces.realworld.tree.TreeSelectionManager;
-import org.richfaces.realworld.util.NavigationEnum;
@Name("authenticator")
@Scope(ScopeType.CONVERSATION)
public class Authenticator implements Serializable
{
- @Logger Log log;
+
+ private static final String USER_WITH_THIS_LOGIN_ALREADY_EXIST = "User with this login already exist";
+
+ private static final String CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD = "Confirm Password not equals password";
+
+ private static final String REGISTER_LOGIN_NAME_ID = "register:loginName";
+
+ private static final String REGISTER_CONFIRM_PASSWORD_ID = "register:confirmPassword";
+
+ private static final String INDEX_OUTCOME = "index";
+
+ private static final String ADMIN_ROLE = "admin";
+
+ private static final String GUEST_ROLE = "guest";
+
+ private static final String UPDATE_MAIN_AREA_EVENT = "updateMainArea";
+
+ private static final long serialVersionUID = -4585673256547342140L;
+
+ @Logger Log log;
@In Identity identity;
@Out(required=false)
private Image selectedImage;
-
- @Out(required=false)
- private User selectedUser;
@Out(required=false)
private Album selectedAlbum;
@@ -65,15 +96,15 @@
public boolean authenticate()
{
if(null == identity.getUsername() || identity.getUsername().equals("")){
- identity.addRole("guest");
- Events.instance().raiseEvent("updateMainArea", NavigationEnum.SEARCH);
+ identity.addRole(GUEST_ROLE);
+ Events.instance().raiseEvent(UPDATE_MAIN_AREA_EVENT, NavigationEnum.SEARCH);
userAction.loginAnonymous();
return true;
}
try{
User user = userAction.login(identity.getUsername(), identity.getPassword());
if(user != null){
- identity.addRole("admin");
+ identity.addRole(ADMIN_ROLE);
if(!fileManager.isDirectoryPresent(identity.getUsername())){
fileManager.addDirectory(identity.getUsername());
}
@@ -83,8 +114,7 @@
selectedImage = selectedAlbum.getImages().get(0);
}
}
- selectedUser = user;
- Events.instance().raiseEvent("updateMainArea", NavigationEnum.IMAGE_PREVIEW);
+ Events.instance().raiseEvent(UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
return true;
}
}catch(Exception nre){
@@ -94,21 +124,21 @@
return false;
}
- @Begin @End
+ @End
public String register(User user){
boolean errorHappened = false;
if(!user.getPassword().equals(user.getConfirmPassword())){
UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
- UIComponent component = root.findComponent("register:confirmPassword");
+ UIComponent component = root.findComponent(REGISTER_CONFIRM_PASSWORD_ID);
FacesContext.getCurrentInstance().addMessage(component.getClientId(FacesContext.getCurrentInstance()), new FacesMessage(
- FacesMessage.SEVERITY_ERROR, "Confirm Password not equals password" , "Confirm Password not equals password"));
+ FacesMessage.SEVERITY_ERROR, CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD , CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD));
errorHappened = true;
}
if(userAction.isUserExist(user.getLogin())){
UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
- UIComponent component = root.findComponent("register:loginName");
+ UIComponent component = root.findComponent(REGISTER_LOGIN_NAME_ID);
FacesContext.getCurrentInstance().addMessage(component.getClientId(FacesContext.getCurrentInstance()), new FacesMessage(
- FacesMessage.SEVERITY_ERROR, "User with this login already exist" , "User with this login already exist"));
+ FacesMessage.SEVERITY_ERROR, USER_WITH_THIS_LOGIN_ALREADY_EXIST , USER_WITH_THIS_LOGIN_ALREADY_EXIST));
errorHappened = true;
}
if(errorHappened){
@@ -126,15 +156,6 @@
e.printStackTrace();
}
}
- return "index";
+ return INDEX_OUTCOME;
}
-
- /**
- * Logout from session.
- *
- * @return outcome which redirects to login page.
- *//*
- public void logout() {
- Session.instance().invalidate();
- }*/
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowBean.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.slideshow;
import java.io.Serializable;
@@ -8,12 +28,17 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.tree.TreeSelectionManager;
-import org.richfaces.realworld.util.SlideshowHelper;
@Name("slideshow")
@Scope(ScopeType.CONVERSATION)
public class SlideshowBean implements Serializable{
+ private static final int INITIAL_DELAY = 10000;
+
+ private static final int DELAY = 1000;
+
+ private static final long serialVersionUID = 7801877176558409702L;
+
@In(required=false) @Out(required=false)
SlideshowHelper slideshowHelper;
@@ -22,7 +47,7 @@
private boolean active;
- private int interval = 10000;
+ private int interval = INITIAL_DELAY;
public int getInterval() {
return interval;
@@ -49,7 +74,7 @@
}
public void updateInterval(){
- this.setInterval((int)(1000 * Long.valueOf(slideshowHelper.getInputSlider().getValue().toString())));
+ this.setInterval((int)(DELAY * Long.valueOf(slideshowHelper.getInputSlider().getValue().toString())));
}
public void incrementSlide(){
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,43 @@
+/**
+ * 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.realworld.slideshow;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.UIInputNumberSlider;
+
+@Name("slideshowHelper")
+(a)Scope(ScopeType.EVENT)
+public class SlideshowHelper {
+
+ private UIInputNumberSlider inputSlider;
+
+ public UIInputNumberSlider getInputSlider() {
+ return inputSlider;
+ }
+
+ public void setInputSlider(UIInputNumberSlider inputSlider) {
+ this.inputSlider = inputSlider;
+ }
+
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/slideshow/SlideshowHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,22 +1,37 @@
+/**
+ * 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.realworld.tree;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.model.SelectItem;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.FriendshipRequest;
@@ -24,29 +39,36 @@
import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.IAlbumAction;
import org.richfaces.realworld.service.IImageAction;
import org.richfaces.realworld.service.IMessageAction;
import org.richfaces.realworld.service.IUserAction;
-import org.richfaces.realworld.util.NavigationEnum;
-import org.richfaces.realworld.util.RatingHelper;
-import org.richfaces.realworld.util.SelectedImageIndex;
+import org.richfaces.realworld.util.RatingBinder;
+import org.richfaces.realworld.util.SelectionHelper;
@Name("treeActionManager")
@Scope(ScopeType.CONVERSATION)
public class TreeActionManager implements Serializable{
+ private static final String ADDED_TO_FRIENDS_MESSAGE_THEME = "You are were added to friends";
+
+ private static final String ADDED_TO_FRIENDS_MESSAGE = "You are were added to friends by User ";
+
+ private static final String REMOVED_FROM_FRIENDS_MESSAGE_THEME = "You are were removed from friends";
+
+ private static final String YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE = "You are were removed from friends of ";
+
+ private static final long serialVersionUID = 6027103521084558931L;
+
@In
private User user;
- @Out(required=false)
- private User selectedUser;
-
@In(create=true, required=true)
private IAlbumAction albumAction;
@In(create=true, required=true)
- private RatingHelper ratingHelper;
+ private RatingBinder ratingBinder;
@In(create=true, required=true)
private IMessageAction messageAction;
@@ -61,7 +83,7 @@
private Album album;
@In(create=true) @Out
- private SelectedImageIndex selectedImageIndex;
+ private SelectionHelper selectionHelper;
@In(create=true)
FileManager fileManager;
@@ -168,7 +190,6 @@
}
}
-
@Observer("addImage")
public void addImage(Image image) {
imageAction.addImage(image);
@@ -213,8 +234,8 @@
message.setOwner(removed);
message.setFriendshipRequest(false);
message.setReaded(false);
- message.setMessage("You are were removed from friends of "+ user.getLogin());
- message.setTheme("You are were removed from friends");
+ message.setMessage(YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE+ user.getLogin());
+ message.setTheme(REMOVED_FROM_FRIENDS_MESSAGE_THEME);
messageAction.sendMessage(message);
}
@@ -229,8 +250,8 @@
message.setOwner(friend);
message.setFriendshipRequest(false);
message.setReaded(false);
- message.setMessage("You are were added to friends by User "+ user.getLogin());
- message.setTheme("You are were added to friends");
+ message.setMessage(ADDED_TO_FRIENDS_MESSAGE+ user.getLogin());
+ message.setTheme(ADDED_TO_FRIENDS_MESSAGE_THEME);
messageAction.sendMessage(message);
}
}/*else{
@@ -248,22 +269,23 @@
}
public void vote(Image image){
- imageAction.vote(image, (Long)Long.valueOf(ratingHelper.getInputSlider().getValue().toString()));
+ imageAction.vote(image, (Long)Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
}
public void showSharedAlbum(Image image){
NavigationEnum mainArea = NavigationEnum.IMAGE_PREVIEW;
treeSelectionManager.setMainArea(mainArea);
- selectedUser = image.getAlbum().getOwner();
selectedAlbum = image.getAlbum();
selectedImage = selectedAlbum.getImages().get(0);
- selectedImageIndex.setSelectedImageIndex(1);
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(false);
}
public void updateSelectedAlbum(){
selectedAlbum = user.getAlbumByName(this.getSelectedAlbumName());
selectedImage = selectedAlbum.getImages().get(0);
- selectedImageIndex.setSelectedImageIndex(1);
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(true);
}
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeAlbumItem.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeAlbumItem.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeAlbumItem.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.tree;
import java.util.ArrayList;
@@ -11,10 +31,11 @@
import org.richfaces.realworld.domain.Image;
public class TreeAlbumItem implements TreeNode {
- /**
- *
- */
+
+ private static final String ALBUM_NODE_TYPE = "album";
+
private static final long serialVersionUID = 6514596192023597908L;
+
private long id;
private Map<Object, TreeNode> images = new LinkedHashMap<Object, TreeNode>();
private Album album;
@@ -89,7 +110,7 @@
}
public String getType() {
- return "album";
+ return ALBUM_NODE_TYPE;
}
public String toString(){
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeImageItem.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeImageItem.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeImageItem.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.tree;
import java.util.Iterator;
@@ -8,9 +28,8 @@
import org.richfaces.realworld.domain.Image;
public class TreeImageItem implements TreeNode {
- /**
- *
- */
+
+ private static final String IMAGE_NODE_TYPE = "image";
private static final long serialVersionUID = 6514596192023597908L;
private long id;
private Image image;
@@ -66,7 +85,7 @@
}
public String getType() {
- return "image";
+ return IMAGE_NODE_TYPE;
}
public Image getImage() {
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeRootItem.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeRootItem.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeRootItem.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.tree;
import java.util.ArrayList;
@@ -15,15 +35,14 @@
import org.jboss.seam.annotations.Scope;
import org.richfaces.model.TreeNode;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.service.IAlbumAction;
-import org.richfaces.realworld.service.IImageAction;
@Name("treeRoot")
@Scope(ScopeType.CONVERSATION)
public class TreeRootItem implements TreeNode {
+ private static final String TREE_ROOT_NODE_TYPE = "treeRoot";
+
@In @Out
private User user;
@@ -80,7 +99,7 @@
}
public String getType() {
- return "treeBean";
+ return TREE_ROOT_NODE_TYPE;
}
private void initData() {
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,12 +1,25 @@
+/**
+ * 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.realworld.tree;
-import java.awt.image.BufferedImage;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
@@ -17,19 +30,15 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
-import javax.imageio.ImageIO;
import org.ajax4jsf.context.AjaxContext;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
import org.richfaces.component.UIDatascroller;
import org.richfaces.component.UIDragSupport;
import org.richfaces.component.UITree;
@@ -42,18 +51,28 @@
import org.richfaces.model.TreeRowKey;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.fileupload.FileManager;
-import org.richfaces.realworld.util.NavigationEnum;
-import org.richfaces.realworld.util.SelectedImageIndex;
+import org.richfaces.realworld.navigation.NavigationEnum;
+import org.richfaces.realworld.util.SelectionHelper;
@Name("treeSelectionManager")
@Scope(ScopeType.CONVERSATION)
@Synchronized(timeout=200000)
public class TreeSelectionManager implements Serializable{
- @In(required=false)
- private User user;
+ private static final String DATASCROLLER_ID = "mainform:sc1";
+
+ private static final String IMAGE_DATATABLE_ID = "mainform:imageList";
+
+ private static final String FIRST = "first";
+
+ private static final String NEXT = "next";
+
+ private static final String LAST = "last";
+
+ private static final String PREVIOUS = "previous";
+
+ private static final long serialVersionUID = -6072049677194472463L;
private NavigationEnum mainArea;
@@ -64,7 +83,7 @@
private Album selectedAlbum;
@In(required=false) @Out(required=false)
- private SelectedImageIndex selectedImageIndex;
+ private SelectionHelper selectionHelper;
@In(create=true)
FileManager fileManager;
@@ -91,27 +110,27 @@
public void scrollerListener(DataScrollerEvent event) {
List<Image> images = selectedAlbum.getImages();
- if (event.getNewScrolVal().equals("previous")) {
+ if (event.getNewScrolVal().equals(PREVIOUS)) {
for(int index = 0 ; index < images.size(); index++){
if(images.get(index) == selectedImage){
selectedImage = images.get(index - 1);
- selectedImageIndex.setSelectedImageIndex(index);
+ selectionHelper.setSelectedImageIndex(index);
}
}
- } else if (event.getNewScrolVal().equals("last")) {
+ } else if (event.getNewScrolVal().equals(LAST)) {
selectedImage = images.get(images.size() - 1);
- selectedImageIndex.setSelectedImageIndex(images.size());
- } else if (event.getNewScrolVal().equals("next")) {
+ selectionHelper.setSelectedImageIndex(images.size());
+ } else if (event.getNewScrolVal().equals(NEXT)) {
for(int index = 0 ; index < images.size(); index++){
if(images.get(index) == selectedImage){
selectedImage = images.get(index + 1);
- selectedImageIndex.setSelectedImageIndex(index + 2);
+ selectionHelper.setSelectedImageIndex(index + 2);
return;
}
}
- } else if (event.getNewScrolVal().equals("first")) {
+ } else if (event.getNewScrolVal().equals(FIRST)) {
selectedImage = images.get(0);
- selectedImageIndex.setSelectedImageIndex(1);
+ selectionHelper.setSelectedImageIndex(1);
}
}
@@ -138,7 +157,7 @@
// Note: check if we dropped node on to itself or to item instead of
// folder here
if (droppedInNode != null && (droppedInNode.equals(draggedNode) || droppedInNode.getParent().getParent() != null || draggedNode.getParent().getParent() == null)) {
- System.out.println("Warning: Can't drop on itself or to pic itself! Also can't move folders");
+ //Warning: Can't drop on itself or to pic itself! Also can't move folders
return;
}
@@ -172,7 +191,7 @@
}
AjaxContext ac = AjaxContext.getCurrentInstance();
- ac.addRenderedArea("mainform:imageList");
+ ac.addRenderedArea(IMAGE_DATATABLE_ID);
Image draggedImage = ((TreeImageItem)draggedNode).getImage();
draggedImage.setAlbumName(((TreeAlbumItem)droppedInNode).getAlbum().getName());
treeActionManager.editImage(draggedImage);
@@ -180,7 +199,7 @@
try {
ac.addComponentToAjaxRender(destTree);
} catch (Exception e) {
- System.err.print(e.getMessage());
+ //System.err.print(e.getMessage());
}
}
@@ -259,6 +278,7 @@
}
}
}
+ selectionHelper.setUserAlbumSelected(true);
}
catch(Exception e){
//Bla-bla-bla
@@ -266,16 +286,15 @@
}
public void updateScroller(ActionEvent event){
- this.setDataScrollerIndex(selectedImageIndex.getSelectedImageIndex()- 1);
+ this.setDataScrollerIndex(selectionHelper.getSelectedImageIndex()- 1);
}
private void setDataScrollerIndex(int index) {
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
- UIDatascroller scroller = (UIDatascroller)component.findComponent("mainform:sc1");
- //scroller.setPage(index+1);
+ UIDatascroller scroller = (UIDatascroller)component.findComponent(DATASCROLLER_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
- selectedImageIndex.setSelectedImageIndex(index+1);
+ selectionHelper.setSelectedImageIndex(index+1);
}
public void incrementSlideshowIndex() {
@@ -285,11 +304,10 @@
}
selectedImage = selectedAlbum.getImages().get(index +1);
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
- UIDatascroller scroller = (UIDatascroller)component.findComponent("mainform:sc1");
- //scroller.setPage(index+2);
+ UIDatascroller scroller = (UIDatascroller)component.findComponent(DATASCROLLER_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+2);
- selectedImageIndex.setSelectedImageIndex(index+2);
+ selectionHelper.setSelectedImageIndex(index+2);
}
public String getNodeTitle() {
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,64 @@
+package org.richfaces.realworld.util;
+
+import java.io.Serializable;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.tree.TreeActionManager;
+
+@Name("albumPopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class AlbumPopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ @In(create=true, required=true) @Out
+ private Album album;
+
+ @In(create=true, required=true)
+ private TreeActionManager treeActionManager;
+
+ public void initAlbumData( String actionName, String caption, Album album){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != album){
+ this.album = album;
+ }else{
+ this.album = new Album();
+ }
+ }
+
+ public void editAlbum(ActionEvent event){
+ treeActionManager.editAlbum(this.album);
+ }
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void addAlbum(ActionEvent event){
+ treeActionManager.addAlbum();
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ComboboxHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ComboboxHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ComboboxHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,3 +1,23 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
package org.richfaces.realworld.util;
import java.io.Serializable;
@@ -14,7 +34,7 @@
@Scope(ScopeType.CONVERSATION)
public class ComboboxHelper implements Serializable{
-
+ private static final long serialVersionUID = -8864867298110686848L;
private String albumName;
public String getAlbumName() {
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,73 @@
+package org.richfaces.realworld.util;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Comment;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.tree.TreeActionManager;
+
+@Name("commentPopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class CommentPopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ @In(create=true, required=true) @Out
+ private Comment comment;
+
+ @In
+ private User user;
+
+ @In(create=true, required=true)
+ private TreeActionManager treeActionManager;
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void initComment( String actionName, String caption, Comment comment, Image image){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != comment){
+ this.comment = comment;
+ }else{
+ this.comment = new Comment();
+ this.comment.setAuthor(user);
+ this.comment.setImage(image);
+ this.comment.setDate(new Date());
+ }
+ }
+
+ public void editComment(ActionEvent event){
+ treeActionManager.editComment(this.comment);
+ }
+
+ public void addComment(ActionEvent event){
+ treeActionManager.addComment(this.comment);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,81 @@
+package org.richfaces.realworld.util;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+import org.richfaces.realworld.tree.TreeActionManager;
+
+@Name("confirmationPopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class ConfirmationPopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ @In(required=true)
+ private Image image;
+
+ @In(required=true)
+ private Album album;
+
+ @In(required=true)
+ private TreeActionManager treeActionManager;
+
+ public void initImagePopup( String actionName, String caption, Image image){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != image){
+ this.image = image;
+ image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ }else{
+ this.image = new Image();
+ }
+ }
+
+ public void initAlbumData( String actionName, String caption, Album album){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != album){
+ this.album = album;
+ }else{
+ this.album = new Album();
+ }
+ }
+
+ public void deleteAlbum(ActionEvent event){
+ treeActionManager.deleteAlbum(this.album);
+ }
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void deleteImage(ActionEvent event){
+ treeActionManager.deleteImage(this.image);
+ }
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,60 +1,65 @@
+/**
+ * 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.realworld.util;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.TransactionPropagationType;
-import org.jboss.seam.annotations.Transactional;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.service.IAlbumAction;
-import org.richfaces.realworld.service.IUserAction;
@Name("friendHelper")
@Scope(ScopeType.CONVERSATION)
public class FriendHelper implements Serializable{
+
+ private static final long serialVersionUID = 4735350615108906608L;
- @Out(required=false)
- private User selectedUser;
-
@In(required=false) @Out(required=false)
private Image selectedImage;
@In(required=false) @Out(required=false)
private Album selectedAlbum;
- @In(create=true)
- private IAlbumAction albumAction;
-
@In(required=false) @Out(required=false)
- private SelectedImageIndex selectedImageIndex;
+ private SelectionHelper selectionHelper;
@In(required=false)
ComboboxHelper comboboxHelper;
public void chooseAlbum(User friend){
- selectedUser = friend;
selectedAlbum = friend.getAlbumByName(comboboxHelper.getAlbumName());
selectedImage = selectedAlbum.getImages().get(0);
- selectedImageIndex.setSelectedImageIndex(1);
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(false);
}
public void chooseAlbum(Album album){
- selectedUser = album.getOwner();
selectedAlbum = album;
selectedImage = selectedAlbum.getImages().get(0);
- selectedImageIndex.setSelectedImageIndex(1);
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(false);
}
}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageBinder.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageBinder.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageBinder.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,96 @@
+/**
+ * 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.realworld.util;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.component.UIRepeat;
+import org.jboss.seam.annotations.Name;
+import org.richfaces.component.html.HtmlInputText;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+
+@Name(value="imageBinder")
+public class ImageBinder {
+
+ HtmlInputText metaRef;
+ private UIRepeat repeater;
+ private Set<Integer> keys = null;
+
+ /**
+ * @return the keys
+ */
+ public Set<Integer> getKeys() {
+ return keys;
+ }
+
+ /**
+ * @param keys the keys to set
+ */
+ public void setKeys(Set<Integer> keys) {
+ this.keys = keys;
+ }
+
+ public void setRepeater(UIRepeat repeater) {
+ this.repeater = repeater;
+ }
+
+ public UIRepeat getRepeater() {
+ return repeater;
+ }
+
+ public HtmlInputText getMetaRef() {
+ return metaRef;
+ }
+
+ public void setMetaRef(HtmlInputText metaRef) {
+ this.metaRef = metaRef;
+ }
+
+ public String change(Image image){
+
+ Set<Integer> keys = new HashSet<Integer>();
+ int rowKey = getRepeater().getRowIndex();
+ keys.add(rowKey);
+ setKeys(keys);
+ metaRef.processValidators(FacesContext.getCurrentInstance());
+ metaRef.processUpdates(FacesContext.getCurrentInstance());
+ MetaTag metaTag = new MetaTag();
+ metaTag.setTag(metaRef.getValue().toString());
+ metaTag.setParent(image);
+ image.getMeta().add(metaTag);
+ return null;
+ }
+
+ public void addTag(Image image){
+ MetaTag metaTag = new MetaTag();
+ metaTag.setTag("");
+ metaTag.setParent(image);
+ image.getMeta().add(metaTag);
+ }
+
+ public void removeTag(MetaTag tag, Image image){
+ image.getMeta().remove(tag);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageBinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,79 +0,0 @@
-package org.richfaces.realworld.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.component.UIRepeat;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Name;
-import org.richfaces.component.html.HtmlInputText;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
-
-@Name(value="imageHelper")
-public class ImageHelper {
-
- HtmlInputText metaRef;
- private UIRepeat repeater;
- private Set<Integer> keys = null;
-
- /**
- * @return the keys
- */
- public Set getKeys() {
- return keys;
- }
-
- /**
- * @param keys the keys to set
- */
- public void setKeys(Set keys) {
- this.keys = keys;
- }
-
- public void setRepeater(UIRepeat repeater) {
- this.repeater = repeater;
- }
-
- public UIRepeat getRepeater() {
- return repeater;
- }
-
- public HtmlInputText getMetaRef() {
- return metaRef;
- }
-
- public void setMetaRef(HtmlInputText metaRef) {
- this.metaRef = metaRef;
- }
-
- public String change(Image image){
-
- HashSet keys = new HashSet<Integer>();
- int rowKey = getRepeater().getRowIndex();
- keys.add(rowKey);
- setKeys(keys);
- metaRef.processValidators(FacesContext.getCurrentInstance());
- metaRef.processUpdates(FacesContext.getCurrentInstance());
- MetaTag metaTag = new MetaTag();
- metaTag.setTag(metaRef.getValue().toString());
- metaTag.setParent(image);
- image.getMeta().add(metaTag);
- return null;
- }
-
- public void addTag(Image image){
- MetaTag metaTag = new MetaTag();
- metaTag.setTag("");
- metaTag.setParent(image);
- image.getMeta().add(metaTag);
- //image.getMeta().add("");
- }
-
- public void removeTag(MetaTag tag, Image image){
- image.getMeta().remove(tag);
- //image.getMeta().remove(tag);
- }
-}
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,157 +0,0 @@
-package org.richfaces.realworld.util;
-
-import java.awt.image.BufferedImage;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-
-import javax.imageio.ImageIO;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.fileupload.FileManager;
-
-@Name("imageLoader")
-(a)Scope(ScopeType.CONVERSATION)
-public class ImageLoader implements Serializable{
-
- @In(create=true)
- FileManager fileManager;
-
- public synchronized void paintSearchImage(OutputStream stream, Object object) throws IOException {
- Image painted = (Image)object;
-
- File image = fileManager.getImage(painted.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + painted.getAlbum().getName()+ fileManager.getFileSeparator() + painted.getPath());
- InputStream paintData = null;
- byte[] data = new byte[(int)image.length() - 1];
- FileInputStream fileInputStream = null;
- BufferedInputStream bufferedInputStream = null;
- if (image != null) {
- try {
- fileInputStream = new FileInputStream(image);
- bufferedInputStream = new BufferedInputStream(fileInputStream);
- paintData = bufferedInputStream;
- paintData.read(data);
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }finally{
- try {
- fileInputStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- bufferedInputStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- paintData.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- stream.write(data);
- }
-
- public synchronized void paint(OutputStream out, Object data) throws IOException{
- if (null == data) {
- return;
- }
- Image image = (Image)data;
- File imageResource = fileManager.getImage(image.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + image.getAlbum().getName() + fileManager.getFileSeparator() + image.getPath());
- if (imageResource != null) {
- FileInputStream fileInputStream = new FileInputStream(imageResource);
- BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
- InputStream paintData = bufferedInputStream;
- if (null == paintData) {
- // throw new Exception("");
- // TODO
- }
- try{
- BufferedImage images = ImageIO.read(paintData);
- ImageIO.write(images, "jpeg", out);
- }catch(Exception e){
-
- }finally{
- fileInputStream.close();
- bufferedInputStream.close();
- paintData.close();
- }
- }
- }
-
- public synchronized void paintAvatar(OutputStream out, Object data) throws IOException{
- if (null == data) {
- return;
- }
- User user = (User)data;
- File imageResource = fileManager.getImage(user.getLogin() + fileManager.getFileSeparator() + "avatars" + fileManager.getFileSeparator() + user.getAvatarPath());
- if (imageResource != null) {
- FileInputStream fileInputStream = new FileInputStream(imageResource);
- BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
- InputStream paintData = bufferedInputStream;
- if (null == paintData) {
- // throw new Exception("");
- // TODO
- }
- try{
- BufferedImage image = ImageIO.read(paintData);
- ImageIO.write(image, "jpeg", out);
- }catch(Exception e){
-
- }finally{
- fileInputStream.close();
- bufferedInputStream.close();
- paintData.close();
- }
- }
- }
-
- public synchronized void paintFriendAvatar(OutputStream out, Object data) throws IOException{
- if (null == data) {
- return;
- }
- String temp = data.toString();
- String[] array = temp.split(":");
- File imageResource = fileManager.getImage(array[0] + fileManager.getFileSeparator() + "avatars" + fileManager.getFileSeparator() + array[1]);
- if (imageResource != null) {
- FileInputStream fileInputStream = new FileInputStream(imageResource);
- BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
- InputStream paintData = bufferedInputStream;
- if (null == paintData) {
- // throw new Exception("");
- // TODO
- }
- try{
- BufferedImage image = ImageIO.read(paintData);
- ImageIO.write(image, "jpeg", out);
- }catch(Exception e){
-
- }finally{
- fileInputStream.close();
- bufferedInputStream.close();
- paintData.close();
- }
- }
- }
-}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,41 @@
+package org.richfaces.realworld.util;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+import org.richfaces.realworld.tree.TreeActionManager;
+
+@Name("imagePopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class ImagePopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ @In(create=true, required=true) @Out
+ private Image image;
+
+ @In(create=true, required=true)
+ private TreeActionManager treeActionManager;
+
+ public void initImagePopup(Image image){
+ if(null != image){
+ this.image = image;
+ image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ }else{
+ this.image = new Image();
+ }
+ }
+
+ public void editImage(ActionEvent event){
+ treeActionManager.editImage(this.image);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,163 @@
+/**
+ * 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.realworld.util;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Comment;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.Message;
+import org.richfaces.realworld.domain.MetaTag;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.tree.TreeActionManager;
+
+@Name("modalPanelHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class MessagePanelHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ private boolean sendRequired;
+
+ private boolean searchRequired = false;
+
+ @In
+ private User user;
+
+ @Out(required=false)
+ private Message message;
+
+ @In(create=true, required=true)
+ private TreeActionManager treeActionManager;
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void initModalPanelData( String actionName, boolean sendRequired, Message message){
+ this.actionName = actionName;
+ this.sendRequired = sendRequired;
+ this.message = new Message();
+ this.message.setTheme("Re:" + message.getTheme());
+ this.message.setAuthor(user);
+ this.message.setOwner(message.getAuthor());
+ this.message.setReaded(false);
+ this.searchRequired = false;
+ }
+
+ public void initMessage( String actionName, boolean sendRequired, Message message, boolean userSearchRequired){
+ this.actionName = actionName;
+ this.sendRequired = sendRequired;
+ this.searchRequired = userSearchRequired;
+ this.message = new Message();
+ this.message.setAuthor(user);
+ this.message.setReaded(false);
+ }
+
+ public void initMessage(boolean sendRequired, Message message){
+ this.sendRequired = sendRequired;
+ this.message = message;
+ this.message.setReaded(true);
+ this.searchRequired = false;
+ }
+
+ public void initModalPanelData( String actionName, boolean sendRequired, User owner){
+ this.actionName = actionName;
+ this.sendRequired = sendRequired;
+ this.message = new Message();
+ this.message.setAuthor(user);
+ this.message.setOwner(owner);
+ this.message.setReaded(false);
+ this.searchRequired = false;
+ }
+
+ public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message){
+ this.actionName = actionName;
+ this.sendRequired = sendRequired;
+ this.message = new Message();
+ this.message.setAuthor(user);
+ this.message.setOwner(owner);
+ this.message.setReaded(false);
+ this.message.setTheme(theme);
+ this.message.setMessage(message);
+ this.searchRequired = false;
+ }
+
+ public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message, boolean friendshipRequest){
+ this.actionName = actionName;
+ this.sendRequired = sendRequired;
+ this.message = new Message();
+ this.message.setAuthor(user);
+ this.message.setOwner(owner);
+ this.message.setReaded(false);
+ this.message.setTheme(theme);
+ this.message.setMessage(message);
+ this.message.setFriendshipRequest(friendshipRequest);
+ this.searchRequired = false;
+ }
+
+ public void sendMessage(ActionEvent event){
+ this.message.setDate(new Date());
+ treeActionManager.sendMessage(this.message);
+ }
+
+ public boolean isSendRequired() {
+ return sendRequired;
+ }
+
+ public void setSendRequired(boolean sendRequired) {
+ this.sendRequired = sendRequired;
+ }
+
+ public boolean isSearchRequired() {
+ return searchRequired;
+ }
+
+ public void setSearchRequired(boolean searchRequired) {
+ this.searchRequired = searchRequired;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ModalPanelHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,214 +0,0 @@
-package org.richfaces.realworld.util;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
-
-import javax.faces.event.ActionEvent;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
-import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Comment;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Message;
-import org.richfaces.realworld.domain.MetaTag;
-import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.tree.TreeActionManager;
-
-@Name("modalPanelHelper")
-(a)Scope(ScopeType.CONVERSATION)
-public class ModalPanelHelper implements Serializable{
-
- private String caption;
-
- private String actionName;
-
- private boolean sendRequired;
-
- private boolean searchRequired = false;
-
- @In
- private User user;
-
- @Out(required=false)
- private Message message;
-
- @In(create=true, required=true) @Out
- private Album album;
-
- @In(create=true, required=true) @Out
- private Image image;
-
- @In(create=true, required=true)
- private TreeActionManager treeActionManager;
-
- @In(create=true, required=true) @Out
- private Comment comment;
-
- public String getCaption() {
- return caption;
- }
-
- public void setCaption(String caption) {
- this.caption = caption;
- }
-
- public String getActionName() {
- return actionName;
- }
-
- public void setActionName(String actionName) {
- this.actionName = actionName;
- }
-
- public void initModalPanelData( String actionName, String caption, Album album){
- this.caption = caption;
- this.actionName = actionName;
- if(null != album){
- this.album = album;
- }else{
- this.album = new Album();
- }
- }
-
- public void initModalPanelData( String actionName, String caption, Image image){
- this.caption = caption;
- this.actionName = actionName;
- if(null != image){
- this.image = image;
- image.setMeta(new ArrayList<MetaTag>(image.getTags()));
- }else{
- this.image = new Image();
- }
- }
-
- public void initModalPanelData( String actionName, boolean sendRequired, Message message){
- this.actionName = actionName;
- this.sendRequired = sendRequired;
- this.message = new Message();
- this.message.setTheme("Re:" + message.getTheme());
- this.message.setAuthor(user);
- this.message.setOwner(message.getAuthor());
- this.message.setReaded(false);
- this.searchRequired = false;
- }
-
- public void initMessage( String actionName, boolean sendRequired, Message message, boolean userSearchRequired){
- this.actionName = actionName;
- this.sendRequired = sendRequired;
- this.searchRequired = userSearchRequired;
- this.message = new Message();
- this.message.setAuthor(user);
- this.message.setReaded(false);
- }
-
- public void initMessage(boolean sendRequired, Message message){
- this.sendRequired = sendRequired;
- this.message = message;
- this.message.setReaded(true);
- this.searchRequired = false;
- }
-
- public void initModalPanelData( String actionName, boolean sendRequired, User owner){
- this.actionName = actionName;
- this.sendRequired = sendRequired;
- this.message = new Message();
- this.message.setAuthor(user);
- this.message.setOwner(owner);
- this.message.setReaded(false);
- this.searchRequired = false;
- }
-
- public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message){
- this.actionName = actionName;
- this.sendRequired = sendRequired;
- this.message = new Message();
- this.message.setAuthor(user);
- this.message.setOwner(owner);
- this.message.setReaded(false);
- this.message.setTheme(theme);
- this.message.setMessage(message);
- this.searchRequired = false;
- }
-
- public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message, boolean friendshipRequest){
- this.actionName = actionName;
- this.sendRequired = sendRequired;
- this.message = new Message();
- this.message.setAuthor(user);
- this.message.setOwner(owner);
- this.message.setReaded(false);
- this.message.setTheme(theme);
- this.message.setMessage(message);
- this.message.setFriendshipRequest(friendshipRequest);
- this.searchRequired = false;
- }
-
- public void initModalPanelData( String actionName, String caption, Comment comment, Image image){
- this.caption = caption;
- this.actionName = actionName;
- if(null != comment){
- this.comment = comment;
- }else{
- this.comment = new Comment();
- this.comment.setAuthor(user);
- this.comment.setImage(image);
- this.comment.setDate(new Date());
- }
- }
-
- public void addAlbum(ActionEvent event){
- treeActionManager.addAlbum();
- }
-
- public void editAlbum(ActionEvent event){
- treeActionManager.editAlbum(this.album);
- }
-
- public void deleteAlbum(ActionEvent event){
- treeActionManager.deleteAlbum(this.album);
- }
-
- public void deleteImage(ActionEvent event){
- treeActionManager.deleteImage(this.image);
- }
-
- public void editComment(ActionEvent event){
- treeActionManager.editComment(this.comment);
- }
-
- public void addComment(ActionEvent event){
- treeActionManager.addComment(this.comment);
- }
-
- public void editImage(ActionEvent event){
- treeActionManager.editImage(this.image);
- }
-
- public void sendMessage(ActionEvent event){
- this.message.setDate(new Date());
- treeActionManager.sendMessage(this.message);
- }
-
- public boolean isSendRequired() {
- return sendRequired;
- }
-
- public void setSendRequired(boolean sendRequired) {
- this.sendRequired = sendRequired;
- }
-
- public boolean isSearchRequired() {
- return searchRequired;
- }
-
- public void setSearchRequired(boolean searchRequired) {
- this.searchRequired = searchRequired;
- }
-}
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationEnum.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationEnum.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationEnum.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,7 +0,0 @@
-package org.richfaces.realworld.util;
-
-public enum NavigationEnum {
- IMAGE_PREVIEW,
- FILE_UPLOAD,
- USER_PREFS, SEARCH, READ_MESSAGES,
-}
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/NavigationHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,34 +0,0 @@
-package org.richfaces.realworld.util;
-
-import java.io.Serializable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-@Name(value="navigationHelper")
-(a)Scope(ScopeType.CONVERSATION)
-public class NavigationHelper implements Serializable{
-
- private NavigationEnum navigationEnum;
-
- public NavigationEnum getNavigationEnumUserPrefs(){
- return NavigationEnum.USER_PREFS;
- }
-
- public NavigationEnum getNavigationEnumSearch(){
- return NavigationEnum.SEARCH;
- }
-
- public NavigationEnum getNavigationEnumReadMessages(){
- return NavigationEnum.READ_MESSAGES;
- }
-
- public NavigationEnum getNavigationEnumImagePreview(){
- return NavigationEnum.IMAGE_PREVIEW;
- }
-
- public NavigationEnum getNavigationEnumFileUpload(){
- return NavigationEnum.FILE_UPLOAD;
- }
-}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingBinder.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingBinder.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingBinder.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,41 @@
+/**
+ * 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.realworld.util;
+
+import java.io.Serializable;
+
+import org.jboss.seam.annotations.Name;
+import org.richfaces.component.UIInputNumberSlider;
+
+@Name("ratingBinder")
+public class RatingBinder implements Serializable{
+
+ private static final long serialVersionUID = -7714638502390978362L;
+ private UIInputNumberSlider inputSlider;
+
+ public UIInputNumberSlider getInputSlider() {
+ return inputSlider;
+ }
+
+ public void setInputSlider(UIInputNumberSlider inputSlider) {
+ this.inputSlider = inputSlider;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingBinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RatingHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,24 +0,0 @@
-package org.richfaces.realworld.util;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.richfaces.component.UIInputNumberSlider;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.service.IImageAction;
-
-@Name("ratingHelper")
-public class RatingHelper {
-
- private UIInputNumberSlider inputSlider;
-
- public UIInputNumberSlider getInputSlider() {
- return inputSlider;
- }
-
- public void setInputSlider(UIInputNumberSlider inputSlider) {
- this.inputSlider = inputSlider;
- }
-}
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectedImageIndex.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,22 +0,0 @@
-package org.richfaces.realworld.util;
-
-import java.io.Serializable;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-@Name("selectedImageIndex")
-(a)Scope(ScopeType.CONVERSATION)
-public class SelectedImageIndex implements Serializable{
-
- private Integer selectedImageIndex = 1;
-
- public Integer getSelectedImageIndex() {
- return selectedImageIndex;
- }
-
- public void setSelectedImageIndex(Integer selectedImageIndex) {
- this.selectedImageIndex = selectedImageIndex;
- }
-}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -0,0 +1,53 @@
+/**
+ * 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.realworld.util;
+
+import java.io.Serializable;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("selectionHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class SelectionHelper implements Serializable{
+
+ private static final long serialVersionUID = 5656562187249324512L;
+ private Integer selectedImageIndex = 1;
+
+ private boolean userAlbumSelected = true;
+
+ public boolean isUserAlbumSelected() {
+ return userAlbumSelected;
+ }
+
+ public void setUserAlbumSelected(boolean userAlbumSelected) {
+ this.userAlbumSelected = userAlbumSelected;
+ }
+
+ public Integer getSelectedImageIndex() {
+ return selectedImageIndex;
+ }
+
+ public void setSelectedImageIndex(Integer selectedImageIndex) {
+ this.selectedImageIndex = selectedImageIndex;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SlideshowHelper.java 2008-12-20 15:58:34 UTC (rev 11950)
@@ -1,25 +0,0 @@
-package org.richfaces.realworld.util;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
-import org.richfaces.component.UIInputNumberSlider;
-
-@Name("slideshowHelper")
-(a)Scope(ScopeType.EVENT)
-public class SlideshowHelper {
-
- private UIInputNumberSlider inputSlider;
-
- public UIInputNumberSlider getInputSlider() {
- return inputSlider;
- }
-
- public void setInputSlider(UIInputNumberSlider inputSlider) {
- this.inputSlider = inputSlider;
- }
-
-
-}
Modified: trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2008-12-20 15:58:34 UTC (rev 11950)
@@ -91,6 +91,7 @@
error=Error
errorStub=Something bad happened :-(
fileUpload.header=You will upload files in album: #{selectedAlbum.name}. If you want upload in another album, select it.
+fileUpload.header2=Choose album:
fileUpload.uploadedPanelHeader=Uploaded Files Info
fileUpload.fileNameLabel=File Name:
fileUpload.fileLengthLabel=File Length(bytes):
@@ -100,4 +101,4 @@
fileUpload.clearLabel=Clear Uploaded Data
fileUpload.clearSelectedLabel=Clear Selected
-image.panelHeader=Image Preview: Selected Album: #{selectedAlbum.name}
\ No newline at end of file
+image.panelHeader=Image Preview\: Selected Album\: \#{selectedAlbum.name}
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/addComment.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/albumModalPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/confirmation.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/imagePrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/message.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml 2008-12-20 15:50:44 UTC (rev 11949)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml 2008-12-20 15:58:34 UTC (rev 11950)
@@ -78,7 +78,7 @@
<context-param>
<param-name>uploadRoot</param-name>
- <param-value>E:\Andrey\Upload\</param-value>
+ <param-value>E:\richfaces\test-applications\realworld\Upload\</param-value>
</context-param>
Modified: trunk/test-applications/realworld/web/src/main/webapp/fileUpload.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/navigation.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/readMessages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/tree.xhtml
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Rich Faces SVN: r11949 - in trunk/samples/modalpanel-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-20 10:50:44 -0500 (Sat, 20 Dec 2008)
New Revision: 11949
Added:
trunk/samples/modalpanel-sample/src/main/webapp/pages/rf-3856.jsp
Modified:
trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java
Log:
https://jira.jboss.org/jira/browse/RF-3856
Modified: trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java 2008-12-20 15:50:14 UTC (rev 11948)
+++ trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java 2008-12-20 15:50:44 UTC (rev 11949)
@@ -55,4 +55,26 @@
System.out.println(counter);
return counter;
}
+
+ private boolean checked;
+
+ public boolean isChecked() {
+ return checked;
+ }
+
+ public void setChecked(boolean checked) {
+ System.out.println("Bean.setChecked() " + checked);
+ this.checked = checked;
+ }
+
+ private String radio;
+
+ public String getRadio() {
+ return radio;
+ }
+
+ public void setRadio(String radio) {
+ System.out.println("Bean.setRadio() " + radio);
+ this.radio = radio;
+ }
}
\ No newline at end of file
Added: trunk/samples/modalpanel-sample/src/main/webapp/pages/rf-3856.jsp
===================================================================
--- trunk/samples/modalpanel-sample/src/main/webapp/pages/rf-3856.jsp (rev 0)
+++ trunk/samples/modalpanel-sample/src/main/webapp/pages/rf-3856.jsp 2008-12-20 15:50:44 UTC (rev 11949)
@@ -0,0 +1,69 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<!-- DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" -->
+
+<!-- !doctype html public "-//w3c//dtd html 4.0 transitional//en"-->
+
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/modal-panel"
+ prefix="mp"%>
+
+<html>
+<head>
+<title></title>
+
+<style type="text/css">
+.pointerCursor {
+ cursor: pointer;
+}
+</style>
+</head>
+<body style="text-align: center;">
+<f:view>
+
+ <mp:modalPanel style="border: 1px solid navy;" minHeight="100" top="10"
+ width="450" id="_panel" controlsClass="pointerCursor">
+ <f:facet name="header">
+ <f:verbatim>
+ Header
+ </f:verbatim>
+ </f:facet>
+
+ <f:facet name="controls">
+ <h:graphicImage value="/images/ico_close.gif"
+ onclick="Richfaces.hideModalPanel('_panel');" />
+ </f:facet>
+
+ <h:form id="_form">
+ <f:verbatim>
+ Modal panel is here!
+ </f:verbatim>
+
+ <h:panelGroup id="inputsGroup">
+
+ <h:selectBooleanCheckbox value="#{bean.checked}" />
+
+ <h:selectOneRadio value="#{bean.radio}">
+ <f:selectItem itemLabel="hp" itemValue="hp" />
+ <f:selectItem itemLabel="ibm" itemValue="ibm" />
+ <f:selectItem itemLabel="dell" itemValue="dell" />
+ </h:selectOneRadio>
+ </h:panelGroup>
+
+ <a4j:commandLink value="Update inputs" reRender="inputsGroup" />
+
+ </h:form>
+
+
+ </mp:modalPanel>
+ <f:verbatim>
+ <a href="javascript:Richfaces.showModalPanel('_panel');">Show</a>
+ </f:verbatim>
+
+</f:view>
+</body>
+</html>
16 years, 9 months
JBoss Rich Faces SVN: r11948 - trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-20 10:50:14 -0500 (Sat, 20 Dec 2008)
New Revision: 11948
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
https://jira.jboss.org/jira/browse/RF-3856
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-12-20 15:31:03 UTC (rev 11947)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-12-20 15:50:14 UTC (rev 11948)
@@ -161,6 +161,21 @@
this.selectBehavior = options.selectBehavior;
},
+ _saveInputValues: function(element) {
+ /* Fix for RF-3856 - Checkboxes in modal panel does not hold their states after modal was closed and opened again */
+ if (Prototype.Browser.IE /* reproducible for checkbox/radio in IE6, radio in IE 7/8 beta 2 */) {
+ var inputs = element.getElementsByTagName('input');
+ if (inputs) {
+ for (var i = 0; i < inputs.length; i++) {
+ var input = inputs[i];
+ if (input.type == 'checkbox' || input.type == 'radio') {
+ input.defaultChecked = input.checked;
+ }
+ }
+ }
+ }
+ },
+
width: function() {
return this.getSizedElement().clientWidth;
},
@@ -397,14 +412,11 @@
formElements: "|a|input|select|button|textarea|",
processAllFocusElements: function(root, callback) {
- if (root.nodeType==1) {
- var tagName = root.tagName.toLowerCase();
- if (root.focus &&
- // Many not visible elements have focus method, we is had to avoid processing them.
- this.formElements.indexOf(tagName)!=-1 &&
- !root.disabled && root.type!="hidden") {
- callback.call(this, root);
- }
+ if (root.focus && root.nodeType == 1 && root.tagName &&
+ // Many not visible elements have focus method, we is had to avoid processing them.
+ this.formElements.indexOf(root.tagName.toLowerCase())!=-1 &&
+ !root.disabled && root.type!="hidden") {
+ callback.call(this, root);
} else {
if (root != this.id) {
var child = root.firstChild;
@@ -477,6 +489,7 @@
if (!this.floatedToBody) {
this.parent = element.parentNode;
+ this._saveInputValues(element);
document.body.insertBefore(this.parent.removeChild(element), null);
this.floatedToBody = true;
}
@@ -719,7 +732,7 @@
Element.hide(element);
if (this.floatedToBody && this.parent) {
-
+ this._saveInputValues(element);
document.body.removeChild(element);
this.parent.appendChild(element);
this.floatedToBody = false;
16 years, 9 months
JBoss Rich Faces SVN: r11947 - trunk/samples/richfaces-demo/src/main/webapp/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-20 10:31:03 -0500 (Sat, 20 Dec 2008)
New Revision: 11947
Modified:
trunk/samples/richfaces-demo/src/main/webapp/scripts/picturesUtils.js
Log:
https://jira.jboss.org/jira/browse/RF-5430
Modified: trunk/samples/richfaces-demo/src/main/webapp/scripts/picturesUtils.js
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/scripts/picturesUtils.js 2008-12-20 15:26:47 UTC (rev 11946)
+++ trunk/samples/richfaces-demo/src/main/webapp/scripts/picturesUtils.js 2008-12-20 15:31:03 UTC (rev 11947)
@@ -4,7 +4,7 @@
var w = Math.round(pic.width * coeff);
var h = Math.round(pic.height * coeff);
- if (w > 1 && h > 1) {
+ if (w > 1 && h > 1 && h<1000 && w<1000) {
pic.width = w;
pic.heigth = h;
}
16 years, 9 months
JBoss Rich Faces SVN: r11946 - trunk/docs/common-resources/en/src/main/css.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-20 10:26:47 -0500 (Sat, 20 Dec 2008)
New Revision: 11946
Added:
trunk/docs/common-resources/en/src/main/css/html-common.css
Modified:
trunk/docs/common-resources/en/src/main/css/html-release.css
trunk/docs/common-resources/en/src/main/css/html.css
Log:
https://jira.jboss.org/jira/browse/RF-4107 - html-common.css was added
Added: trunk/docs/common-resources/en/src/main/css/html-common.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-common.css (rev 0)
+++ trunk/docs/common-resources/en/src/main/css/html-common.css 2008-12-20 15:26:47 UTC (rev 11946)
@@ -0,0 +1,261 @@
+@import url("jbossorg.css");
+
+.expand_collapse_toc {
+ float:left;
+ width:20px;
+ color:#6699CC;
+ cursor:pointer;
+}
+
+.toc dl dt span.chapter{
+ margin: 0px 0px 0px 20px;
+ padding: 0px;
+}
+
+h2.title a:hover, h3.title a:hover, h4.title a:hover, h5.title a:hover, h6.title a:hover {
+ text-decoration:underline;
+ color: #334D69;
+}
+
+h2.title a, h3.title a, h4.title a, h5.title a, h6.title a {
+ text-decoration:none;
+ color: #334D69;
+}
+
+
+div.chapter, div.section {
+ padding-top:3em;
+}
+
+div.book, div.chapter, div.section{
+ width:1000px;
+ margin:0 auto;
+ text-align:justify;
+ font-weight: 100;
+}
+
+div.abstract {
+font-size:10px;
+}
+
+.docnav li.previous strong, .docnav li.next strong {
+ width: 200px;
+ height:22px;
+}
+
+.docnav a:hover {
+ cursor:pointer;
+}
+th, td {
+ border: 1px solid #AAAAAA;
+}
+#title, ul.docnav{
+ margin:0 auto;
+ width:1000px;
+ margin-left:0px;
+}
+
+/* Center all images and Figure/Table titles */
+div.mediaobject img {margin:left;}
+
+p.title {
+ text-align:left;
+ font-size: 11px;
+}
+
+.css_normal {
+line-height:0px;
+color:#000000;
+}
+.css_colon {
+color:#000000;
+}
+.css_semi_colon {
+color:#000000;
+}
+.css_curly_brace {
+color:#000000;
+}
+.css_comment {
+color:#3F5FBF;
+background-color:rgb(247,247,247);
+}
+.css_error {
+color:#BF3F3F;
+}
+.css_selector {
+color:#3F7F7F;
+}
+.css_null {
+color:rgb(0,0,0);
+}
+.css_property_name {
+font-weight:bold;
+color:#7F007F;
+}
+.css_property_value {
+color:#2A00FF;
+}
+.css_uri {
+color:#2A00FF;
+}
+.css_atmark_rule {
+color:#3F7F7F;
+}
+.css_media {
+color:#2A00FF;
+}
+.css_string {
+color:#2A00FF;
+}
+code.code{
+color:#000000;
+font-size:14px;
+font-family:monospace;
+}
+
+.tbi {color: #aaaaaa;}
+.tbi p {color: #333333;}
+
+div.note, div.tip, div.important{
+ height:100%;
+}
+
+pre.JAVA {
+line-height:10px;
+!line-height:15px;
+}
+pre.CSS {
+line-height:10px;
+!line-height:15px;
+}
+div.table-contents table{
+ font-size:12px;
+}
+
+/* Feedback styles */
+
+* html div#feedback-wrapper {position: absolute;
+top:expression(eval(document.compatMode &&
+document.compatMode=='CSS1Compat') ?
+documentElement.scrollTop
++(documentElement.clientHeight-this.clientHeight)
+: document.body.scrollTop
++(document.body.clientHeight-this.clientHeight));}
+
+* html #feedback-maincontainer {position: absolute;
+top:expression(eval(document.compatMode &&
+document.compatMode=='CSS1Compat') ?
+documentElement.scrollTop
++(documentElement.clientHeight-this.clientHeight)
+: document.body.scrollTop
++(document.body.clientHeight-this.clientHeight));}
+
+#feedback-wrapper{
+ margin: 0px;
+ padding: 0px;
+ position:fixed;
+ bottom:0px;
+ right:0px;
+ height:322px;
+ width: 100px;
+ overflow: hidden;
+}
+
+#feedback-link{
+ float: left;
+ display: block;
+}
+
+
+#feedback-header{
+ background-color: #AAB3BD;
+ text-align: center;
+ color: white;
+ width: 100%;
+ font-weight: bold;
+ position: relative;
+ height: 20px;
+ padding: 0px;
+ margin:0px;
+}
+
+#feedback-close{
+ display:block;
+ position:absolute;
+ right:2px;
+ top:2px;
+ width:12px;
+ border: 0px;
+}
+
+#feedback-state{
+ font-weight: bold;
+ height: 20px;
+ width: 508px;
+ line-height: 20px;
+ overflow: hidden;
+}
+
+#feedback-maincontainer{
+ z-index:2000;
+ text-align: center;
+ background: #F5F5F5;
+ border: 1px solid #CCC;
+ position: fixed;
+ bottom: 0px;
+ right: 120px;
+}
+*html #feedback-maincontainer{
+ width: 520px;
+}
+
+#feedback-mailform{
+ margin: 0px 20px 0px 20px;
+ padding-bottom:5px;
+}
+
+*html #feedback-mailform{
+ margin: 0px 20px 0px 0px;
+ padding-bottom:5px;
+}
+
+.feedback-textbox-div{
+ font-weight: bold;
+ margin-bottom:5px;
+ text-align: right;
+ color: #415973;
+}
+
+#message{
+ width: 200px;
+ height: 150px;
+ padding: 2px;
+}
+
+.feedback-formbutton{
+ font-size: 12px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #415973;
+}
+
+.feedback-textbox, #message{
+ background-color:#FFFFFF;
+ border:1px solid #A5ACB2;
+ padding:2px 1px 3px 5px;
+ width: 400px;
+ font-size: 12px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #000;
+}
+
+.feedback-button-container{
+ margin: 0px 5px 0px 0px;
+}
+
+.feedback-images{
+ border:0;
+ margin:0;
+ display: inline;
+}
+
Property changes on: trunk/docs/common-resources/en/src/main/css/html-common.css
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/docs/common-resources/en/src/main/css/html-release.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-release.css 2008-12-20 15:18:24 UTC (rev 11945)
+++ trunk/docs/common-resources/en/src/main/css/html-release.css 2008-12-20 15:26:47 UTC (rev 11946)
@@ -1,17 +1,5 @@
-@import url("jbossorg.css");
+@import url("html-common.css");
-.expand_collapse_toc {
- float:left;
- width:20px;
- color:#6699CC;
- cursor:pointer;
-}
-
-.toc dl dt span.chapter{
- margin: 0px 0px 0px 20px;
- padding: 0px;
-}
-
body {
background-image:url(../images/community/bkg_gradient.gif);
background-repeat:repeat-x;
@@ -25,92 +13,6 @@
text-align:center;
}
-div.book, div.chapter, div.section{
- width:1000px;
- margin:0 auto;
- text-align:justify;
- font-weight: 100;
-}
-
-div.abstract {
-font-size:10px;
-}
-
-.docnav li.previous strong, .docnav li.next strong {
- width: 200px;
- height:22px;
-}
-
-.docnav a:hover {
- cursor:pointer;
-}
-th, td {
- border: 1px solid #AAAAAA;
-}
-#title, ul.docnav{
- margin:0 auto;
- width:1000px;
- margin-left:0px;
-}
-
-/* Center all images and Figure/Table titles */
-div.mediaobject img {margin:left;}
-
-p.title {
- text-align:left;
- font-size: 11px;
-}
-
-.css_normal {
-line-height:0px;
-color:#000000;
-}
-.css_colon {
-color:#000000;
-}
-.css_semi_colon {
-color:#000000;
-}
-.css_curly_brace {
-color:#000000;
-}
-.css_comment {
-color:#3F5FBF;
-background-color:rgb(247,247,247);
-}
-.css_error {
-color:#BF3F3F;
-}
-.css_selector {
-color:#3F7F7F;
-}
-.css_null {
-color:rgb(0,0,0);
-}
-.css_property_name {
-font-weight:bold;
-color:#7F007F;
-}
-.css_property_value {
-color:#2A00FF;
-}
-.css_uri {
-color:#2A00FF;
-}
-.css_atmark_rule {
-color:#3F7F7F;
-}
-.css_media {
-color:#2A00FF;
-}
-.css_string {
-color:#2A00FF;
-}
-code.code{
-color:#000000;
-font-size:14px;
-font-family:monospace;
-}
.new, .added {
background:transparent url(../images/new.png) no-repeat scroll right top;
padding-right:70px;
@@ -137,150 +39,5 @@
margin:0px;
}
h1.title {
-display:block;
-}
-
-.tbi {color: #aaaaaa;}
-.tbi p {color: #333333;}
-
-div.note, div.tip, div.important{
- height:100%;
-}
-
-pre.JAVA {
-line-height:10px;
-!line-height:15px;
-}
-pre.CSS {
-line-height:10px;
-!line-height:15px;
-}
-div.table-contents table{
- font-size:12px;
-}
-
-/* Feedback styles */
-
-* html div#feedback-wrapper {position: absolute;
-top:expression(eval(document.compatMode &&
-document.compatMode=='CSS1Compat') ?
-documentElement.scrollTop
-+(documentElement.clientHeight-this.clientHeight)
-: document.body.scrollTop
-+(document.body.clientHeight-this.clientHeight));}
-
-* html #feedback-maincontainer {position: absolute;
-top:expression(eval(document.compatMode &&
-document.compatMode=='CSS1Compat') ?
-documentElement.scrollTop
-+(documentElement.clientHeight-this.clientHeight)
-: document.body.scrollTop
-+(document.body.clientHeight-this.clientHeight));}
-
-#feedback-wrapper{
- margin: 0px;
- padding: 0px;
- position:fixed;
- bottom:0px;
- right:0px;
- height:322px;
- width: 100px;
- overflow: hidden;
-}
-
-#feedback-link{
- float: left;
- display: block;
-}
-
-
-#feedback-header{
- background-color: #AAB3BD;
- text-align: center;
- color: white;
- width: 100%;
- font-weight: bold;
- position: relative;
- height: 20px;
- padding: 0px;
- margin:0px;
-}
-
-#feedback-close{
display:block;
- position:absolute;
- right:2px;
- top:2px;
- width:12px;
- border: 0px;
-}
-
-#feedback-state{
- font-weight: bold;
- height: 20px;
- width: 508px;
- line-height: 20px;
- overflow: hidden;
-}
-
-#feedback-maincontainer{
- z-index:2000;
- text-align: center;
- background: #F5F5F5;
- border: 1px solid #CCC;
- position: fixed;
- bottom: 0px;
- right: 120px;
-}
-*html #feedback-maincontainer{
- width: 520px;
-}
-
-#feedback-mailform{
- margin: 0px 20px 0px 20px;
- padding-bottom:5px;
-}
-
-*html #feedback-mailform{
- margin: 0px 20px 0px 0px;
- padding-bottom:5px;
-}
-
-.feedback-textbox-div{
- font-weight: bold;
- margin-bottom:5px;
- text-align: right;
- color: #415973;
-}
-
-#message{
- width: 200px;
- height: 150px;
- padding: 2px;
-}
-
-.feedback-formbutton{
- font-size: 12px;
- font-family: Arial, Helvetica, sans-serif;
- color: #415973;
-}
-
-.feedback-textbox, #message{
- background-color:#FFFFFF;
- border:1px solid #A5ACB2;
- padding:2px 1px 3px 5px;
- width: 400px;
- font-size: 12px;
- font-family: Arial, Helvetica, sans-serif;
- color: #000;
-}
-
-.feedback-button-container{
- margin: 0px 5px 0px 0px;
-}
-
-.feedback-images{
- border:0;
- margin:0;
- display: inline;
-}
\ No newline at end of file
+}
Modified: trunk/docs/common-resources/en/src/main/css/html.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html.css 2008-12-20 15:18:24 UTC (rev 11945)
+++ trunk/docs/common-resources/en/src/main/css/html.css 2008-12-20 15:26:47 UTC (rev 11946)
@@ -1,17 +1,5 @@
-@import url("jbossorg.css");
+@import url("html-common.css");
-.expand_collapse_toc {
- float:left;
- width:20px;
- color:#6699CC;
- cursor:pointer;
-}
-
-.toc dl dt span.chapter{
- margin: 0px 0px 0px 20px;
- padding: 0px;
-}
-
body {
background-image:url(../images/richfaces_label2.png);
background-repeat:no-repeat;
@@ -37,249 +25,3 @@
left:0px;
z-index:-1;
}
-
-
-h2.title a:hover, h3.title a:hover, h4.title a:hover, h5.title a:hover, h6.title a:hover {
- text-decoration:underline;
-}
-
-h2.title a, h3.title a, h4.title a, h5.title a, h6.title a {
- text-decoration:none;
-}
-
-
-div.chapter, div.section {
- padding-top:3em;
-}
-
-div.book, div.chapter, div.section{
- width:1000px;
- margin:0 auto;
- text-align:justify;
- font-weight: 100;
-}
-
-div.abstract {
-font-size:10px;
-}
-
-.docnav li.previous strong, .docnav li.next strong {
- width: 200px;
- height:22px;
-}
-
-.docnav a:hover {
- cursor:pointer;
-}
-th, td {
- border: 1px solid #AAAAAA;
-}
-#title, ul.docnav{
- margin:0 auto;
- width:1000px;
- margin-left:0px;
-}
-
-/* Center all images and Figure/Table titles */
-div.mediaobject img {margin:left;}
-
-p.title {
- text-align:left;
- font-size: 11px;
-}
-
-.css_normal {
-line-height:0px;
-color:#000000;
-}
-.css_colon {
-color:#000000;
-}
-.css_semi_colon {
-color:#000000;
-}
-.css_curly_brace {
-color:#000000;
-}
-.css_comment {
-color:#3F5FBF;
-background-color:rgb(247,247,247);
-}
-.css_error {
-color:#BF3F3F;
-}
-.css_selector {
-color:#3F7F7F;
-}
-.css_null {
-color:rgb(0,0,0);
-}
-.css_property_name {
-font-weight:bold;
-color:#7F007F;
-}
-.css_property_value {
-color:#2A00FF;
-}
-.css_uri {
-color:#2A00FF;
-}
-.css_atmark_rule {
-color:#3F7F7F;
-}
-.css_media {
-color:#2A00FF;
-}
-.css_string {
-color:#2A00FF;
-}
-code.code{
-color:#000000;
-font-size:14px;
-font-family:monospace;
-}
-
-.tbi {color: #aaaaaa;}
-.tbi p {color: #333333;}
-
-div.note, div.tip, div.important{
- height:100%;
-}
-
-pre.JAVA {
-line-height:10px;
-!line-height:15px;
-}
-pre.CSS {
-line-height:10px;
-!line-height:15px;
-}
-div.table-contents table{
- font-size:12px;
-}
-
-/* Feedback styles */
-
-* html div#feedback-wrapper {position: absolute;
-top:expression(eval(document.compatMode &&
-document.compatMode=='CSS1Compat') ?
-documentElement.scrollTop
-+(documentElement.clientHeight-this.clientHeight)
-: document.body.scrollTop
-+(document.body.clientHeight-this.clientHeight));}
-
-* html #feedback-maincontainer {position: absolute;
-top:expression(eval(document.compatMode &&
-document.compatMode=='CSS1Compat') ?
-documentElement.scrollTop
-+(documentElement.clientHeight-this.clientHeight)
-: document.body.scrollTop
-+(document.body.clientHeight-this.clientHeight));}
-
-#feedback-wrapper{
- margin: 0px;
- padding: 0px;
- position:fixed;
- bottom:0px;
- right:0px;
- height:322px;
- width: 100px;
- overflow: hidden;
-}
-
-#feedback-link{
- float: left;
- display: block;
-}
-
-
-#feedback-header{
- background-color: #AAB3BD;
- text-align: center;
- color: white;
- width: 100%;
- font-weight: bold;
- position: relative;
- height: 20px;
- padding: 0px;
- margin:0px;
-}
-
-#feedback-close{
- display:block;
- position:absolute;
- right:2px;
- top:2px;
- width:12px;
- border: 0px;
-}
-
-#feedback-state{
- font-weight: bold;
- height: 20px;
- width: 508px;
- line-height: 20px;
- overflow: hidden;
-}
-
-#feedback-maincontainer{
- z-index:2000;
- text-align: center;
- background: #F5F5F5;
- border: 1px solid #CCC;
- position: fixed;
- bottom: 0px;
- right: 120px;
-}
-*html #feedback-maincontainer{
- width: 520px;
-}
-
-#feedback-mailform{
- margin: 0px 20px 0px 20px;
- padding-bottom:5px;
-}
-
-*html #feedback-mailform{
- margin: 0px 20px 0px 0px;
- padding-bottom:5px;
-}
-
-.feedback-textbox-div{
- font-weight: bold;
- margin-bottom:5px;
- text-align: right;
- color: #415973;
-}
-
-#message{
- width: 200px;
- height: 150px;
- padding: 2px;
-}
-
-.feedback-formbutton{
- font-size: 12px;
- font-family: Arial, Helvetica, sans-serif;
- color: #415973;
-}
-
-.feedback-textbox, #message{
- background-color:#FFFFFF;
- border:1px solid #A5ACB2;
- padding:2px 1px 3px 5px;
- width: 400px;
- font-size: 12px;
- font-family: Arial, Helvetica, sans-serif;
- color: #000;
-}
-
-.feedback-button-container{
- margin: 0px 5px 0px 0px;
-}
-
-.feedback-images{
- border:0;
- margin:0;
- display: inline;
-}
16 years, 9 months
JBoss Rich Faces SVN: r11945 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-20 10:18:24 -0500 (Sat, 20 Dec 2008)
New Revision: 11945
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/examples/diffTypes.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5424
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/examples/diffTypes.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/examples/diffTypes.xhtml 2008-12-20 14:43:54 UTC (rev 11944)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/examples/diffTypes.xhtml 2008-12-20 15:18:24 UTC (rev 11945)
@@ -12,7 +12,7 @@
width: 200px;
text-align:center;
}
- .cell {
+ .cell {
height:120px;
width: 220px;
vertical-align:top;
@@ -21,7 +21,7 @@
</style>
-<h:panelGrid columns="3" columnClasses="cell">
+<h:panelGrid columns="3" columnClasses="cell, cell, cell">
<rich:panel id="fadebox" styleClass="box">
<f:facet name="header">Fade Effect</f:facet>
16 years, 9 months
JBoss Rich Faces SVN: r11943 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-20 09:39:58 -0500 (Sat, 20 Dec 2008)
New Revision: 11943
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5436
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-12-20 14:33:52 UTC (rev 11942)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-12-20 14:39:58 UTC (rev 11943)
@@ -13,14 +13,10 @@
}
</style>
<h:form>
- <script type="text/javascript">
- function custom(){
- alert(1);
- }
- </script>
+
<h:panelGrid id="panel" columns="2" columnClasses="ecol1, ecol2">
<a4j:outputPanel id="calendar" layout="block">
- <rich:calendar value="#{calendarBean.selectedDate}" oncollapse="custom()"
+ <rich:calendar value="#{calendarBean.selectedDate}"
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
16 years, 9 months
JBoss Rich Faces SVN: r11942 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-20 09:33:52 -0500 (Sat, 20 Dec 2008)
New Revision: 11942
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-5214
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-20 14:10:39 UTC (rev 11941)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-12-20 14:33:52 UTC (rev 11942)
@@ -1165,6 +1165,11 @@
acceptedTypes: this.acceptedTypes,
noDuplicate: this.options.noDuplicate,
maxFiles: this.maxFileBatchSize });
+ if (Richfaces.browser.isIE)
+ {
+ this.flashComponent.style.width = this.currentInput.parentNode.style.width;
+ this.flashComponent.style.height = this.currentInput.parentNode.style.height;
+ }
this.enable();
},
16 years, 9 months
JBoss Rich Faces SVN: r11941 - in trunk/docs/cdkguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-20 09:10:39 -0500 (Sat, 20 Dec 2008)
New Revision: 11941
Removed:
trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - CDK Tags were deleted
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-20 13:41:18 UTC (rev 11940)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-12-20 14:10:39 UTC (rev 11941)
@@ -9,7 +9,6 @@
<!ENTITY overview SYSTEM "modules/overview.xml">
<!ENTITY devsample SYSTEM "modules/devsample.xml">
<!ENTITY ide SYSTEM "modules/ide.xml">
-<!ENTITY ref SYSTEM "modules/ref.xml">
<!ENTITY test SYSTEM "modules/test.xml">
@@ -197,7 +196,7 @@
<title>Button component development</title>
<para> Work in progress... </para>
- </chapter> &ide; &namingconv; &ref;
+ </chapter> &ide; &namingconv;
<chapter id="temptags" xreflabel="temptags">
<?dbhtml filename="temptags.html"?>
Deleted: trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml 2008-12-20 13:41:18 UTC (rev 11940)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/ref.xml 2008-12-20 14:10:39 UTC (rev 11941)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="ref" xreflabel="ref">
- <?dbhtml filename="ref.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>reference</keyword>
- <keyword>CDK</keyword>
- <keyword>Guide</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>CDK Tag Reference</title>
- <para>
- Work in progress...
- </para>
-
-</chapter>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r11940 - in trunk/docs/common-resources/en/src/main: script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-12-20 08:41:18 -0500 (Sat, 20 Dec 2008)
New Revision: 11940
Modified:
trunk/docs/common-resources/en/src/main/css/html.css
trunk/docs/common-resources/en/src/main/script/toggle.js
Log:
https://jira.jboss.org/jira/browse/RF-5429 - an anchors to titles were added
Modified: trunk/docs/common-resources/en/src/main/css/html.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html.css 2008-12-20 12:53:19 UTC (rev 11939)
+++ trunk/docs/common-resources/en/src/main/css/html.css 2008-12-20 13:41:18 UTC (rev 11940)
@@ -13,30 +13,45 @@
}
body {
-background-image:url(../images/richfaces_label2.png);
-background-repeat:no-repeat;
-background-attachment:fixed;
-background-position:top left;
-z-index:1;
-color:#333333;
-font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;
-font-size:12px;
-line-height:150%;
-max-width:1000px;
-padding:0em 2em;
-text-align:center;
+ background-image:url(../images/richfaces_label2.png);
+ background-repeat:no-repeat;
+ background-attachment:fixed;
+ background-position:top left;
+ z-index:1;
+ color:#333333;
+ font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;
+ font-size:12px;
+ line-height:150%;
+ max-width:1000px;
+ padding:0em 2em;
+ text-align:center;
}
div#overlay{
-background-image:url(../images/community/bkg_gradient.gif);
-background-repeat:repeat-x;
-width:100%;
-height:100%;
-position:absolute;
-top:0px;
-left:0px;
-z-index:-1;
-}
+ background-image:url(../images/community/bkg_gradient.gif);
+ background-repeat:repeat-x;
+ width:100%;
+ height:100%;
+ position:absolute;
+ top:0px;
+ left:0px;
+ z-index:-1;
+}
+
+
+h2.title a:hover, h3.title a:hover, h4.title a:hover, h5.title a:hover, h6.title a:hover {
+ text-decoration:underline;
+}
+
+h2.title a, h3.title a, h4.title a, h5.title a, h6.title a {
+ text-decoration:none;
+}
+
+
+div.chapter, div.section {
+ padding-top:3em;
+}
+
div.book, div.chapter, div.section{
width:1000px;
margin:0 auto;
@@ -267,4 +282,4 @@
border:0;
margin:0;
display: inline;
-}
\ No newline at end of file
+}
Modified: trunk/docs/common-resources/en/src/main/script/toggle.js
===================================================================
--- trunk/docs/common-resources/en/src/main/script/toggle.js 2008-12-20 12:53:19 UTC (rev 11939)
+++ trunk/docs/common-resources/en/src/main/script/toggle.js 2008-12-20 13:41:18 UTC (rev 11940)
@@ -14,6 +14,14 @@
var params='subject='+$F('subject')+'&message='+escape($F('message'))+'&name='+$F('name')+'&email='+$F('email')+'&path='+window.location;
var xmlobj=new Ajax.Updater('feedback-state','script/send_mail.php',{method:'get',parameters: params});
}
+
+Event.observe(window, 'load', function() {
+ var array = new Array();
+ array = $$('.title:not(h1) a');
+ for(i=0; i<array.length; i++){
+ array[i].setAttribute('href', window.location.toString().replace(/#[0-9A-Za-z_\-]*/, "")+"#"+$(array[i]).readAttribute('id'));
+ }
+});
function dbToggle(node, expandText, collapseText) {
var dt = node.parentNode;
@@ -57,4 +65,4 @@
show: function(node) {
node.style.display = "";
}
-};
\ No newline at end of file
+};
16 years, 9 months
JBoss Rich Faces SVN: r11939 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-12-20 07:53:19 -0500 (Sat, 20 Dec 2008)
New Revision: 11939
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-2648
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-20 12:02:26 UTC (rev 11938)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-20 12:53:19 UTC (rev 11939)
@@ -395,6 +395,10 @@
var toolTipX = x - offsets[0];
var toolTipY = y - offsets[1];
+
+ var scrollOffsets = Position.realOffset(this.layer);
+ toolTipX = toolTipX + scrollOffsets[0];
+ toolTipY = toolTipY + scrollOffsets[1];
var layerdim = Element.getDimensions(this.layer);
var layerLeft = toolTipX;
16 years, 9 months
JBoss Rich Faces SVN: r11938 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-20 07:02:26 -0500 (Sat, 20 Dec 2008)
New Revision: 11938
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-5284
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-20 12:02:04 UTC (rev 11937)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-12-20 12:02:26 UTC (rev 11938)
@@ -225,10 +225,10 @@
}
if (item.itemValue != this.value) {
this.startChangedState();
- if (this.tempValueKeeper != item.itemLabel) {
+ if (item.itemLabel && value != item.itemValue) {
this.tempValueKeeper.value = item.itemLabel;
+ this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
}
- this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", item.itemValue);
} else {
this.startViewState();
}
16 years, 9 months
JBoss Rich Faces SVN: r11937 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-20 07:02:04 -0500 (Sat, 20 Dec 2008)
New Revision: 11937
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
https://jira.jboss.org/jira/browse/RF-5284
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-12-20 10:51:28 UTC (rev 11936)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-12-20 12:02:04 UTC (rev 11937)
@@ -336,10 +336,11 @@
if (userValue != this.value) {
this.startChangedState();
- if (this.tempValueKeeper != userValue) {
+ if (value != userValue) {
this.tempValueKeeper.value = userValue;
+ this.invokeEvent(this.events.onchange, this.inplaceInput, "onchange", userValue);
}
- this.invokeEvent(this.events.onchange, this.inplaceInput, "onchange", userValue);
+
} else {
this.startViewState();
}
16 years, 9 months
JBoss Rich Faces SVN: r11936 - trunk/test-applications/jsp/src/main/webapp/tTree.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-12-20 05:51:28 -0500 (Sat, 20 Dec 2008)
New Revision: 11936
Modified:
trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp 2008-12-19 20:01:46 UTC (rev 11935)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTree.jsp 2008-12-20 10:51:28 UTC (rev 11936)
@@ -36,6 +36,7 @@
ajaxSubmitSelection="#{tTree.ajaxSubmitSelection}"
immediate="#{tTree.immediate}" rendered="#{tTree.rendered}"
reRender="reRenderID"
+ nodeFace="#{defTree.name == 'param-value' ? 'input' : 'text'}"
showConnectingLines="#{tTree.showConnectingLines}" focus="focusID"
nodeSelectListener="#{tTree.nodeSelectListener}"
toggleOnClick="#{tTree.toggleOnClick}"
@@ -54,14 +55,14 @@
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
- onselected="#{event.onselected}" >
+ onselected="#{event.onselected}">
- <rich:treeNode>
+ <rich:treeNode type="input">
<h:outputText value="#{defTree} : " />
<h:inputText value="#{defTree.name}" />
</rich:treeNode>
- <rich:treeNode>
+ <rich:treeNode type="text">
<h:outputText value="#{defTree}" />
</rich:treeNode>
</rich:tree>
Modified: trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp 2008-12-19 20:01:46 UTC (rev 11935)
+++ trunk/test-applications/jsp/src/main/webapp/tTree/tTreeStraightforward.jsp 2008-12-20 10:51:28 UTC (rev 11936)
@@ -69,7 +69,7 @@
<rich:tree id="leftTree" style="width:300px"
nodeSelectListener="#{tTreeDND.processLSelection}"
- reRender="selectedNodeL, leftContainer" ajaxSubmitSelection="true"
+ reRender="selectedNodeL" ajaxSubmitSelection="true"
switchType="client" value="#{tTreeDND.treeNodeLeft}"
changeExpandListener="#{tTreeDND.onExpand}"
binding="#{tTreeDND.leftTree}"
@@ -94,7 +94,7 @@
<rich:tree id="rightTree" style="width:300px"
nodeSelectListener="#{tTreeDND.processRSelection}"
- reRender="selectedNodeR,rightContainer" ajaxSubmitSelection="true"
+ reRender="selectedNodeR" ajaxSubmitSelection="true"
switchType="client" value="#{tTreeDND.treeNodeRight}"
changeExpandListener="#{tTreeDND.onExpand}"
binding="#{tTreeDND.rightTree}"
16 years, 9 months
JBoss Rich Faces SVN: r11935 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-19 15:01:46 -0500 (Fri, 19 Dec 2008)
New Revision: 11935
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-4592
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-19 19:56:06 UTC (rev 11934)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-12-19 20:01:46 UTC (rev 11935)
@@ -109,10 +109,12 @@
}
this.detectWidth();
var menu = $(menuName);
+ var eventResult = true;
+
RichFaces.Menu.fitLayerToContent(menu);
var visible = this.isVisible(menuName);
- this.setVisibility(menuName, visibleFlag);
- this.ieSelectWorkAround(menuName, visibleFlag);
+// this.setVisibility(menuName, visibleFlag);
+// this.ieSelectWorkAround(menuName, visibleFlag);
var menuLayer = this.layers[menu.id];
if (visible && !visibleFlag) {
@@ -121,7 +123,7 @@
menuLayer.eventOnClose(event);
}
if (menuLayer.eventOnCollapse) {
- menuLayer.eventOnCollapse(event);
+ eventResult = menuLayer.eventOnCollapse(event);
}
if (menuLayer.refItem) {
menuLayer.refItem.highLightGroup(false);
@@ -132,8 +134,9 @@
if (menuLayer.eventOnOpen) {
menuLayer.eventOnOpen(event);
}
+
if (menuLayer.eventOnExpand) {
- menuLayer.eventOnExpand(event);
+ eventResult = menuLayer.eventOnExpand(event);
}
if (menuLayer.level>0) {
@@ -147,6 +150,11 @@
}
}
}
+
+ if(eventResult != false) {
+ this.setVisibility(menuName, visibleFlag);
+ this.ieSelectWorkAround(menuName, visibleFlag);
+ }
},
initIFrame: function(layer) {
@@ -359,79 +367,79 @@
this.element = Event.element(e);
this.layer = $(layer);
this.show = function() {
- RichFaces.Menu.Layers.shutdown();
- var body = RichFaces.Menu.getPageDimensions();
- var win = RichFaces.Menu.getWindowDimensions();
- var bodyHeight = body.height;
- var bodyWidth = body.width;
-
- var layer_display = this.layer.style.display;
+ RichFaces.Menu.Layers.shutdown();
+ var body = RichFaces.Menu.getPageDimensions();
+ var win = RichFaces.Menu.getWindowDimensions();
+ var bodyHeight = body.height;
+ var bodyWidth = body.width;
+
+ var layer_display = this.layer.style.display;
if (layer_display=='none')
{
this.layer.style.visibility='hidden';
this.layer.style.display='';
}
-
- var clientX = this.event.clientX;
- var clientY = this.event.clientY;
-
+
+ var clientX = this.event.clientX;
+ var clientY = this.event.clientY;
+
var e = this.event;
var x = Event.pointerX(e);
var y = Event.pointerY(e);
var elementDim = Richfaces.Position.getOffsetDimensions(this.layer);
-
+
var offsets = Position.cumulativeOffset(this.layer);
-
+
offsets[0] -= this.layer.offsetLeft || 0;
offsets[1] -= this.layer.offsetTop || 0;
-
+
var toolTipX = x - offsets[0];
var toolTipY = y - offsets[1];
-
- var layerdim = Element.getDimensions(this.layer);
- var layerLeft = toolTipX;
-
- if (clientX + layerdim.width > win.width) {
- layerLeft -= (layerdim.width - RichFaces.Menu.Layers.shadowWidth - RichFaces.Menu.Layers.CornerRadius);
- }
-
- if (layerLeft < 0) {
- layerLeft = 0;
- }
-
- /*
- if (layerLeft + layerdim.width > bodyWidth) {
- layerLeft = bodyWidth - layerdim.width;
- }
-
- if (layerLeft < 0) {
- layerLeft = 0;
- }
- */
- var layerTop = toolTipY;
- /*if (layertop + layerdim.height > bodyHeight) {
- layertop = bodyHeight - layerdim.height;
- }
-
- if (layertop < 0) {
- layertop = 0;
- }
- */
- if (clientY + layerdim.height > win.height) {
- layerTop -= (layerdim.height - RichFaces.Menu.Layers.shadowWidth - RichFaces.Menu.Layers.CornerRadius);
- }
-
- if (layerTop < 0) {
- layerTop = 0;
- }
-
- this.layer.style.left = layerLeft + "px";
- this.layer.style.top = layerTop + "px";
-
+
+ var layerdim = Element.getDimensions(this.layer);
+ var layerLeft = toolTipX;
+
+ if (clientX + layerdim.width > win.width) {
+ layerLeft -= (layerdim.width - RichFaces.Menu.Layers.shadowWidth - RichFaces.Menu.Layers.CornerRadius);
+ }
+
+ if (layerLeft < 0) {
+ layerLeft = 0;
+ }
+
+ /*
+ if (layerLeft + layerdim.width > bodyWidth) {
+ layerLeft = bodyWidth - layerdim.width;
+ }
+
+ if (layerLeft < 0) {
+ layerLeft = 0;
+ }
+ */
+ var layerTop = toolTipY;
+ /*if (layertop + layerdim.height > bodyHeight) {
+ layertop = bodyHeight - layerdim.height;
+ }
+
+ if (layertop < 0) {
+ layertop = 0;
+ }
+ */
+ if (clientY + layerdim.height > win.height) {
+ layerTop -= (layerdim.height - RichFaces.Menu.Layers.shadowWidth - RichFaces.Menu.Layers.CornerRadius);
+ }
+
+ if (layerTop < 0) {
+ layerTop = 0;
+ }
+
+ this.layer.style.left = layerLeft + "px";
+ this.layer.style.top = layerTop + "px";
+
this.layer.style.display=layer_display;
this.layer.style.visibility='';
- RichFaces.Menu.Layers.LMPopUp(this.layer.id, false,e);
+ RichFaces.Menu.Layers.LMPopUp(this.layer.id, false,e);
RichFaces.Menu.Layers.clearLMTO();
}.bind(this);
}
@@ -1173,22 +1181,55 @@
asContextMenu: function(options){
this.highlightParent = false;
this.options = options || {};
+
if (this.options.ongroupactivate){
this.eventOnGroupActivate = this.options.ongroupactivate.bindAsEventListener(this);
}
+
if (this.options.onitemselect){
this.eventOnItemSelect = this.options.onitemselect.bindAsEventListener(this);
}
+// see RF-4592 for details
+// if (this.options.oncollapse){
+// this.eventOnCollapse = this.options.oncollapse.bindAsEventListener(this);
+// }
+
if (this.options.oncollapse){
- this.eventOnCollapse = this.options.oncollapse.bindAsEventListener(this);
+ this.eventOnCollapse = this.options.oncollapse.bindAsEventListener(this,"collapse");
}
- if (this.options.onexpand){
- this.eventOnExpand = this.options.onexpand.bindAsEventListener(this);
- }
-
+
+// if (this.options.onexpand){
+// this.eventOnExpand = this.options.onexpand.bindAsEventListener(this);
+// }
+
+ if (this.options.onexpand){
+ this.eventOnExpand = this.invokeEvent.bindAsEventListener(this,"expand");
+ }
+
//TODO: clarify
return this;
},
+
+ invokeEvent : function (event, eventName) {
+ var eventFunction = this.options['on'+eventName];
+ var result;
+
+ if (eventFunction) {
+ var eventObj;
+ if (event) {
+ eventObj = event;
+ } else if( document.createEventObject ) {
+ eventObj = document.createEventObject();
+ } else if( document.createEvent ) {
+ eventObj = document.createEvent('Events');
+ eventObj.initEvent(eventName, true, false );
+ }
+ result = eventFunction.call(eventObj);
+ }
+ if (result!=false) result = true;
+ return result;
+ },
+
eventJsToPrototype: function(evtName){
var indexof = evtName.indexOf('on');
if(indexof >= 0){
16 years, 9 months
JBoss Rich Faces SVN: r11934 - in trunk: extensions/gwt and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-19 14:56:06 -0500 (Fri, 19 Dec 2008)
New Revision: 11934
Modified:
trunk/cdk/generator/pom.xml
trunk/extensions/gwt/pom.xml
trunk/framework/jsf-test/pom.xml
trunk/framework/pom.xml
trunk/framework/test/pom.xml
trunk/samples/pom.xml
trunk/samples/richfaces-demo/pom.xml
trunk/samples/richfaces-ear-demo/webapp/pom.xml
trunk/samples/seamEAR/wars/seamWebapp/pom.xml
trunk/sandbox/samples/rex-demo/pom.xml
trunk/test-applications/ajaxTest/pom.xml
trunk/test-applications/seamApp/web/pom.xml
trunk/test-applications/seleniumTest/pom.xml
trunk/ui/pom.xml
Log:
JSF RI version updated to 1.2_11
Modified: trunk/cdk/generator/pom.xml
===================================================================
--- trunk/cdk/generator/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/cdk/generator/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -52,7 +52,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
Modified: trunk/extensions/gwt/pom.xml
===================================================================
--- trunk/extensions/gwt/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/extensions/gwt/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -120,12 +120,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
Modified: trunk/framework/jsf-test/pom.xml
===================================================================
--- trunk/framework/jsf-test/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/framework/jsf-test/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -25,7 +25,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -91,7 +91,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/framework/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -99,7 +99,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/framework/test/pom.xml
===================================================================
--- trunk/framework/test/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/framework/test/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -47,7 +47,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/samples/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -183,12 +183,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -238,12 +238,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -283,12 +283,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -337,13 +337,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: trunk/samples/richfaces-demo/pom.xml
===================================================================
--- trunk/samples/richfaces-demo/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/samples/richfaces-demo/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -184,12 +184,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency>
</dependencies>
@@ -280,12 +280,12 @@
<!-- dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency -->
</dependencies>
Modified: trunk/samples/richfaces-ear-demo/webapp/pom.xml
===================================================================
--- trunk/samples/richfaces-ear-demo/webapp/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/samples/richfaces-ear-demo/webapp/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -93,13 +93,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: trunk/samples/seamEAR/wars/seamWebapp/pom.xml
===================================================================
--- trunk/samples/seamEAR/wars/seamWebapp/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/samples/seamEAR/wars/seamWebapp/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -55,13 +55,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/sandbox/samples/rex-demo/pom.xml
===================================================================
--- trunk/sandbox/samples/rex-demo/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/sandbox/samples/rex-demo/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -163,12 +163,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Modified: trunk/test-applications/ajaxTest/pom.xml
===================================================================
--- trunk/test-applications/ajaxTest/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/test-applications/ajaxTest/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -94,12 +94,12 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/test-applications/seamApp/web/pom.xml
===================================================================
--- trunk/test-applications/seamApp/web/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/test-applications/seamApp/web/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -16,13 +16,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/test-applications/seleniumTest/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/test-applications/seleniumTest/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -222,7 +222,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
Modified: trunk/ui/pom.xml
===================================================================
--- trunk/ui/pom.xml 2008-12-19 19:53:01 UTC (rev 11933)
+++ trunk/ui/pom.xml 2008-12-19 19:56:06 UTC (rev 11934)
@@ -183,7 +183,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_10</version>
+ <version>1.2_11</version>
<scope>provided</scope>
</dependency>
</dependencies>
16 years, 9 months