JBoss Rich Faces SVN: r12013 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-12-24 11:40:12 -0500 (Wed, 24 Dec 2008)
New Revision: 12013
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
Log:
fix comboBox/inplaceSelect list
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-24 16:34:15 UTC (rev 12012)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxUtils.js 2008-12-24 16:40:12 UTC (rev 12013)
@@ -61,31 +61,18 @@
viewportheight = document.getElementsByTagName('body')[0].clientHeight;
}*/
- if( typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0 ) {
- return document.viewport.getDimensions().height + document.viewport.getScrollOffsets().top;
- } else {
-
- var scrollOffsets = 0;
- var innerHeight = 0;
-
- if(document.documentElement) {
- scrollOffsets += document.documentElement.scrollTop ? document.documentElement.scrollTop : 0 ;
- innerHeight += document.documentElement.clientHeigh ? document.documentElement.clientHeigh : 0 ;
- }
-
- if (document.body) {
- scrollOffsets += document.body.scrollTop ? document.body.scrollTop : 0;
- innerHeight += document.body.clientHeight ? document.body.clientHeight : 0;
- }
-
- scrollOffsets += window.pageYOffset;
- innerHeight += self.innerHeight;
-
- return innerHeight + scrollOffsets;
-
+ var viewportheight = 0;
+
+ // must be checked in the next prototype release version !!!
+ if(Richfaces.browser.isIE6) {
+ var height = (document.compatMode=='CSS1Compat') ? document.documentElement['clientHeight'] : document.body['clientHeigth'];
+ var scrollHeight = document.viewport.getScrollOffsets().top;
+ viewportheight = height + scrollHeight;
+ } else {
+ viewportheight = document.viewport.getDimensions().height + document.viewport.getScrollOffsets().top;
}
- //return viewportheight;
+ return viewportheight;
}
Richfaces.getScrollWidth = function(elem) {
16 years
JBoss Rich Faces SVN: r12012 - trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-24 11:34:15 -0500 (Wed, 24 Dec 2008)
New Revision: 12012
Modified:
trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-3418
Modified: trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java
===================================================================
--- trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java 2008-12-24 16:33:36 UTC (rev 12011)
+++ trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java 2008-12-24 16:34:15 UTC (rev 12012)
@@ -43,6 +43,7 @@
import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIContextMenu;
import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.component.util.MessageUtil;
import org.richfaces.renderkit.TemplateEncoderRendererBase;
import org.xml.sax.ContentHandler;
@@ -107,6 +108,7 @@
protected void doEncodeBegin(ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException {
ensureParentPresent(component);
+ checkAttachTimingValidity(context, component);
writer.startElement(HTML.DIV_ELEM, component);
writer.writeAttribute(HTML.id_ATTRIBUTE, component.getClientId(context), "id");
}
@@ -134,21 +136,18 @@
}
/**
- * Perform validation of the contextMenu configuration. Throws
- * FacesException in case validation fails.
+ * Perform validation of the contextMenu configuration.
*
- * @param clientId -
- * id of the component
- * @param name -
- * component name
- * @param attachTiming -
- * timing options
+ * @param component - menu component
*/
- protected void checkValidity(String clientId, String name, String attachTiming) {
+ protected void checkAttachTimingValidity(FacesContext context, UIComponent component) {
+ UIContextMenu menu = (UIContextMenu) component;
+ String attachTiming = menu.getAttachTiming();
if (!ON_LOAD.equals(attachTiming) && !IMMEDIATE.equals(attachTiming) && !ON_AVAILABLE.equals(attachTiming)) {
- throw new FacesException("The attachTiming attribute of the contextMenu (id='" + clientId
- + "') has an invalid value:'" + attachTiming + "'. It may have only the following values: '"
- + IMMEDIATE + "', '" + ON_LOAD + "', '" + ON_AVAILABLE + "'");
+ context.getExternalContext().log(attachTiming + " value of attachTiming attribute is not a legal one for component: "
+ + MessageUtil.getLabel(context, component)
+ + ". Default value was applied.");
+ menu.setAttachTiming(ON_AVAILABLE);
}
}
16 years
JBoss Rich Faces SVN: r12011 - trunk/ui/calendar/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-24 11:33:36 -0500 (Wed, 24 Dec 2008)
New Revision: 12011
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
Log:
https://jira.jboss.org/jira/browse/RF-4005
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-12-24 16:03:34 UTC (rev 12010)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-12-24 16:33:36 UTC (rev 12011)
@@ -54,6 +54,7 @@
import org.ajax4jsf.event.AjaxEvent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.richfaces.component.util.MessageUtil;
import org.richfaces.event.CurrentDateChangeEvent;
import org.richfaces.event.CurrentDateChangeListener;
import org.richfaces.model.CalendarDataModel;
@@ -787,20 +788,27 @@
* @return firstWeekDay value from local variable or value bindings
*/
public int getFirstWeekDay( ){
- if(this._firstWeekDaySet){
- return this._firstWeekDay;
- }
- ValueExpression ve = getValueExpression("firstWeekDay");
- if (ve != null) {
-
- Integer value = (Integer) ve.getValue(getFacesContext().getELContext());
- if (null == value) {
- return getDefaultFirstWeekDay();
+ int result;
+ if (this._firstWeekDaySet) {
+ result = this._firstWeekDay;
+ }else{
+ ValueExpression ve = getValueExpression("firstWeekDay");
+ if (ve != null) {
+
+ Integer value = (Integer) ve.getValue(getFacesContext().getELContext());
+ result = (value.intValue());
+ } else {
+ result = getDefaultFirstWeekDay();
}
- return (value.intValue());
- } else {
- return getDefaultFirstWeekDay();
}
+ if (result < 0 || result > 6) {
+ getFacesContext().getExternalContext()
+ .log(result + " value of firstWeekDay attribute is not a legal one for component: "
+ + MessageUtil.getLabel(getFacesContext(), this)
+ + ". Default value was applied.");
+ result = getDefaultFirstWeekDay();
+ }
+ return result;
}
public Object saveState(FacesContext context) {
16 years
JBoss Rich Faces SVN: r12010 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-12-24 11:03:34 -0500 (Wed, 24 Dec 2008)
New Revision: 12010
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
//https://jira.jboss.org/jira/browse/RF-4050
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-24 15:56:36 UTC (rev 12009)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-24 16:03:34 UTC (rev 12010)
@@ -192,7 +192,8 @@
},
listMousedownHandler : function(event) {
- if (Prototype.Browser.IE) {
+ //https://jira.jboss.org/jira/browse/RF-4050
+ if (!Prototype.Browser.Firefox) {
if (!Element.match(event.target,"span")) {
this.clickOnScroll = true;
}
@@ -201,12 +202,13 @@
},
listMouseUpHandler : function(e) {
- if (window.getSelection) {
- if (window.getSelection().getRangeAt(0).toString() != '') {
+ //https://jira.jboss.org/jira/browse/RF-4050
+ //if (window.getSelection) {
+ //if (window.getSelection().getRangeAt(0).toString() != '') {
this.field.focus();
this.comboList.isList = false;
- }
- }
+ //}
+ //}
},
listClickHandler : function(event) {
16 years
JBoss Rich Faces SVN: r12009 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-12-24 10:56:36 -0500 (Wed, 24 Dec 2008)
New Revision: 12009
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/css/common.css
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
trunk/samples/richfaces-demo/src/main/webapp/welcome.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-5466
https://jira.jboss.org/jira/browse/RF-4910
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java 2008-12-24 15:56:36 UTC (rev 12009)
@@ -25,8 +25,18 @@
private boolean current;
private String activeTab;
+
+ private boolean newComponent;
+
+ public boolean isNewComponent() {
+ return newComponent;
+ }
- public ComponentDescriptor() {
+ public void setNewComponent(boolean newComponent) {
+ this.newComponent = newComponent;
+ }
+
+ public ComponentDescriptor() {
this.id = "";
this.name = "";
this.captionImage = "";
@@ -36,6 +46,7 @@
this.javaDocLocation = "";
this.current = false;
this.activeTab = "usage";
+ this.newComponent=false;
}
public String getCaptionImage() {
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-12-24 15:56:36 UTC (rev 12009)
@@ -221,6 +221,10 @@
desc.setTldDocLocation(toc.nextToken().trim());
desc.setJavaDocLocation(toc.nextToken().trim());
desc.setDemoLocation(toc.nextToken().trim());
+ if (toc.hasMoreElements())
+ if ("new".equals(toc.nextToken().trim()))
+ desc.setNewComponent(true);
+ else desc.setNewComponent(false);
temp.add(desc);
}
Collections.sort(temp, new Comparator() {
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-12-24 15:56:36 UTC (rev 12009)
@@ -7,7 +7,7 @@
inputNumberSlider= richInputs, Input Number Slider, /images/ico_DataFilterSlider.gif, /images/cn_slider.gif, inputNumberSlider.html, jbossrichfaces/freezone/docs/tlddoc/rich/inputNumberSlider.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInputNumberSlider.html, /richfaces/inputNumberSlider.jsf
inputNumberSpinner= richInputs, Input Number Spinner, /images/ico_spinner.gif, /images/cn_spinner.gif, inputNumberSpinner.html, jbossrichfaces/freezone/docs/tlddoc/rich/inputNumberSpinner.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInputNumberSpinner.html, /richfaces/inputNumberSpinner.jsf
dataFilterSlider= richDataIterators, Data Filter Slider, /images/ico_DataFilterSlider.gif, /images/cn_DataFilterSlider.gif, dataFilterSlider.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataFilterSlider.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataFltrSlider.html, /richfaces/dataFilterSlider.jsf
-dataTable= richDataIterators, Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, dataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/dataTable.jsf
+dataTable=richDataIterators, Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, dataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/dataTable.jsf,new
column= richDataIterators, Column, /images/ico_Column.gif, /images/cn_Column.gif, column.html, jbossrichfaces/freezone/docs/tlddoc/rich/column.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumn.html, /richfaces/dataTable.jsf
columnGroup= richDataIterators, Column Group, /images/ico_ColumnGroup.gif, /images/cn_ColumnGroup.gif, columnGroup.html, jbossrichfaces/freezone/docs/tlddoc/rich/columnGroup.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumnGroup.html, /richfaces/dataTable.jsf
dataDefinitionList= richDataIterators, Data Definition List, /images/ico_DataDefinitionList.gif, /images/cn_DataDefinitionList.gif, dataDefinitionList.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataDefinitionList.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataDefinitionList.html, /richfaces/dataLists.jsf
@@ -48,7 +48,7 @@
commandButton= ajaxSupport, Command Button, /images/ico_common.gif, /images/cn_commandButton.gif, commandButton.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandButton.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandButton.html, /richfaces/commandButton.jsf
commandLink= ajaxSupport, Command Link, /images/ico_common.gif, /images/cn_commandLink.gif, commandLink.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandLink.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandLink.html, /richfaces/commandLink.jsf
form= ajaxSupport, Ajax Form, /images/ico_common.gif, /images/cn_ajaxForm.gif, form.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/form.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxForm.html, /richfaces/form.jsf
-support= ajaxSupport, Ajax Support, /images/ico_common.gif, /images/cn_ajaxSupport.gif, support.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/support.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxSupport.html, /richfaces/support.jsf
+support= ajaxSupport, Ajax Support, /images/ico_common.gif, /images/cn_ajaxSupport.gif, support.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/support.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxSupport.html, /richfaces/support.jsf, new
jsFunction= ajaxSupport, JS Function, /images/ico_common.gif, /images/cn_jsFunction.gif, jsFunction.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/jsFunction.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxFunction.html, /richfaces/jsFunction.jsf
poll= ajaxSupport, Poll, /images/ico_common.gif, /images/cn_poll.gif, poll.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/poll.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPoll.html, /richfaces/poll.jsf
push= ajaxSupport, Push, /images/ico_common.gif, /images/cn_push.gif, push.html, jbossajax4jsf/freezone/docs/tlddoc/a4j/push.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPush.html, /richfaces/push.jsf
@@ -89,5 +89,5 @@
graphValidator=richValidators, \t Graph Validator, \t\t/images/ico_GraphValidator.gif, \t\t/images/cn_GraphValidator.gif, graphValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/graphValidator.jsf
stateAPI=richMisc, \t State Manager API, \t\t/images/ico_StateManagerAPI.gif, \t\t/images/cn_StateManagerAPI.gif, ArchitectureOverview.html\#statemanagerapi, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
extendedDataTable= richDataIterators, Extended Data Table, /images/ico_ExtendedDataTable.gif, /images/cn_ExtendedDataTable.gif, extendedDataTable.html, jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDataTable.html, /richfaces/extendedDataTable.jsf
-editor= richInputs, Editor, /images/ico_Editor.gif, /images/cn_Editor.gif, editor.html, jbossrichfaces/freezone/docs/tlddoc/rich/editor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEditor.html, /richfaces/editor.jsf
-queue= ajaxSupport, Queue, /images/ico_common.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf
+editor=richInputs, Editor, /images/ico_Editor.gif, /images/cn_Editor.gif, editor.html, jbossrichfaces/freezone/docs/tlddoc/rich/editor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEditor.html, /richfaces/editor.jsf, new
+queue=ajaxSupport, Queue, /images/ico_common.gif, /images/cn_Queue.gif, Queue.html, jbossrichfaces/freezone/docs/tlddoc/rich/queue.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIQueue.html, /richfaces/queue.jsf, new
Modified: trunk/samples/richfaces-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2008-12-24 15:56:36 UTC (rev 12009)
@@ -223,6 +223,9 @@
background-color : #ACBECE;
padding-left : 10px
}
+.panel_menu table * .bold{
+ font-weight:bold;
+}
.panel_menu table .unactive .text{
font-family : verdana;
font-size : 11px;
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml 2008-12-24 15:56:36 UTC (rev 12009)
@@ -77,7 +77,7 @@
</a4j:region>
</h:form>
- <rich:modalPanel id="editPanel" autosized="true">
+ <rich:modalPanel id="editPanel" autosized="true" width="450">
<f:facet name="header">
<h:outputText value="Edit Current Car" />
</f:facet>
@@ -90,20 +90,23 @@
</h:panelGroup>
</f:facet>
<h:form>
+ <h:panelGrid columns="1">
<a4j:outputPanel ajaxRendered="true">
<h:panelGrid columns="2">
- <h:outputText value="Make" />
+ <h:outputText value="Make"/>
<h:inputText value="#{dataTableScrollerBean.currentItem.make}" />
<h:outputText value="Model" />
<h:inputText value="#{dataTableScrollerBean.currentItem.model}" />
<h:outputText value="Price" />
- <h:inputText value="#{dataTableScrollerBean.currentItem.price}" />
+ <h:inputText value="#{dataTableScrollerBean.currentItem.price}" label="Price"/>
</h:panelGrid>
+ <rich:message showSummary="true" showDetail="false" for="price"/>
</a4j:outputPanel>
<a4j:commandButton value="Store"
action="#{dataTableScrollerBean.store}"
reRender="make, model, price"
- oncomplete="#{rich:component('editPanel')}.hide();" />
+ oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />
+ </h:panelGrid>
</h:form>
</rich:modalPanel>
<rich:modalPanel id="deletePanel" autosized="true">
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2008-12-24 15:56:36 UTC (rev 12009)
@@ -10,7 +10,7 @@
<a4j:repeat var="component" value="#{components}">
<tr class="#{component.current?'active':'unactive'}" onmouseover="this.className='active'" onmouseout="this.className='#{component.current?'active':'unactive'}'">
<td class="ico"><h:graphicImage value="#{component.iconImage}" width="16" height="16" alt="" border="0" /></td>
- <td class="text" width="100%">
+ <td class="text #{component.newComponent?'bold':''}" width="100%">
<h:outputLink style="display:block;height:20px" value="#{component.contextRelativeDemoLocation}">
<span style="display:block;padding-top:3px;text-decoration : none; color : #000000;">
#{component.name}
Modified: trunk/samples/richfaces-demo/src/main/webapp/welcome.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/welcome.xhtml 2008-12-24 15:50:48 UTC (rev 12008)
+++ trunk/samples/richfaces-demo/src/main/webapp/welcome.xhtml 2008-12-24 15:56:36 UTC (rev 12009)
@@ -24,6 +24,10 @@
or component set selected in the left-hand sidebar, you can see it in action. Also, you can immediately see the effect of predefined
skins on the application whole look-and-feel.
</p>
+ <p class="note">
+ Components which names marked with bold text in left-hand sidebar was introduced
+ in latest official GA or the component page has new examples inside.
+ </p>
</ui:define>
</ui:composition>
</html>
16 years
JBoss Rich Faces SVN: r12008 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-12-24 10:50:48 -0500 (Wed, 24 Dec 2008)
New Revision: 12008
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-3019
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-12-24 15:11:51 UTC (rev 12007)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-12-24 15:50:48 UTC (rev 12008)
@@ -44,6 +44,7 @@
import org.richfaces.component.Column;
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
+import org.richfaces.component.util.FormUtil;
import org.richfaces.component.util.ViewUtil;
import org.richfaces.model.Ordering;
import org.richfaces.renderkit.html.iconimages.DataTableIconSortAsc;
@@ -150,7 +151,14 @@
ResponseWriter writer = context.getResponseWriter();
UIComponent header = table.getHeader();
boolean columnFacetPresent = isColumnFacetPresent(table, "header");
- boolean isFilterByPresent = isHeaderFactoryColumnAttributePresent(table, "filterBy");
+ boolean isFilterByPresent = isHeaderFactoryColumnAttributePresent(table, "filterBy");
+ boolean isSortingPresent = isHeaderFactoryColumnAttributePresent(table, "sortBy")
+ || isHeaderFactoryColumnAttributePresent(table, "comparator");
+
+ if (isFilterByPresent || isSortingPresent) {
+ FormUtil.throwEnclFormReqExceptionIfNeed(context, table);
+ }
+
Iterator<UIComponent> colums = table.columns();
16 years
JBoss Rich Faces SVN: r12007 - in trunk/ui: editor/src/main/config/component and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-24 10:11:51 -0500 (Wed, 24 Dec 2008)
New Revision: 12007
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
trunk/ui/editor/src/main/config/component/editor.xml
trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/orderingList/src/main/config/component/orderinglist.xml
trunk/ui/pickList/src/main/config/component/picklist.xml
Log:
https://jira.jboss.org/jira/browse/RF-5294
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -273,6 +273,11 @@
replacing any message that comes from the validator
</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
&html_input_attributes;
Modified: trunk/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/ui/editor/src/main/config/component/editor.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/editor/src/main/config/component/editor.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -192,5 +192,10 @@
</description>
<defaultvalue>"modal"</defaultvalue>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</component>
</components>
Modified: trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -267,7 +267,13 @@
A ValueExpression enabled attribute that, if present, will be used as the text of the validator message, replacing any message that comes from the validator
</description>
</property>
- &html_events;
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
+
+ &html_events;
&ui_input_attributes;
<property hidden="true">
<name>localValueSet</name>
Modified: trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -367,6 +367,11 @@
<name>valid</name>
<classname>boolean</classname>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</properties>
</component>
</components>
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -509,5 +509,10 @@
<description>CSS class for remove control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</component>
</components>
Modified: trunk/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -327,5 +327,10 @@
Stores active item
</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</component>
</components>
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2008-12-24 13:16:45 UTC (rev 12006)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2008-12-24 15:11:51 UTC (rev 12007)
@@ -232,6 +232,11 @@
<description>HTML: script expression; the element lost the focus</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</properties>
</component>
16 years
JBoss Rich Faces SVN: r12006 - 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-24 08:16:45 -0500 (Wed, 24 Dec 2008)
New Revision: 12006
Removed:
trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml
Modified:
trunk/docs/migrationguide/en/src/main/docbook/included/dataTableAjax.xml
trunk/docs/migrationguide/en/src/main/docbook/master.xml
Log:
RF-3048 - Migration issues were added
Deleted: trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml 2008-12-24 12:17:19 UTC (rev 12005)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/asClientId.xml 2008-12-24 13:16:45 UTC (rev 12006)
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section id="asClientId" role="new">
- <?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>
Modified: trunk/docs/migrationguide/en/src/main/docbook/included/dataTableAjax.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/dataTableAjax.xml 2008-12-24 12:17:19 UTC (rev 12005)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/dataTableAjax.xml 2008-12-24 13:16:45 UTC (rev 12006)
@@ -7,13 +7,13 @@
<keyword>ajax</keyword>
</keywordset>
</sectioninfo>
- <title>Ajax request calls encode() method of <rich:dataTable> even if it is not necessary</title>
+ <title>Ajax request calls encode() methods of <rich:dataTable> even if it is not necessary</title>
<section>
<title>Description</title>
<para>
Any Ajax request reloads the list that is related to the <emphasis role="bold"><property><rich:dataTable></property></emphasis> component even if the Ajax request is related to another bean.
-It happens because the Ajax request checks whether the <emphasis role="bold"><property><rich:dataTable></property></emphasis> has nested <emphasis role="bold"><property><h:outputPanel></property></emphasis> or <emphasis role="bold"><property><h:messages></property></emphasis> components that should be updated.
-If there are no <emphasis role="bold"><property><h:outputPanel></property></emphasis>, <emphasis role="bold"><property><h:messages></property></emphasis> components inside the <emphasis role="bold"><property><rich:dataTable></property></emphasis> is not updated, but anyway the <code>encode()</code> method is called by the Ajax request.
+It happens because the Ajax request checks whether the <emphasis role="bold"><property><rich:dataTable></property></emphasis> has nested <emphasis role="bold"><property><rich:outputPanel></property></emphasis> or <emphasis role="bold"><property><rich:messages></property></emphasis> components that should be updated.
+If there are no <emphasis role="bold"><property><rich:outputPanel></property></emphasis>, <emphasis role="bold"><property><rich:messages></property></emphasis> components inside the <emphasis role="bold"><property><rich:dataTable></property></emphasis> will not be updated, but anyway the <code>encode()</code> methods is called by the Ajax request.
</para>
</section>
<section>
Deleted: trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml 2008-12-24 12:17:19 UTC (rev 12005)
+++ trunk/docs/migrationguide/en/src/main/docbook/included/panelGridClass.xml 2008-12-24 13:16:45 UTC (rev 12006)
@@ -1,51 +0,0 @@
-<?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>
Modified: trunk/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-24 12:17:19 UTC (rev 12005)
+++ trunk/docs/migrationguide/en/src/main/docbook/master.xml 2008-12-24 13:16:45 UTC (rev 12006)
@@ -21,8 +21,7 @@
<!ENTITY myfaces SYSTEM "included/myfaces.xml">
<!ENTITY seamMultipartFilter SYSTEM "included/seamMultipartFilter.xml">
- <!ENTITY asClientId SYSTEM "included/asClientId.xml">
- <!ENTITY panelGridClass SYSTEM "included/panelGridClass.xml">
+
<!ENTITY dataTableAjax SYSTEM "included/dataTableAjax.xml">
]>
@@ -141,36 +140,8 @@
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;
+
+
&dataTableAjax;
- </section>
- <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>
16 years
JBoss Rich Faces SVN: r12005 - in trunk/test-applications/realworld: ejb/src/main/java/org/richfaces/realworld/service and 14 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-12-24 07:17:19 -0500 (Wed, 24 Dec 2008)
New Revision: 12005
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
trunk/test-applications/realworld/web/src/main/webapp/includes/
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/
Removed:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/session/
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/albumModalPanel-taglib.xml
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/imagePrefs.xhtml
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/search.xhtml
trunk/test-applications/realworld/web/src/main/webapp/tree.xhtml
trunk/test-applications/realworld/web/src/main/webapp/userPrefs.xhtml
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/Image.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/MessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
trunk/test-applications/realworld/ejb/src/main/resources/import.sql
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/ImageLoader.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/tree/TreeImageItem.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/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/FriendHelper.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/SelectionHelper.java
trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
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/message.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/template.xhtml
trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
Log:
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -97,17 +97,6 @@
*/
public Album() {
}
-
- /**
- * Constructor
- *
- * @param name - name of album
- * @param parent - link for parent album
- */
- public Album(String name) {
- this.name = name;
- //this.parent = parent;
- }
// ********************** Accessor Methods ********************** //
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -18,8 +18,6 @@
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;
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -19,9 +19,6 @@
@In @Out
private User user;
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IAlbumAction#addAlbum()
- */
public void addAlbum(Album album) {
if(album.getChangedName() != album.getName()){
album.setName(album.getChangedName());
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -16,9 +16,6 @@
@In(value="entityManager")
EntityManager em;
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IMessageAction#sendMessage(org.richfaces.realworld.domain.Message)
- */
public void sendMessage(Message message){
if(message.getOwnerLogin() != null){
User user = (User)em.createQuery("from User u where u.login = :login")
@@ -34,9 +31,6 @@
em.flush();
}
- /* (non-Javadoc)
- * @see org.richfaces.realworld.service.IMessageAction#deleteMessage(org.richfaces.realworld.domain.Message)
- */
public void deleteMessage(Message message){
em.remove(message);
message.getOwner().removeMessage(message);
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -37,19 +37,19 @@
public List<Image> searchImages(String searchPattern, String additionalParams, Map<String, Object> paramMap){
String fullQuery = SEARCH_QUERY_BEGIN + additionalParams + SEARCH_QUERY_END;
Query prepared = prepareQuery(fullQuery, searchPattern, additionalParams, paramMap);
- return initImages(prepared);
+ return prepared.getResultList();
}
public List<Image> popularImages(String additionalParams, Map<String, Object> paramMap){
String fullQuery = SEARCH_RELEVANT_QUERY_BEGIN + additionalParams + SEARCH_POPULAR_QUERY_END;
Query prepared = prepareQuery(fullQuery, null, additionalParams, paramMap);
- return initImages(prepared);
+ return prepared.getResultList();
}
public List<Image> worstImages(String additionalParams, Map<String, Object> paramMap){
String fullQuery = SEARCH_RELEVANT_QUERY_BEGIN + additionalParams + SEARCH_UNPOPULAR_QUERY_END;
Query prepared = prepareQuery(fullQuery, null, additionalParams, paramMap);
- return initImages(prepared);
+ return prepared.getResultList();
}
private Query prepareQuery(String fullQuery ,String searchPattern, String additionalParams,
@@ -70,12 +70,4 @@
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;
- }
}
Modified: trunk/test-applications/realworld/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2008-12-24 12:17:19 UTC (rev 12005)
@@ -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, 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 images(image_id, name, path, description, created, img_album_id, rank_id) VALUES (1, 'Aston Martin', 'amarkhel/Cars/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', 'amarkhel/Cars/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', 'amarkhel/Cars/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', 'amarkhel/Cars/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', 'amarkhel/Cars/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)', 'amarkhel/Cars/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', 'amarkhel/Cars/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', 'amarkhel/Tetki/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', 'amarkhel/Tetki/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', 'amarkhel/Tetki/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', 'amarkhel/Tetki/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', 'amarkhel/Tetki/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', 'root/Football/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!!!', 'root/Football/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', 'root/Football/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', 'root/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', 'root/Football/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Japan/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', 'qqqq/Music/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', 'qqqq/Music/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', 'qqqq/Music/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', 'qqqq/Music/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', 'qqqq/Music/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', 'qqqq/Music/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', 'qqqq/Music/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);
@@ -94,7 +94,7 @@
INSERT INTO comments(comment_id, date, message, image_comment_id, from_user_id) VALUES (2, '1985-01-08', 'Hello I am user2', 1, 3);
INSERT INTO messages(message_id, date, message, author_id, owner_id, readed, theme, friendshipRequest) VALUES (1, '1985-01-08', 'Hello I am user', 2, 1, false, 'Hello, amarkhel', false);
INSERT INTO messages(message_id, date, message, author_id, owner_id, readed, theme, friendshipRequest) VALUES (2, '1985-01-08', 'Please, add meto your friends', 3, 1, false, 'Request for friendship', true);
-INSERT INTO shared_albums(album_id, user_id) VALUES(1, 1);
-INSERT INTO shared_albums(album_id, user_id) VALUES(2, 1);
+INSERT INTO shared_albums(album_id, user_id) VALUES(4, 1);
+INSERT INTO shared_albums(album_id, user_id) VALUES(5, 1);
INSERT INTO user_friends(user1_id, user2_id) VALUES(1, 2);
INSERT INTO friendship_requests(REQUEST_ID, USER_ID, FRIEND_ID) VALUES(1, 3, 1);
\ No newline at end of file
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -73,14 +73,14 @@
}
}
- public void renameDirectory(String directoryOld, String directoryNew) throws Exception {
+ public void renameDirectory(String directoryOld, String directoryNew){
String fullPath = getAbsolutePath(directoryOld);
File fileOld = new File(fullPath);
File fileNew = new File(getUploadRoot() + directoryNew);
createDirectoryIfNotExist(directoryNew);
if(fileNew.exists())
if( fileNew.isDirectory() ){
- throw new Exception("exc");
+ //throw new Exception("exc");
}else{
fileNew.delete();
}
@@ -159,4 +159,15 @@
private String getAbsolutePath(String fileName) {
return getUploadRoot() + fileName;
}
+
+ public String transformToServerPath(String filename){
+ String[] res = filename.split("/");
+ StringBuilder sb = new StringBuilder();
+ sb.append(res[0]);
+ for(int i = 1; i < res.length; i++){
+ sb.append(this.getFileSeparator() + res[i]);
+ }
+ String string = sb.toString();
+ return string;
+ }
}
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -35,9 +35,9 @@
import org.jboss.seam.core.Events;
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.util.SelectionHelper;
/**
* @author $Autor$
@@ -48,9 +48,9 @@
public class FileUploadBean implements Serializable{
- private static final String SAMPLE_NAME = "Sample Name";
+ @In("#{messages['samplename']}") private String SAMPLE_NAME;
- private static final String SAMPLE_DESCRIPTION = "Sample Description";
+ @In("#{messages['sampledesc']}") private String SAMPLE_DESCRIPTION;
private static final String ADD_IMAGE_EVENT = "addImage";
@@ -61,12 +61,12 @@
@In(create=true) @Out
FileWrapper fileWrapper;
-
- @In(required=false)
- private Album selectedAlbum;
@In(create=true)
private FileManager fileManager;
+
+ @In @Out
+ private SelectionHelper selectionHelper;
public synchronized void listener(UploadEvent event) throws Exception{
UploadItem item = event.getUploadItem();
@@ -78,9 +78,9 @@
image.setCreated(new Date());
image.setDescription(SAMPLE_DESCRIPTION);
image.setName(SAMPLE_NAME);
- image.setPath(item.getFileName());
- image.setAlbumName(selectedAlbum.getName());
- image.setAlbum(selectedAlbum);
+ image.setPath(user.getLogin() + "/" + selectionHelper.getSelectedAlbum().getName() + "/" + item.getFileName());
+ image.setAlbumName(selectionHelper.getSelectedAlbum().getName());
+ image.setAlbum(selectionHelper.getSelectedAlbum());
file.setImage(image);
fileWrapper.getFiles().add(file);
}
@@ -102,7 +102,7 @@
for(FileItem file:fileWrapper.getFiles()){
if(file.isSelected()){
//Save file to disk
- String fileName = user.getLogin() + fileManager.getFileSeparator() + selectedAlbum.getName() + fileManager.getFileSeparator() + file.getImage().getPath();
+ String fileName = fileManager.transformToServerPath(file.getImage().getPath());
try {
fileManager.addImage(fileName , file.getData());
} catch (IOException e) {
@@ -121,7 +121,7 @@
public void storeAll() {
for(FileItem file:fileWrapper.getFiles()){
//Save file to disk
- String fileName = user.getLogin() + fileManager.getFileSeparator() + selectedAlbum.getName() + fileManager.getFileSeparator() + file.getImage().getPath();
+ String fileName = fileManager.transformToServerPath(file.getImage().getPath());
try {
fileManager.addImage(fileName , file.getData());
} catch (IOException e) {
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -55,7 +55,7 @@
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());
+ File image = fileManager.getImage(fileManager.transformToServerPath(painted.getPath()));
InputStream paintData = null;
byte[] data = new byte[(int)image.length() - 1];
FileInputStream fileInputStream = null;
@@ -102,7 +102,7 @@
return;
}
Image image = (Image)data;
- File imageResource = fileManager.getImage(image.getAlbum().getOwner().getLogin() + fileManager.getFileSeparator() + image.getAlbum().getName() + fileManager.getFileSeparator() + image.getPath());
+ File imageResource = fileManager.getImage(fileManager.transformToServerPath(image.getPath()));;
if (imageResource != null) {
FileInputStream fileInputStream = new FileInputStream(imageResource);
BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -0,0 +1,105 @@
+/**
+ * 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.manager;
+
+import javax.faces.model.SelectItem;
+
+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.User;
+import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.service.IAlbumAction;
+import org.richfaces.realworld.tree.TreeAlbumItem;
+import org.richfaces.realworld.tree.TreeRootItem;
+import org.richfaces.realworld.util.SelectionHelper;
+
+@Name("albumManager")
+(a)Scope(ScopeType.CONVERSATION)
+public class AlbumManager {
+
+ @In(create=true, required=true)
+ private IAlbumAction albumAction;
+
+ @In(create=true) @Out TreeRootItem treeRoot;
+
+ @In(create=true, required=true) @Out
+ private Album album;
+
+ @In
+ private User user;
+
+ @In(create=true)
+ FileManager fileManager;
+
+ @In @Out
+ private SelectionHelper selectionHelper;
+
+ public void addAlbum(){
+ albumAction.addAlbum(album);
+ treeRoot.getAvailableAlbums().add(new SelectItem(album.getName()));
+ TreeAlbumItem albumItem = new TreeAlbumItem(album.getId(), treeRoot, album);
+ treeRoot.addAlbumToTree(albumItem);
+ fileManager.addDirectory(user.getLogin() + fileManager.getFileSeparator() + album.getName());
+ selectionHelper.setSelectedImage(null);
+ selectionHelper.setSelectedAlbum(albumItem.getAlbum());
+
+ }
+
+ public void editAlbum(Album album){
+ boolean nameChanged = !album.getName().equals(album.getChangedName());
+ if(nameChanged){
+ String directoryOld = user.getLogin() + fileManager.getFileSeparator() + album.getName();
+ String directoryNew = user.getLogin() + fileManager.getFileSeparator() + album.getChangedName();
+ try {
+ fileManager.renameDirectory(directoryOld, directoryNew);
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ album.setName(album.getChangedName());
+ album.setChangedName(null);
+ }
+ albumAction.editAlbum(album);
+ treeRoot.updateChild(album);
+ }
+
+ public void deleteAlbum(Album album){
+ String albumName = album.getName();
+ albumAction.deleteAlbum(album);
+ SelectItem item = treeRoot.getSelectItemByName(album.getName());
+ treeRoot.getAvailableAlbums().remove(item);
+ treeRoot.removeChild(album.getId());
+ fileManager.deleteDirectory(user.getLogin() + fileManager.getFileSeparator() + albumName);
+ selectionHelper.setSelectedAlbum(user.getChildAlbums().get(0));
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
+ }
+
+ public void updateSelectedAlbum(){
+ selectionHelper.setSelectedAlbum(user.getAlbumByName(selectionHelper.getSelectedAlbum().getName()));
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(true);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.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/manager/Authenticator.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -0,0 +1,157 @@
+/**
+ * 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.manager;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.ScopeType;
+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.core.Events;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+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.util.SelectionHelper;
+
+@Name("authenticator")
+(a)Scope(ScopeType.CONVERSATION)
+public class Authenticator implements Serializable
+{
+
+ @In("#{messages['user.exist']}") private String USER_WITH_THIS_LOGIN_ALREADY_EXIST;
+
+ @In("#{messages['user.confirm.error']}") private String 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;
+
+ @In FacesMessages facesMessages;
+
+ @In(create = true)
+ IUserAction userAction;
+
+ @In(create = true)
+ FileManager fileManager;
+
+ @In(create = true)
+ AvatarUpload avatarUpload;
+
+ @In(create=true) @Out
+ private SelectionHelper selectionHelper;
+
+ /* (non-Javadoc)
+ * @see org.richfaces.realworld.service.IAuthenticator#authenticate()
+ */
+ public boolean authenticate()
+ {
+ if(null == identity.getUsername() || identity.getUsername().equals("")){
+ 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_ROLE);
+ if(!fileManager.isDirectoryPresent(identity.getUsername())){
+ fileManager.addDirectory(identity.getUsername());
+ }
+ if(user.getChildAlbums().size() > 0){
+ selectionHelper.setSelectedAlbum(user.getChildAlbums().get(0));
+ if(selectionHelper.getSelectedAlbum().getImages().size() > 0){
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
+ }
+ }
+ Events.instance().raiseEvent(UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
+ return true;
+ }
+ }catch(Exception nre){
+ facesMessages.add("Invalid login or password");
+ return false;
+ }
+ return false;
+ }
+
+ @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_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));
+ errorHappened = true;
+ }
+ if(userAction.isUserExist(user.getLogin())){
+ UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
+ 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));
+ errorHappened = true;
+ }
+ if(errorHappened){
+ return "";
+ }
+ userAction.register(user);
+ if(avatarUpload.getAvatarItem() != null){
+ user.setAvatarPath(avatarUpload.getAvatarItem().getImage().getName());
+ fileManager.deleteDirectory(user.getLogin() + fileManager.getFileSeparator() + "avatars");
+ fileManager.addDirectory(user.getLogin() + fileManager.getFileSeparator() + "avatars");
+ try {
+ fileManager.addImage(user.getLogin() + fileManager.getFileSeparator() + "avatars" + fileManager.getFileSeparator() + user.getAvatarPath(), avatarUpload.getAvatarItem().getData());
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ return INDEX_OUTCOME;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.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/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -0,0 +1,134 @@
+/**
+ * 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.manager;
+
+import java.util.Date;
+
+import org.jboss.seam.ScopeType;
+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.richfaces.realworld.domain.Comment;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.service.IImageAction;
+import org.richfaces.realworld.tree.TreeAlbumItem;
+import org.richfaces.realworld.tree.TreeImageItem;
+import org.richfaces.realworld.tree.TreeRootItem;
+import org.richfaces.realworld.util.RatingBinder;
+import org.richfaces.realworld.util.SelectionHelper;
+
+@Name("imageManager")
+(a)Scope(ScopeType.CONVERSATION)
+public class ImageManager {
+
+ @In(create=true, required=true)
+ private IImageAction imageAction;
+
+ @In(create=true)
+ FileManager fileManager;
+
+ @In(create=true) @Out TreeRootItem treeRoot;
+
+ @In(create=true) @Out
+ private SelectionHelper selectionHelper;
+
+ @In
+ private User user;
+
+ @In(create=true, required=true)
+ private RatingBinder ratingBinder;
+
+ public void deleteImage(Image image){
+ int index = image.getAlbum().getIndex(image);
+ String albumName = image.getAlbum().getName();
+ String imagePath = image.getPath();
+ TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
+ imageAction.deleteImage(image);
+ parent.removeChild(image.getId());
+ fileManager.deleteImage(fileManager.transformToServerPath(imagePath));
+ if(selectionHelper.getSelectedAlbum().getImages().size() > index){
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(index));
+ }else{
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(index-1));
+ }
+ }
+
+ public void editImage(Image image){
+ TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
+ boolean parentChanged = !parent.getAlbum().getName().equals(image.getAlbumName());
+
+ if(parentChanged){
+ parent.removeChild(image.getId());
+ TreeAlbumItem albumItem = treeRoot.getAlbumByName(image.getAlbumName());
+ TreeImageItem imageItem = new TreeImageItem(image.getId(),albumItem,image);
+ albumItem.addChild(image.getId(), imageItem);
+ String fileNameOld = fileManager.transformToServerPath(image.getPath());
+ int lastIndexOf = image.getPath().lastIndexOf("/");
+ String prevPathEnd = image.getPath().substring(lastIndexOf);
+ String fileNameNew = user.getLogin() + fileManager.getFileSeparator() + image.getAlbumName() + fileManager.getFileSeparator() + prevPathEnd;
+ String newPath = user.getLogin() + "/" + image.getAlbumName() + "/" + prevPathEnd;
+ image.setPath(newPath);
+ fileManager.renameImage(fileNameOld, fileNameNew);
+ selectionHelper.setSelectedImage(imageItem.getImage());
+ selectionHelper.setSelectedAlbum(albumItem.getAlbum());
+ }else{
+ TreeImageItem imageItem = (TreeImageItem)parent.getChild(image.getId());
+ imageItem.setImage(image);
+ }
+ imageAction.editImage(image, parentChanged);
+ }
+
+ @Observer("addImage")
+ public void addImage(Image image) {
+ imageAction.addImage(image);
+ TreeAlbumItem albumItem = treeRoot.getAlbumByName(image.getAlbumName());
+ TreeImageItem imageItem = new TreeImageItem(image.getId(),albumItem,image);
+ albumItem.addChild(image.getId(), imageItem);
+ selectionHelper.setSelectedImage(imageItem.getImage());
+ selectionHelper.setSelectedAlbum(albumItem.getAlbum());
+ }
+
+
+ public void editComment(Comment comment) {
+ imageAction.editComment(comment);
+ }
+
+ public void addComment(Comment comment) {
+ imageAction.addComment(comment);
+ }
+
+ public void addAutoComment(Image image) {
+ Comment comment = new Comment();
+ comment.setAuthor(user);
+ comment.setDate(new Date());
+ comment.setImage(image);
+ comment.setMessage("+1");
+ imageAction.addComment(comment);
+ }
+
+ public void vote(Image image){
+ imageAction.vote(image, (Long)Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.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/manager/UserManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -0,0 +1,148 @@
+/**
+ * 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.manager;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+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.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.FriendshipRequest;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.Message;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.navigation.NavigationEnum;
+import org.richfaces.realworld.service.IMessageAction;
+import org.richfaces.realworld.service.IUserAction;
+import org.richfaces.realworld.util.SelectionHelper;
+
+@Name("userManager")
+(a)Scope(ScopeType.CONVERSATION)
+public class UserManager implements Serializable{
+
+ @In("#{messages['addedtofriends']}") private String ADDED_TO_FRIENDS_MESSAGE_THEME;
+ @In("#{messages['addedtofriendsby']}") private String ADDED_TO_FRIENDS_MESSAGE;
+ @In("#{messages['removedfromfriends']}") private String REMOVED_FROM_FRIENDS_MESSAGE_THEME;
+ @In("#{messages['removedfromfriendsby']}") private String YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE;
+
+ private static final String UPDATE_MAIN_AREA_EVENT = "updateMainArea";
+
+ private static final long serialVersionUID = 6027103521084558931L;
+
+ @In
+ private User user;
+
+ private Long countUnreadedMessages;
+
+ @In(create=true, required=true)
+ private IMessageAction messageAction;
+
+ @In(create=true, required=true)
+ private IUserAction userAction;
+
+ @In(create=true) @Out
+ private SelectionHelper selectionHelper;
+
+ public List<String> availableUserLogins(Object suggest){
+ List<String> suggestions = userAction.getUsers((String)suggest);
+ return suggestions;
+ }
+
+ public void sendMessage(Message message) {
+ messageAction.sendMessage(message);
+ }
+
+ public Long getCountUnreadedMessages() {
+ if(null == countUnreadedMessages){
+ countUnreadedMessages = userAction.countNotReadedMessages(user);
+ }
+ return countUnreadedMessages != null ? countUnreadedMessages : 0;
+ }
+
+ public void setCountUnreadedMessages(Long count){
+ countUnreadedMessages = null;
+ }
+
+ public void removeFromFriends(User owner, User removed){
+ userAction.removeFromFriends(owner, removed);
+ Message message = new Message();
+ message.setAuthor(user);
+ message.setDate(new Date());
+ message.setOwner(removed);
+ message.setFriendshipRequest(false);
+ message.setReaded(false);
+ message.setMessage(YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE+ user.getLogin());
+ message.setTheme(REMOVED_FROM_FRIENDS_MESSAGE_THEME);
+ messageAction.sendMessage(message);
+ }
+
+ public void addToFriends(User friend){
+ FriendshipRequest request = friend.getFriendshipRequest(user, friend);
+ if(request != null){
+ if(!userAction.friendExist(user, friend)){
+ userAction.addFriend(user, friend, request);
+ Message message = new Message();
+ message.setAuthor(user);
+ message.setDate(new Date());
+ message.setOwner(friend);
+ message.setFriendshipRequest(false);
+ message.setReaded(false);
+ message.setMessage(ADDED_TO_FRIENDS_MESSAGE+ user.getLogin());
+ message.setTheme(ADDED_TO_FRIENDS_MESSAGE_THEME);
+ messageAction.sendMessage(message);
+ }
+ }/*else{
+ throw new Exception("This user won't be your friend!");
+ }*/
+ }
+
+ public void addToSharedAlbums(Image image){
+ userAction.addSharedAlbum(image.getAlbum());
+ }
+
+ public void removeFromSharedAlbums(Album album){
+ userAction.removeFromSharedAlbums(user, album);
+ }
+
+ public void showSharedAlbum(Image image){
+ Events.instance().raiseEvent(UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
+ selectionHelper.setSelectedAlbum(image.getAlbum());
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
+ selectionHelper.setSelectedImageIndex(1);
+ selectionHelper.setUserAlbumSelected(false);
+ }
+
+ public void markAsReaded(Message message){
+ messageAction.markAsReaded(message);
+ this.setCountUnreadedMessages(null);
+ }
+
+ public void deleteMessage(Message message){
+ messageAction.deleteMessage(message);
+ this.setCountUnreadedMessages(null);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/search/SearchBean.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -41,14 +41,11 @@
@Scope(ScopeType.CONVERSATION)
public class SearchBean implements Serializable {
- private static final String EQUALS_CHOICE = "Equals";
+ @In("#{messages['equals']}") private String EQUALS_CHOICE;
+ @In("#{messages['less']}") private String LESS_CHOICE;
+ @In("#{messages['more']}") private String MORE_CHOICE;
+ @In("#{messages['nomatter']}") private String NO_MATTER_CHOICE;
- 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 = "< ";
Deleted: 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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeActionManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -1,291 +0,0 @@
-/**
- * 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.Date;
-import java.util.List;
-
-import javax.faces.model.SelectItem;
-
-import org.jboss.seam.ScopeType;
-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.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.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.RatingBinder;
-import org.richfaces.realworld.util.SelectionHelper;
-
-@Name("treeActionManager")
-(a)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;
-
- @In(create=true, required=true)
- private IAlbumAction albumAction;
-
- @In(create=true, required=true)
- private RatingBinder ratingBinder;
-
- @In(create=true, required=true)
- private IMessageAction messageAction;
-
- @In(create=true, required=true)
- private IImageAction imageAction;
-
- @In(create=true, required=true)
- private IUserAction userAction;
-
- @In(create=true, required=true) @Out
- private Album album;
-
- @In(create=true) @Out
- private SelectionHelper selectionHelper;
-
- @In(create=true)
- FileManager fileManager;
-
- @In(create=true) @Out(required=false)
- private Image selectedImage;
-
- @In(create=true) @Out
- private Album selectedAlbum;
-
- @In(create=true) TreeSelectionManager treeSelectionManager;
-
- @In(create=true) @Out TreeRootItem treeRoot;
-
- private String selectedAlbumName;
-
- public String getSelectedAlbumName() {
- return selectedAlbumName;
- }
-
- public void setSelectedAlbumName(String selectedAlbumName) {
- this.selectedAlbumName = selectedAlbumName;
- }
-
- public void addAlbum(){
- albumAction.addAlbum(album);
- treeRoot.getAvailableAlbums().add(new SelectItem(album.getName()));
- TreeAlbumItem albumItem = new TreeAlbumItem(album.getId(), treeRoot, album);
- treeRoot.addAlbumToTree(albumItem);
- fileManager.addDirectory(user.getLogin() + fileManager.getFileSeparator() + album.getName());
- selectedImage = null;
- selectedAlbum = albumItem.getAlbum();
-
- }
-
- public List<String> availableUserLogins(Object suggest){
- List<String> suggestions = userAction.getUsers((String)suggest);
- return suggestions;
- }
-
- public void editAlbum(Album album){
- boolean nameChanged = !album.getName().equals(album.getChangedName());
- if(nameChanged){
- String directoryOld = user.getLogin() + fileManager.getFileSeparator() + album.getName();
- String directoryNew = user.getLogin() + fileManager.getFileSeparator() + album.getChangedName();
- try {
- fileManager.renameDirectory(directoryOld, directoryNew);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- album.setName(album.getChangedName());
- album.setChangedName(null);
- }
- albumAction.editAlbum(album);
- treeRoot.updateChild(album);
-
- }
-
- public void deleteAlbum(Album album){
- String albumName = album.getName();
- albumAction.deleteAlbum(album);
- SelectItem item = treeRoot.getSelectItemByName(album.getName());
- treeRoot.getAvailableAlbums().remove(item);
- treeRoot.removeChild(album.getId());
- fileManager.deleteDirectory(user.getLogin() + fileManager.getFileSeparator() + albumName);
- selectedAlbum = user.getChildAlbums().get(0);
- selectedImage = selectedAlbum.getImages().get(0);
- }
-
- public void deleteImage(Image image){
- int index = image.getAlbum().getIndex(image);
- String albumName = image.getAlbum().getName();
- String imagePath = image.getPath();
- TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
- imageAction.deleteImage(image);
- parent.removeChild(image.getId());
- fileManager.deleteImage(user.getLogin() + fileManager.getFileSeparator() + albumName + fileManager.getFileSeparator() + imagePath);
- if(selectedAlbum.getImages().size() > index){
- selectedImage = selectedAlbum.getImages().get(index);
- }else{
- selectedImage = selectedAlbum.getImages().get(index-1);
- }
- }
-
- public void editImage(Image image){
- TreeAlbumItem parent = treeRoot.getAlbums().get(image.getAlbum().getId());
- boolean parentChanged = !parent.getAlbum().getName().equals(image.getAlbumName());
- imageAction.editImage(image, parentChanged);
-
- if(parentChanged){
- parent.removeChild(image.getId());
- TreeAlbumItem albumItem = treeRoot.getAlbumByName(image.getAlbumName());
- TreeImageItem imageItem = new TreeImageItem(image.getId(),albumItem,image);
- albumItem.addChild(image.getId(), imageItem);
- String fileNameOld = user.getLogin() + fileManager.getFileSeparator() + image.getAlbum().getName() + fileManager.getFileSeparator() + image.getPath();
- String fileNameNew = user.getLogin() + fileManager.getFileSeparator() + image.getAlbumName() + fileManager.getFileSeparator() + image.getPath();
- fileManager.renameImage(fileNameOld, fileNameNew);
- selectedImage = imageItem.getImage();
- selectedAlbum = albumItem.getAlbum();
- }else{
- TreeImageItem imageItem = (TreeImageItem)parent.getChild(image.getId());
- imageItem.setImage(image);
- }
- }
-
- @Observer("addImage")
- public void addImage(Image image) {
- imageAction.addImage(image);
- TreeAlbumItem albumItem = treeRoot.getAlbumByName(image.getAlbumName());
- TreeImageItem imageItem = new TreeImageItem(image.getId(),albumItem,image);
- albumItem.addChild(image.getId(), imageItem);
- selectedImage = imageItem.getImage();
- selectedAlbum = albumItem.getAlbum();
- }
-
- public void editComment(Comment comment) {
- imageAction.editComment(comment);
- }
-
- public void addComment(Comment comment) {
- imageAction.addComment(comment);
- }
-
- public void addAutoComment(Image image) {
- Comment comment = new Comment();
- comment.setAuthor(user);
- comment.setDate(new Date());
- comment.setImage(image);
- comment.setMessage("+1");
- imageAction.addComment(comment);
- }
-
- public void sendMessage(Message message) {
- messageAction.sendMessage(message);
- }
-
- public Long getCountUnreadedMessages() {
- Long count = userAction.countNotReadedMessages(user);
- return count!= null? count:0;
- }
-
- public void removeFromFriends(User owner, User removed){
- userAction.removeFromFriends(owner, removed);
- Message message = new Message();
- message.setAuthor(user);
- message.setDate(new Date());
- message.setOwner(removed);
- message.setFriendshipRequest(false);
- message.setReaded(false);
- message.setMessage(YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE+ user.getLogin());
- message.setTheme(REMOVED_FROM_FRIENDS_MESSAGE_THEME);
- messageAction.sendMessage(message);
- }
-
- public void addToFriends(User friend){
- FriendshipRequest request = friend.getFriendshipRequest(user, friend);
- if(request != null){
- if(!userAction.friendExist(user, friend)){
- userAction.addFriend(user, friend, request);
- Message message = new Message();
- message.setAuthor(user);
- message.setDate(new Date());
- message.setOwner(friend);
- message.setFriendshipRequest(false);
- message.setReaded(false);
- message.setMessage(ADDED_TO_FRIENDS_MESSAGE+ user.getLogin());
- message.setTheme(ADDED_TO_FRIENDS_MESSAGE_THEME);
- messageAction.sendMessage(message);
- }
- }/*else{
- throw new Exception("This user won't be your friend!");
- }*/
- }
-
- public void addToSharedAlbums(Image image){
- userAction.addSharedAlbum(image.getAlbum());
- }
-
-
- public void removeFromSharedAlbums(Album album){
- userAction.removeFromSharedAlbums(user, album);
- }
-
- public void vote(Image image){
- imageAction.vote(image, (Long)Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
- }
-
- public void showSharedAlbum(Image image){
- NavigationEnum mainArea = NavigationEnum.IMAGE_PREVIEW;
- treeSelectionManager.setMainArea(mainArea);
- selectedAlbum = image.getAlbum();
- selectedImage = selectedAlbum.getImages().get(0);
- selectionHelper.setSelectedImageIndex(1);
- selectionHelper.setUserAlbumSelected(false);
- }
-
-
- public void updateSelectedAlbum(){
- selectedAlbum = user.getAlbumByName(this.getSelectedAlbumName());
- selectedImage = selectedAlbum.getImages().get(0);
- selectionHelper.setSelectedImageIndex(1);
- selectionHelper.setUserAlbumSelected(true);
- }
-}
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeImageItem.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -22,8 +22,6 @@
import java.util.Iterator;
-import javax.faces.component.UIGraphic;
-
import org.richfaces.model.TreeNode;
import org.richfaces.realworld.domain.Image;
@@ -34,15 +32,12 @@
private long id;
private Image image;
- private UIGraphic uiImage;
private TreeAlbumItem album;
public TreeImageItem(long id, TreeAlbumItem album, Image image) {
this.id = id;
this.album = album;
this.image = image;
- this.uiImage = new UIGraphic();
- this.uiImage.setUrl(image.getPath());
}
public void addChild(Object identifier, TreeNode child) {
@@ -95,13 +90,5 @@
public void setImage(Image image) {
this.image = image;
}
-
- public UIGraphic getUiImage() {
- return uiImage;
- }
-
- public void setUiImage(UIGraphic uiImage) {
- this.uiImage = uiImage;
- }
}
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/tree/TreeSelectionManager.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -52,6 +52,7 @@
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.manager.ImageManager;
import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.util.SelectionHelper;
@@ -60,9 +61,9 @@
@Synchronized(timeout=200000)
public class TreeSelectionManager implements Serializable{
- private static final String DATASCROLLER_ID = "mainform:sc1";
+ private static final String DATASCROLLER_ID = "mainform:imageScroller";
- private static final String IMAGE_DATATABLE_ID = "mainform:imageList";
+ private static final String IMAGE_DATATABLE_ID = "mainform:mainImage";
private static final String FIRST = "first";
@@ -76,12 +77,6 @@
private NavigationEnum mainArea;
- @In(required=false) @Out(required=false)
- private Image selectedImage;
-
- @In(required=false) @Out(required=false)
- private Album selectedAlbum;
-
@In(required=false) @Out(required=false)
private SelectionHelper selectionHelper;
@@ -89,16 +84,16 @@
FileManager fileManager;
@In(required=false)
- TreeActionManager treeActionManager;
+ ImageManager imageManager;
private String nodeTitle;
public void showFileUpload(TreeAlbumItem item){
- selectedAlbum = item.getAlbum();
+ selectionHelper.setSelectedAlbum(item.getAlbum());
if(item.isLeaf()){
- selectedImage=null;
+ selectionHelper.setSelectedImage(null);
}else{
- selectedImage = ((TreeImageItem)(item.getImages().get(0))).getImage();
+ selectionHelper.setSelectedImage(((TreeImageItem)(item.getImages().get(0))).getImage());
}
this.setMainArea(NavigationEnum.FILE_UPLOAD);
}
@@ -109,27 +104,27 @@
}
public void scrollerListener(DataScrollerEvent event) {
- List<Image> images = selectedAlbum.getImages();
+ List<Image> images = selectionHelper.getSelectedAlbum().getImages();
if (event.getNewScrolVal().equals(PREVIOUS)) {
for(int index = 0 ; index < images.size(); index++){
- if(images.get(index) == selectedImage){
- selectedImage = images.get(index - 1);
+ if(images.get(index) == selectionHelper.getSelectedImage()){
+ selectionHelper.setSelectedImage(images.get(index - 1));
selectionHelper.setSelectedImageIndex(index);
}
}
} else if (event.getNewScrolVal().equals(LAST)) {
- selectedImage = images.get(images.size() - 1);
+ selectionHelper.setSelectedImage(images.get(images.size() - 1));
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);
+ if(images.get(index) == selectionHelper.getSelectedImage()){
+ selectionHelper.setSelectedImage(images.get(index + 1));
selectionHelper.setSelectedImageIndex(index + 2);
return;
}
}
} else if (event.getNewScrolVal().equals(FIRST)) {
- selectedImage = images.get(0);
+ selectionHelper.setSelectedImage(images.get(0));
selectionHelper.setSelectedImageIndex(1);
}
@@ -194,7 +189,7 @@
ac.addRenderedArea(IMAGE_DATATABLE_ID);
Image draggedImage = ((TreeImageItem)draggedNode).getImage();
draggedImage.setAlbumName(((TreeAlbumItem)droppedInNode).getAlbum().getName());
- treeActionManager.editImage(draggedImage);
+ imageManager.editImage(draggedImage);
// Add destination tree to reRender
try {
ac.addComponentToAjaxRender(destTree);
@@ -224,9 +219,9 @@
TreeNode treeNode = (TreeNode) tree.getRowData(treeRowKey);
if (treeNode instanceof TreeAlbumItem) {
TreeAlbumItem currentNode = (TreeAlbumItem) treeNode;
- return currentNode.getAlbum() == selectedAlbum;
+ return currentNode.getAlbum() == selectionHelper.getSelectedAlbum();
} else if (treeNode instanceof TreeImageItem) {
- return ((TreeImageItem) treeNode).getImage() == selectedImage;
+ return ((TreeImageItem) treeNode).getImage() == selectionHelper.getSelectedImage();
}
return null;
}
@@ -236,7 +231,7 @@
TreeNode treeNode = (TreeNode) tree.getRowData(treeRowKey);
if (treeNode instanceof TreeAlbumItem) {
TreeAlbumItem currentNode = (TreeAlbumItem) treeNode;
- return currentNode.getAlbum() == selectedAlbum;
+ return currentNode.getAlbum() == selectionHelper.getSelectedAlbum();
}
return null;
}
@@ -252,12 +247,13 @@
.getName();
}
TreeNode<String> currentNode = tree.getModelTreeNode(tree.getRowKey());
+ selectionHelper.setUserAlbumSelected(true);
if(currentNode instanceof TreeImageItem){
Image image = ((TreeImageItem)currentNode).getImage();
- selectedImage = image;
+ selectionHelper.setSelectedImage(image);
Album album = ((TreeAlbumItem)currentNode.getParent()).getAlbum();
- if(album != selectedAlbum){
- selectedAlbum = album;
+ if(album != selectionHelper.getSelectedAlbum()){
+ selectionHelper.setSelectedAlbum(album);
}
int index = album.getIndex(image);
setDataScrollerIndex(index);
@@ -266,19 +262,18 @@
TreeAlbumItem node = (TreeAlbumItem)currentNode;
setDataScrollerIndex(0);
if (node.isLeaf()) {
- selectedImage = null;
+ selectionHelper.setSelectedImage(null);
Album album = node.getAlbum();
- selectedAlbum = album;
+ selectionHelper.setSelectedAlbum(album);
}else{
- if(node.getAlbum() == selectedAlbum){
+ if(node.getAlbum() == selectionHelper.getSelectedAlbum()){
return;
}else{
- selectedAlbum = node.getAlbum();
- selectedImage = node.getAlbum().getImages().get(0);
+ selectionHelper.setSelectedAlbum(node.getAlbum());
+ selectionHelper.setSelectedImage(node.getAlbum().getImages().get(0));
}
}
}
- selectionHelper.setUserAlbumSelected(true);
}
catch(Exception e){
//Bla-bla-bla
@@ -298,11 +293,11 @@
}
public void incrementSlideshowIndex() {
- int index = selectedAlbum.getIndex(selectedImage);
- if(selectedAlbum.getImages().size() == index +1){
+ int index = selectionHelper.getSelectedAlbum().getIndex(selectionHelper.getSelectedImage());
+ if(selectionHelper.getSelectedAlbum().getImages().size() == index +1){
index = -1;
}
- selectedImage = selectedAlbum.getImages().get(index +1);
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(index +1));
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller = (UIDatascroller)component.findComponent(DATASCROLLER_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
@@ -327,16 +322,16 @@
}
public SelectItem[] getAvailableIndexOfImages(){
- SelectItem[] group = new SelectItem[selectedAlbum.getImages().size()];
- for(int i = 0; i < selectedAlbum.getImages().size(); i++){
+ SelectItem[] group = new SelectItem[selectionHelper.getSelectedAlbum().getImages().size()];
+ for(int i = 0; i < selectionHelper.getSelectedAlbum().getImages().size(); i++){
group[i] = new SelectItem(i+1);
}
return group;
}
public void updateSelectedItems(Image image){
- selectedImage = image;
- Integer index = selectedAlbum.getIndex(selectedImage);
+ selectionHelper.setSelectedImage(image);
+ Integer index = selectionHelper.getSelectedAlbum().getIndex(selectionHelper.getSelectedImage());
setDataScrollerIndex(index);
}
}
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/AlbumPopupHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -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;
@@ -10,7 +30,7 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.tree.TreeActionManager;
+import org.richfaces.realworld.manager.AlbumManager;
@Name("albumPopupHelper")
@Scope(ScopeType.CONVERSATION)
@@ -26,7 +46,7 @@
private Album album;
@In(create=true, required=true)
- private TreeActionManager treeActionManager;
+ private AlbumManager albumManager;
public void initAlbumData( String actionName, String caption, Album album){
this.caption = caption;
@@ -39,7 +59,7 @@
}
public void editAlbum(ActionEvent event){
- treeActionManager.editAlbum(this.album);
+ albumManager.editAlbum(this.album);
}
public String getCaption() {
@@ -59,6 +79,6 @@
}
public void addAlbum(ActionEvent event){
- treeActionManager.addAlbum();
+ albumManager.addAlbum();
}
}
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/CommentPopupHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -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;
@@ -13,7 +33,7 @@
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.tree.TreeActionManager;
+import org.richfaces.realworld.manager.ImageManager;
@Name("commentPopupHelper")
@Scope(ScopeType.CONVERSATION)
@@ -32,7 +52,7 @@
private User user;
@In(create=true, required=true)
- private TreeActionManager treeActionManager;
+ private ImageManager imageManager;
public String getCaption() {
return caption;
@@ -64,10 +84,10 @@
}
public void editComment(ActionEvent event){
- treeActionManager.editComment(this.comment);
+ imageManager.editComment(this.comment);
}
public void addComment(ActionEvent event){
- treeActionManager.addComment(this.comment);
+ imageManager.addComment(this.comment);
}
}
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConfirmationPopupHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -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;
@@ -12,7 +32,8 @@
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.MetaTag;
-import org.richfaces.realworld.tree.TreeActionManager;
+import org.richfaces.realworld.manager.AlbumManager;
+import org.richfaces.realworld.manager.ImageManager;
@Name("confirmationPopupHelper")
@Scope(ScopeType.CONVERSATION)
@@ -24,15 +45,18 @@
private String actionName;
- @In(required=true)
+ @In(create=true, required=true)
private Image image;
- @In(required=true)
+ @In(create=true, required=true)
private Album album;
- @In(required=true)
- private TreeActionManager treeActionManager;
+ @In(create=true, required=true)
+ private AlbumManager albumManager;
+ @In(create=true, required=true)
+ private ImageManager imageManager;
+
public void initImagePopup( String actionName, String caption, Image image){
this.caption = caption;
this.actionName = actionName;
@@ -55,7 +79,7 @@
}
public void deleteAlbum(ActionEvent event){
- treeActionManager.deleteAlbum(this.album);
+ albumManager.deleteAlbum(this.album);
}
public String getCaption() {
@@ -75,7 +99,7 @@
}
public void deleteImage(ActionEvent event){
- treeActionManager.deleteImage(this.image);
+ imageManager.deleteImage(this.image);
}
}
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/FriendHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -28,7 +28,6 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
@Name("friendHelper")
@@ -36,12 +35,6 @@
public class FriendHelper implements Serializable{
private static final long serialVersionUID = 4735350615108906608L;
-
- @In(required=false) @Out(required=false)
- private Image selectedImage;
-
- @In(required=false) @Out(required=false)
- private Album selectedAlbum;
@In(required=false) @Out(required=false)
private SelectionHelper selectionHelper;
@@ -50,15 +43,15 @@
ComboboxHelper comboboxHelper;
public void chooseAlbum(User friend){
- selectedAlbum = friend.getAlbumByName(comboboxHelper.getAlbumName());
- selectedImage = selectedAlbum.getImages().get(0);
+ selectionHelper.setSelectedAlbum(friend.getAlbumByName(comboboxHelper.getAlbumName()));
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
selectionHelper.setSelectedImageIndex(1);
selectionHelper.setUserAlbumSelected(false);
}
public void chooseAlbum(Album album){
- selectedAlbum = album;
- selectedImage = selectedAlbum.getImages().get(0);
+ selectionHelper.setSelectedAlbum(album);
+ selectionHelper.setSelectedImage(selectionHelper.getSelectedAlbum().getImages().get(0));
selectionHelper.setSelectedImageIndex(1);
selectionHelper.setUserAlbumSelected(false);
}
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImagePopupHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -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;
@@ -12,7 +32,7 @@
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.MetaTag;
-import org.richfaces.realworld.tree.TreeActionManager;
+import org.richfaces.realworld.manager.ImageManager;
@Name("imagePopupHelper")
@Scope(ScopeType.CONVERSATION)
@@ -24,7 +44,7 @@
private Image image;
@In(create=true, required=true)
- private TreeActionManager treeActionManager;
+ private ImageManager imageManager;
public void initImagePopup(Image image){
if(null != image){
@@ -36,6 +56,6 @@
}
public void editImage(ActionEvent event){
- treeActionManager.editImage(this.image);
+ imageManager.editImage(this.image);
}
}
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/MessagePanelHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -21,7 +21,6 @@
package org.richfaces.realworld.util;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Date;
import javax.faces.event.ActionEvent;
@@ -31,24 +30,16 @@
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;
+import org.richfaces.realworld.manager.UserManager;
-@Name("modalPanelHelper")
+@Name("messagePanelHelper")
@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;
@@ -59,27 +50,10 @@
@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;
- }
+ @In(create=true, required=true) @Out
+ private UserManager userManager;
- public void initModalPanelData( String actionName, boolean sendRequired, Message message){
- this.actionName = actionName;
+ public void initReMessage(boolean sendRequired, Message message){
this.sendRequired = sendRequired;
this.message = new Message();
this.message.setTheme("Re:" + message.getTheme());
@@ -89,8 +63,7 @@
this.searchRequired = false;
}
- public void initMessage( String actionName, boolean sendRequired, Message message, boolean userSearchRequired){
- this.actionName = actionName;
+ public void initMessage(boolean sendRequired, Message message, boolean userSearchRequired){
this.sendRequired = sendRequired;
this.searchRequired = userSearchRequired;
this.message = new Message();
@@ -103,10 +76,10 @@
this.message = message;
this.message.setReaded(true);
this.searchRequired = false;
+ userManager.setCountUnreadedMessages(null);
}
- public void initModalPanelData( String actionName, boolean sendRequired, User owner){
- this.actionName = actionName;
+ public void initMessage(boolean sendRequired, User owner){
this.sendRequired = sendRequired;
this.message = new Message();
this.message.setAuthor(user);
@@ -115,8 +88,7 @@
this.searchRequired = false;
}
- public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message){
- this.actionName = actionName;
+ public void initMessage(boolean sendRequired, User owner, String theme, String message){
this.sendRequired = sendRequired;
this.message = new Message();
this.message.setAuthor(user);
@@ -127,8 +99,7 @@
this.searchRequired = false;
}
- public void initModalPanelData( String actionName, boolean sendRequired, User owner, String theme, String message, boolean friendshipRequest){
- this.actionName = actionName;
+ public void initMessage(boolean sendRequired, User owner, String theme, String message, boolean friendshipRequest){
this.sendRequired = sendRequired;
this.message = new Message();
this.message.setAuthor(user);
@@ -142,7 +113,7 @@
public void sendMessage(ActionEvent event){
this.message.setDate(new Date());
- treeActionManager.sendMessage(this.message);
+ userManager.sendMessage(this.message);
}
public boolean isSendRequired() {
Modified: 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 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/SelectionHelper.java 2008-12-24 12:17:19 UTC (rev 12005)
@@ -25,14 +25,21 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
@Name("selectionHelper")
@Scope(ScopeType.CONVERSATION)
public class SelectionHelper implements Serializable{
private static final long serialVersionUID = 5656562187249324512L;
+
private Integer selectedImageIndex = 1;
+ private Image selectedImage;
+
+ private Album selectedAlbum;
+
private boolean userAlbumSelected = true;
public boolean isUserAlbumSelected() {
@@ -50,4 +57,20 @@
public void setSelectedImageIndex(Integer selectedImageIndex) {
this.selectedImageIndex = selectedImageIndex;
}
+
+ public Image getSelectedImage() {
+ return selectedImage;
+ }
+
+ public void setSelectedImage(Image selectedImage) {
+ this.selectedImage = selectedImage;
+ }
+
+ public Album getSelectedAlbum() {
+ return selectedAlbum;
+ }
+
+ public void setSelectedAlbum(Album selectedAlbum) {
+ this.selectedAlbum = selectedAlbum;
+ }
}
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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2008-12-24 12:17:19 UTC (rev 12005)
@@ -90,7 +90,8 @@
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.header=You will upload files in album: #{selectionHelper.selectedAlbum.name}. If you want upload in another album, select it.
fileUpload.header2=Choose album:
fileUpload.uploadedPanelHeader=Uploaded Files Info
fileUpload.fileNameLabel=File Name:
@@ -101,4 +102,155 @@
fileUpload.clearLabel=Clear Uploaded Data
fileUpload.clearSelectedLabel=Clear Selected
-image.panelHeader=Image Preview\: Selected Album\: \#{selectedAlbum.name}
\ No newline at end of file
+comment.label=View comments(#{selectionHelper.selectedImage.comments.size})
+comment.author=Author: #{record.author.login}
+comment.askForFriend=Ask for friendship
+comment.askForFriend.message=Please, add me to your friends
+comment.date=Date: #{record.date}
+comment.delete=Delete comment
+comment.edit=Edit Comment
+comment.noComments=No Comments for this image
+comment.add=Add comment
+comment.save=Save
+comment.cancel=Cancel
+
+message.sendMessage=Send message
+message.sendToUser=Send message for this user
+message.readed=Mark as read
+message.authorHeader=Author
+message.themeHeader=Theme
+message.dateHeader=Date
+message.theme=Theme: #{record.theme}
+message.author=Author:
+message.date=Date: #{record.date}
+message.delete=Delete
+message.read=Read
+message.re=Re:
+message.message=Message
+message.owner=Owner:
+message.content=Content:
+message.addFriend=Add to friends
+message.friendRequest=It is request for friendship message. You may add this user to your friends by clicking on the 'Add to Friends button'
+message.send=Send
+message.close=Close
+message.theme=Theme:
+
+confirm.confirm=Confirmation:
+confirm.ok=OK
+confirm.cancel=Cancel
+
+shared.delete=Delete From shared
+
+album.edit=Edit
+album.delete=Delete
+album.delete.confirm=Are you sure? All images associated with this album will also dropped! Click OK to proceed, else click Cancel.
+album.add=Add album
+album.edit.long=Edit Album:
+album.addImages=Add images
+album.name=Name:
+album.shared=Shared:
+album.owner=Owner:
+album.desc=Short description:
+album.store=Store
+album.cancel=Cancel
+
+scroller.first=First
+scroller.last=Last
+scroller.prev=Prev
+scroller.next=Next
+scroller.pager.begin=Image
+scroller.pager.end=of #{selectionHelper.selectedAlbum.images.size}
+
+image.rating=Current Rating: #{record.rank.rating}
+image.numberVotes=Number of votes: #{record.rank.hits}
+image.vote=Vote for this picture
+image.vote.short=Vote
+image.panelHeader=Image Preview: Selected Album: #{selectionHelper.selectedAlbum.name}
+image.delete=Delete
+image.delete.confirm=Are you sure? Click OK to proceed, else click Cancel.
+image.edit=Edit Properties
+image.prop=Image Properties:
+image.name=Name:
+image.desc=Short Description:
+image.album=Album
+image.date=Created Date:
+image.meta=Image Meta-information:
+image.store=Store
+image.cancel=Cancel
+
+slideshow.start=Start Slideshow
+slideshow.stop=Stop slideshow
+slideshow.interval=Interval in sec
+
+index.header=Welcome!
+
+login.header=Please login here
+login.login=Login
+login.userName=Username
+login.password=Password
+login.register=Register
+login.anonymous=Anonymous
+
+friends.delete=Delete from friends
+friends.choose=Choose album for preview:
+
+search.advanced=Advanced search:
+search.rank=Rank:
+search.numberVotes=Number of votes:
+search.date=Date created
+search.addShared=Add to shared Albums
+search.preview=Preview
+search.search=Search
+search.popular=Popular Images
+search.unpopular=UnPopular Images
+search.nofound=No images found
+
+user.loginPrefs=Login Preferences
+user.registration=Registration
+user.reginfo=Registration Info:
+user.firstname=First name
+user.secondname=Second Name
+user.login=Login
+user.password=Password
+user.email=Email
+user.birthdate=Birth Date
+user.avatar=Avatar
+user.userPrefs=User preferences
+user.save=Save
+user.reset=Reset
+user.confirm=Confirm Password
+user.avatar.info=Uploaded File Info
+user.avatar.name=File Name:
+user.avatar.length=File Length(bytes):
+user.register=Register
+user.cancel=Cancel
+user.exist=User with this login already exist;
+user.confirm.error=Confirm Password not equals password
+
+menu.welcome=Welcome, #{identity.username}!
+menu.welcome.guest=Welcome, guest! If you want access to full version of application, please register or login.
+menu.message.tooltip=You have #{userManager.countUnreadedMessages} not-readed messages
+menu.messages=Read Messages
+menu.search=Search
+menu.image=Image Preview
+menu.user=User Prefs
+menu.file=File Upload
+menu.logout=Logout
+menu.login=Login
+
+realworld=RealWorld Demo application
+panel.albumHeader=Album Management
+panel.my=My albums
+panel.friend=Friend Albums
+panel.shared=Shared albums
+
+samplename=Sample Name
+sampledesc=Sample Description
+addedtofriends=You are were added to friends
+addedtofriendsby=You are were added to friends by User
+removedfromfriends=You are were removed from friends
+removedfromfriendsby=You are were removed from friends of
+equals=Equals
+more=More
+less=Less
+nomatter=No Matter
\ No newline at end of file
Deleted: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/albumModalPanel-taglib.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/albumModalPanel-taglib.xml 2008-12-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/albumModalPanel-taglib.xml 2008-12-24 12:17:19 UTC (rev 12005)
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE facelet-taglib PUBLIC
- "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
- "facelet-taglib_1_0.dtd">
-<facelet-taglib>
- <namespace>http://richfaces.org/richx</namespace>
- <tag>
- <tag-name>albumModalPanel</tag-name>
- <source>templates/albumModalPanel.xhtml</source>
- </tag>
- <tag>
- <tag-name>confirm</tag-name>
- <source>templates/confirmation.xhtml</source>
- </tag>
- <tag>
- <tag-name>imagePrefs</tag-name>
- <source>templates/imagePrefs.xhtml</source>
- </tag>
- <tag>
- <tag-name>comment</tag-name>
- <source>templates/addComment.xhtml</source>
- </tag>
- <tag>
- <tag-name>message</tag-name>
- <source>templates/message.xhtml</source>
- </tag>
-</facelet-taglib>
\ No newline at end of file
Deleted: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/addComment.xhtml
===================================================================
(Binary files differ)
Deleted: 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)
Deleted: 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-23 20:20:47 UTC (rev 12004)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml 2008-12-24 12:17:19 UTC (rev 12005)
@@ -32,7 +32,7 @@
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>
- /WEB-INF/tags/albumModalPanel-taglib.xml
+ /WEB-INF/tags/realWorld-taglib.xml
</param-value>
</context-param>
Deleted: trunk/test-applications/realworld/web/src/main/webapp/fileUpload.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/imagePreview.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/navigation.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/readMessages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/search.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/tree.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/userPrefs.xhtml
===================================================================
(Binary files differ)
16 years
JBoss Rich Faces SVN: r12004 - trunk/ui/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-12-23 15:20:47 -0500 (Tue, 23 Dec 2008)
New Revision: 12004
Modified:
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-5455
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2008-12-23 20:04:48 UTC (rev 12003)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2008-12-23 20:20:47 UTC (rev 12004)
@@ -548,7 +548,7 @@
writer.writeAttribute("id", selectionHolderInputId, null);
writer.writeAttribute("name", selectionHolderInputId, null);
- writer.writeAttribute("value", ScriptUtils.toScript(getSelectionValue(context, tree)), null);
+ writer.writeAttribute("value", getSelectionValue(context, tree), null);
writer.endElement("input");
return selectionHolderInputId;
16 years