JBoss Rich Faces SVN: r13072 - trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-20 13:32:37 -0400 (Fri, 20 Mar 2009)
New Revision: 13072
Modified:
trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/web.xml
Log:
https://jira.jboss.org/jira/browse/RF-6419
added some features
Modified: trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/faces-config.xml 2009-03-20 17:32:07 UTC (rev 13071)
+++ trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/faces-config.xml 2009-03-20 17:32:37 UTC (rev 13072)
@@ -44,7 +44,7 @@
</managed-bean>
<managed-bean>
<managed-bean-name>skin</managed-bean-name>
- <managed-bean-class>org.docs.Skin</managed-bean-class>
+ <managed-bean-class>org.docs.util.Skin</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>skin</property-name>
@@ -79,9 +79,39 @@
<managed-property>
<property-name>menuState</property-name>
<property-class>org.docs.util.MenuState</property-class>
+ <value>#{menuState}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>tree</managed-bean-name>
+ <managed-bean-class>org.docs.tree.Tree</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>nodes</managed-bean-name>
+ <managed-bean-class>org.docs.tree.Nodes</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>node</property-name>
+ <property-class>java.lang.String</property-class>
<value/>
</managed-property>
+ <managed-property>
+ <property-name>root</property-name>
+ <property-class>java.lang.String</property-class>
+ <value/>
+ </managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>globalQueue</managed-bean-name>
+ <managed-bean-class>org.docs.util.GlobalQueue</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>globalQueue</property-name>
+ <property-class>boolean</property-class>
+ <value>false</value>
+ </managed-property>
+ </managed-bean>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config>
Modified: trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/web.xml 2009-03-20 17:32:07 UTC (rev 13071)
+++ trunk/test-applications/richfaces-docs/web/src/main/webapp/WEB-INF/web.xml 2009-03-20 17:32:37 UTC (rev 13072)
@@ -1,91 +1,116 @@
<?xml version="1.0" ?>
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
- <!-- Ajax4jsf -->
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <url-pattern>*.seam</url-pattern>
- </filter-mapping>
-
- <context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>#{skin.skin}</param-value>
- </context-param>
-
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>#{skin.standardSkinning}</param-value>
-</context-param>
-
-
- <!-- Seam -->
-
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- </filter>
+ <!-- Ajax4jsf -->
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
-
- <!-- Facelets development mode (disable in production) -->
-
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <!-- JSF -->
-
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
+ <context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.xhtml</url-pattern>
- </servlet-mapping>
-
-
+ <param-name>org.richfaces.queue.global.enabled</param-name>
+ <param-value>#{globalQueue.globalQueue}</param-value>
-
-
-
+ </context-param>
+
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+
+
+
+
+ <context-param>
+ <param-name>org.richfaces.LoadScriptStrategy</param-name>
+ <param-value>ALL</param-value>
+ </context-param>
+
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
+
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>#{skin.skin}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>#{skin.standardSkinning}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_LEVEL</param-name>
+ <param-value>extended</param-value>
+ </context-param>
+
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ <init-param>
+ <param-name>maxRequestSize</param-name>
+ <param-value>100000</param-value>
+ </init-param>
+
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Facelets development mode (disable in production) -->
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </servlet-mapping>
+
+
+
+
+
+
</web-app>
15 years, 9 months
JBoss Rich Faces SVN: r13071 - trunk/test-applications/richfaces-docs/web/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-20 13:32:07 -0400 (Fri, 20 Mar 2009)
New Revision: 13071
Modified:
trunk/test-applications/richfaces-docs/web/src/main/webapp/home.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-6419
added some features
Modified: trunk/test-applications/richfaces-docs/web/src/main/webapp/home.xhtml
===================================================================
--- trunk/test-applications/richfaces-docs/web/src/main/webapp/home.xhtml 2009-03-20 17:18:18 UTC (rev 13070)
+++ trunk/test-applications/richfaces-docs/web/src/main/webapp/home.xhtml 2009-03-20 17:32:07 UTC (rev 13071)
@@ -16,27 +16,17 @@
<rich:panel>
- <f:facet name="header">Welcome to RichFaces Docs</f:facet>
+ <f:facet name="header">RichFaces Documentation Application </f:facet>
- <ul>
-
- <li>Ant build script</li>
- <li>Deployment to JBoss AS (EAR or WAR)</li>
- <li>Development and production profiles</li>
- <li>Integration testing using TestNG and Embedded JBoss</li>
- <li>JavaBean or EJB 3.0 Seam components</li>
- <li>JPA entity classes</li>
- <li>A configurable DataSource and JPA EntityManager</li>
- <li>Templated Facelets views</li>
- <li>RichFaces panels and tables</li>
- <li>Default CSS stylesheet</li>
- <li>Internationalization support</li>
-
- </ul>
-
+ <p>
+ RichFaces documentation team from now on (3.3.1 version of RichFaces)
+ will be using RDA while documenting RichFaces components.
+ The main idea of the application is to make sure that all code snippets we provide in the Guide are working in a real application. Besides, it will help us keep the examples in one place so that any doc team member can continue what the other has started.
+ </p>
+
</rich:panel>
15 years, 9 months
JBoss Rich Faces SVN: r13070 - trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-03-20 13:18:18 -0400 (Fri, 20 Mar 2009)
New Revision: 13070
Modified:
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.core.js
Log:
https://jira.jboss.org/jira/browse/RF-6558 - ui.core was changed to the actual version
Modified: trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.core.js
===================================================================
--- trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.core.js 2009-03-20 17:13:34 UTC (rev 13069)
+++ trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.core.js 2009-03-20 17:18:18 UTC (rev 13070)
@@ -1,10 +1,519 @@
/*
- * jQuery UI 1.7
+ * jQuery UI 1.7.1
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
- */
-jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUM!
PAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","no!
ne").bind("selectstart.ui",function(){return false})},scrollParent:fun
ction(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focus!
able")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)!
}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(
p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for!
(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.c!
ancel=="string"?c(l.target).parents().add(l.target).filter(this.option
s.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari);l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return undefined;}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}retu!
rn !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);
\ No newline at end of file
+ */
+;jQuery.ui || (function($) {
+
+var _remove = $.fn.remove,
+ isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
+
+//Helper functions and ui object
+$.ui = {
+ version: "1.7.1",
+
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function(module, option, set) {
+ var proto = $.ui[module].prototype;
+ for(var i in set) {
+ proto.plugins[i] = proto.plugins[i] || [];
+ proto.plugins[i].push([option, set[i]]);
+ }
+ },
+ call: function(instance, name, args) {
+ var set = instance.plugins[name];
+ if(!set || !instance.element[0].parentNode) { return; }
+
+ for (var i = 0; i < set.length; i++) {
+ if (instance.options[set[i][0]]) {
+ set[i][1].apply(instance.element, args);
+ }
+ }
+ }
+ },
+
+ contains: function(a, b) {
+ return document.compareDocumentPosition
+ ? a.compareDocumentPosition(b) & 16
+ : a !== b && a.contains(b);
+ },
+
+ hasScroll: function(el, a) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ($(el).css('overflow') == 'hidden') { return false; }
+
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (el[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[scroll] = 1;
+ has = (el[scroll] > 0);
+ el[scroll] = 0;
+ return has;
+ },
+
+ isOverAxis: function(x, reference, size) {
+ //Determines when x coordinate is over "b" element axis
+ return (x > reference) && (x < (reference + size));
+ },
+
+ isOver: function(y, x, top, left, height, width) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
+ },
+
+ keyCode: {
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+};
+
+// WAI-ARIA normalization
+if (isFF2) {
+ var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
+ ariaState = /^aria-/,
+ ariaRole = /^wairole:/;
+
+ $.attr = function(elem, name, value) {
+ var set = value !== undefined;
+
+ return (name == 'role'
+ ? (set
+ ? attr.call(this, elem, name, "wairole:" + value)
+ : (attr.apply(this, arguments) || "").replace(ariaRole, ""))
+ : (ariaState.test(name)
+ ? (set
+ ? elem.setAttributeNS(ariaNS,
+ name.replace(ariaState, "aaa:"), value)
+ : attr.call(this, elem, name.replace(ariaState, "aaa:")))
+ : attr.apply(this, arguments)));
+ };
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
+}
+
+//jQuery plugins
+$.fn.extend({
+ remove: function() {
+ // Safari has a native remove event which actually removes DOM elements,
+ // so we have to use triggerHandler instead of trigger (#3037).
+ $("*", this).add(this).each(function() {
+ $(this).triggerHandler("remove");
+ });
+ return _remove.apply(this, arguments );
+ },
+
+ enableSelection: function() {
+ return this
+ .attr('unselectable', 'off')
+ .css('MozUserSelect', '')
+ .unbind('selectstart.ui');
+ },
+
+ disableSelection: function() {
+ return this
+ .attr('unselectable', 'on')
+ .css('MozUserSelect', 'none')
+ .bind('selectstart.ui', function() { return false; });
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ }
+});
+
+
+//Additional selectors
+$.extend($.expr[':'], {
+ data: function(elem, i, match) {
+ return !!$.data(elem, match[3]);
+ },
+
+ focusable: function(element) {
+ var nodeName = element.nodeName.toLowerCase(),
+ tabIndex = $.attr(element, 'tabindex');
+ return (/input|select|textarea|button|object/.test(nodeName)
+ ? !element.disabled
+ : 'a' == nodeName || 'area' == nodeName
+ ? element.href || !isNaN(tabIndex)
+ : !isNaN(tabIndex))
+ // the element and all of its ancestors must be visible
+ // the browser may report that the area is hidden
+ && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ },
+
+ tabbable: function(element) {
+ var tabIndex = $.attr(element, 'tabindex');
+ return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ }
+});
+
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+function getter(namespace, plugin, method, args) {
+ function getMethods(type) {
+ var methods = $[namespace][plugin][type] || [];
+ return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
+ }
+
+ var methods = getMethods('getter');
+ if (args.length == 1 && typeof args[0] == 'string') {
+ methods = methods.concat(getMethods('getterSetter'));
+ }
+ return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+ var namespace = name.split(".")[0];
+ name = name.split(".")[1];
+
+ // create plugin method
+ $.fn[name] = function(options) {
+ var isMethodCall = (typeof options == 'string'),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ // prevent calls to internal methods
+ if (isMethodCall && options.substring(0, 1) == '_') {
+ return this;
+ }
+
+ // handle getter methods
+ if (isMethodCall && getter(namespace, name, options, args)) {
+ var instance = $.data(this[0], name);
+ return (instance ? instance[options].apply(instance, args)
+ : undefined);
+ }
+
+ // handle initialization and non-getter methods
+ return this.each(function() {
+ var instance = $.data(this, name);
+
+ // constructor
+ (!instance && !isMethodCall &&
+ $.data(this, name, new $[namespace][name](this, options))._init());
+
+ // method call
+ (instance && isMethodCall && $.isFunction(instance[options]) &&
+ instance[options].apply(instance, args));
+ });
+ };
+
+ // create widget constructor
+ $[namespace] = $[namespace] || {};
+ $[namespace][name] = function(element, options) {
+ var self = this;
+
+ this.namespace = namespace;
+ this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
+ this.widgetBaseClass = namespace + '-' + name;
+
+ this.options = $.extend({},
+ $.widget.defaults,
+ $[namespace][name].defaults,
+ $.metadata && $.metadata.get(element)[name],
+ options);
+
+ this.element = $(element)
+ .bind('setData.' + name, function(event, key, value) {
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
+ })
+ .bind('getData.' + name, function(event, key) {
+ if (event.target == element) {
+ return self._getData(key);
+ }
+ })
+ .bind('remove', function() {
+ return self.destroy();
+ });
+ };
+
+ // add widget prototype
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+
+ // TODO: merge getter and getterSetter properties from widget prototype
+ // and plugin prototype
+ $[namespace][name].getterSetter = 'option';
+};
+
+$.widget.prototype = {
+ _init: function() {},
+ destroy: function() {
+ this.element.removeData(this.widgetName)
+ .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
+ .removeAttr('aria-disabled');
+ },
+
+ option: function(key, value) {
+ var options = key,
+ self = this;
+
+ if (typeof key == "string") {
+ if (value === undefined) {
+ return this._getData(key);
+ }
+ options = {};
+ options[key] = value;
+ }
+
+ $.each(options, function(key, value) {
+ self._setData(key, value);
+ });
+ },
+ _getData: function(key) {
+ return this.options[key];
+ },
+ _setData: function(key, value) {
+ this.options[key] = value;
+
+ if (key == 'disabled') {
+ this.element
+ [value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
+ }
+ },
+
+ enable: function() {
+ this._setData('disabled', false);
+ },
+ disable: function() {
+ this._setData('disabled', true);
+ },
+
+ _trigger: function(type, event, data) {
+ var callback = this.options[type],
+ eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+
+ event = $.Event(event);
+ event.type = eventName;
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if (event.originalEvent) {
+ for (var i = $.event.props.length, prop; i;) {
+ prop = $.event.props[--i];
+ event[prop] = event.originalEvent[prop];
+ }
+ }
+
+ this.element.trigger(event, data);
+
+ return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
+ || event.isDefaultPrevented());
+ }
+};
+
+$.widget.defaults = {
+ disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if(self._preventClickEvent) {
+ self._preventClickEvent = false;
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ // Prevent text selection in IE
+ if ($.browser.msie) {
+ this._mouseUnselectable = this.element.attr('unselectable');
+ this.element.attr('unselectable', 'on');
+ }
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+
+ // Restore text selection in IE
+ ($.browser.msie
+ && this.element.attr('unselectable', this._mouseUnselectable));
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ // TODO: figure out why we have to use originalEvent
+ event.originalEvent = event.originalEvent || {};
+ if (event.originalEvent.mouseHandled) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
+ event.originalEvent.mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+ this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+};
+
+$.ui.mouse.defaults = {
+ cancel: null,
+ distance: 1,
+ delay: 0
+};
+
+})(jQuery);
15 years, 9 months
JBoss Rich Faces SVN: r13069 - trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-20 13:13:34 -0400 (Fri, 20 Mar 2009)
New Revision: 13069
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
Log:
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml (rev 0)
+++ trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml 2009-03-20 17:13:34 UTC (rev 13069)
@@ -0,0 +1,51 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:richx="http://richfaces.org/richx"
+ xmlns:rich="http://richfaces.org/rich">
+ <div class="shelf-edit">
+ <table style="border-collapse : collapse;" cellpadding="5" border="0">
+ <tr>
+ <td valign="top" nowrap="true" style="padding-top : 8px">
+ Shelf name
+ </td>
+ <td valign="top" colspan="2">
+ <h:inputText value="#{shelf.name}" styleClass="shelf-edit-input" />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap="true" style="padding-top : 8px">
+ Creation date
+ </td>
+ <td valign="top">
+ <a4j:outputPanel id="calendar" layout="block">
+ <rich:calendar styleClass="shelf-edit-calendar" enableManualInput="true" value="#{shelf.created}"
+ cellWidth="24px" cellHeight="22px">
+ </rich:calendar>
+ </a4j:outputPanel>
+ <rich:message for="calendar" />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" nowrap="true" style="padding-top : 8px">
+ Description
+ </td>
+ <td valign="top" colspan="2">
+ <h:inputTextarea value="#{shelf.description}" styleClass="shelf-edit-area" />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+
+
+ </td>
+ <td width="100%" valign="top" align="right" colspan="2" style="padding : 10px;">
+ <richx:commandButton id="cancelButton" value="Cancel" style="float: left" immediate="true" actionListener="#{controller.cancelEditShelf(shelf)}" reRender="mainArea" />
+ <richx:commandButton id="saveButton" value="Save" actionListener="#{shelfManager.editShelf(shelf)}" reRender="mainArea" />
+ </td>
+ </tr>
+ </table>
+ </div>
+</ui:composition>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r13068 - trunk/test-applications/realworld2/web/src/main/webapp/includes/album.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-20 13:12:10 -0400 (Fri, 20 Mar 2009)
New Revision: 13068
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumEditInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
Log:
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumEditInfo.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumEditInfo.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
15 years, 9 months
JBoss Rich Faces SVN: r13067 - in trunk/test-applications/realworld2/web: src/main/java/org/richfaces/realworld/listener and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-20 13:11:11 -0400 (Fri, 20 Mar 2009)
New Revision: 13067
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumsList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelvesList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbums.xhtml
Removed:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/albums.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelves.xhtml
Modified:
trunk/test-applications/realworld2/web/META-INF/MANIFEST.MF
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/tags/RealworldCommandButtonRenderer.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ConfirmationPopupHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/PasswordHolder.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FileManagerTest.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/album.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/albumEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/albumUnvisited.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageAdditionalInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageEditInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/imageEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/images.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/publicShelves.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfUnvisited.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/tag.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedImages.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelves.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template.xhtml
Log:
Modified: trunk/test-applications/realworld2/web/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/realworld2/web/META-INF/MANIFEST.MF 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/META-INF/MANIFEST.MF 2009-03-20 17:11:11 UTC (rev 13067)
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Class-Path: avalon-framework-4.1.3.jar commons-beanutils-1.7.0.jar com
- mons-digester-1.8.jar commons-logging-1.1.jar jboss-seam-debug-2.1.0.
+ mons-digester-2.0.jar commons-logging-1.1.jar jboss-seam-debug-2.1.0.
SP1.jar jboss-seam-jul-2.1.0.SP1.jar jboss-seam-remoting-2.1.0.SP1.ja
r jboss-seam-ui-2.1.0.SP1.jar jsf-facelets-1.1.14.jar junit-3.8.jar l
og4j-1.2.14.jar logkit-1.0.1.jar metadata-extractor-2.4.0-beta1.jar r
- ichfaces-impl-3.3.0.GA.jar richfaces-ui-3.3.0.GA.jar
+ ichfaces-impl-3.3.1-SNAPSHOT.jar richfaces-ui-3.3.1-SNAPSHOT.jar
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -4,18 +4,12 @@
package org.richfaces.realworld.listener;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.Properties;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Contexts;
-import org.richfaces.realworld.manager.FileManager;
-
/**
* @author Andrey Markavtsov
*
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -23,6 +23,7 @@
import java.io.Serializable;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
@@ -32,29 +33,26 @@
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IAlbumAction;
import org.richfaces.realworld.util.FlushStrategy;
@Name("albumManager")
@Scope(ScopeType.CONVERSATION)
+@AutoCreate
public class AlbumManager implements Serializable{
private static final long serialVersionUID = 2631634926126857691L;
private String oncomplete = ";";
- @In(create=true) FlushStrategy flushStrategy;
- @In(create=true, required=true)
- private IAlbumAction albumAction;
+ @In FlushStrategy flushStrategy;
+ @In private IAlbumAction albumAction;
@In(create=true, required=true) @Out
private Album album;
- @In
- private User user;
+ @In private User user;
- @In(create=true)
- FileManager fileManager;
+ @In FileManager fileManager;
@In FacesMessages facesMessages;
@In @Out Model model;
@@ -65,8 +63,7 @@
}
albumAction.addAlbum(album, flushStrategy.isDatabaseStoreStrategy());
addDirectory();
- model.setSelectedImage(null);
- model.setSelectedAlbum(album);
+ model.resetModel(model.getMainArea(), model.getSelectedUser(), model.getSelectedShelf(), album, null);
Events.instance().raiseEvent("albumAdded");
Events.instance().raiseEvent("clearTree");
setOncomplete();
@@ -79,8 +76,7 @@
public void editAlbum(Album album){
albumAction.editAlbum(album, flushStrategy.isDatabaseStoreStrategy());
- model.setSelectedAlbum(album);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.ALBUM_PREVIEW);
+ model.resetModel(NavigationEnum.ALBUM_PREVIEW, model.getSelectedUser(), model.getSelectedShelf(), album, null);
Events.instance().raiseEvent("albumEdited");
}
@@ -89,8 +85,7 @@
String string = album.getId().toString();
albumAction.deleteAlbum(album, flushStrategy.isDatabaseStoreStrategy());
deleteDirectory(string);
- model.setSelectedImage(null);
- model.setSelectedAlbum(null);
+ model.resetModel(model.getMainArea(), model.getSelectedUser(), model.getSelectedShelf(), null, null);
Events.instance().raiseEvent("albumDeleted");
Events.instance().raiseEvent("clearTree");
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -22,13 +22,9 @@
import java.io.Serializable;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
import javax.security.auth.login.LoginException;
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;
@@ -42,16 +38,16 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.web.Session;
import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IUserAction;
import org.richfaces.realworld.ui.PasswordHolder;
-import org.richfaces.realworld.service.Constants;
@Name("authenticator")
@Scope(ScopeType.CONVERSATION)
public class Authenticator implements Serializable
{
- @In(create=true) ShelfManager shelfManager;
+ @In ShelfManager shelfManager;
@In("#{messages['invalid_login']}")
private String INVALID_LOGIN_OR_PASSWORD;
@@ -60,7 +56,7 @@
private static final long serialVersionUID = -4585673256547342140L;
- @In(create=true) PasswordHolder passwordHolder;
+ @In PasswordHolder passwordHolder;
@Logger Log log;
@@ -73,11 +69,9 @@
@In("#{conversation}") @Out
Conversation conversation;
- @In(create = true)
- IUserAction userAction;
+ @In IUserAction userAction;
- @In
- FileManager fileManager;
+ @In FileManager fileManager;
@In(create=true) @Out Model model;
@@ -112,7 +106,7 @@
User user = userAction.login(credentials.getUsername(), passwordHolder.hash(credentials.getPassword()));
if (user != null) {
identity.addRole(Constants.ADMIN_ROLE);
- model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null, null);
+ model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null);
return true;
}
} catch (Exception nre) {
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -21,11 +21,7 @@
package org.richfaces.realworld.manager;
import java.io.Serializable;
-import java.util.Map;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -33,9 +29,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
import org.jboss.seam.core.Events;
-import org.richfaces.component.UIDatascroller;
import org.richfaces.event.DataScrollerEvent;
-import org.richfaces.event.scroll.ScrollEvent;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.MetaTag;
@@ -59,15 +53,15 @@
private User user;
public void selectShelfs(){
- model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null, null );
+ model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null);
}
public void selectAlbums(){
- model.resetModel(NavigationEnum.ALL_ALBUMS, user, null, null, null, null );
+ model.resetModel(NavigationEnum.ALL_ALBUMS, user, null, null, null);
}
public void selectImages(){
- model.resetModel(NavigationEnum.ALL_IMAGES, user, null, null, null, null );
+ model.resetModel(NavigationEnum.ALL_IMAGES, user, null, null, null);
}
public void startEditShelf(Shelf shelf){
@@ -75,7 +69,7 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
- model.resetModel(NavigationEnum.SHELF_EDIT, shelf.getOwner(), shelf, null, null, null );
+ model.resetModel(NavigationEnum.SHELF_EDIT, shelf.getOwner(), shelf, null, null);
}
public void cancelEditShelf(Shelf shelf){
@@ -87,7 +81,7 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
- model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null, null );
+ model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null);
}
public void showImage(Image image){
@@ -95,7 +89,7 @@
pushEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
- model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image, null );
+ model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image);
model.setSelectedImageIndex(model.getSelectedAlbum().getIndex(model.getSelectedImage())+1);
image.getAlbum().getShelf().visitImage(image);
image.getAlbum().visitImage(image);
@@ -105,7 +99,7 @@
Integer index = e.getPage();
model.setSelectedImageIndex(index);
Image image = model.getSelectedAlbum().getImages().get(index - 1);
- model.setSelectedImage(image);
+ model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image);
image.getAlbum().visitImage(image);
image.getAlbum().getShelf().visitImage(image);
}
@@ -123,7 +117,7 @@
}
public void showShelf(Shelf shelf){
- model.resetModel(NavigationEnum.SHELF_PREVIEW, shelf.getOwner(), shelf, null, null, null);
+ model.resetModel(NavigationEnum.SHELF_PREVIEW, shelf.getOwner(), shelf, null, null);
}
public boolean isUserImage(Image image){
@@ -150,11 +144,11 @@
}
public void showSharedAlbums(User user){
- model.resetModel(NavigationEnum.USER_SHARED_ALBUMS, user, null, null, null, null);
+ model.resetModel(NavigationEnum.USER_SHARED_ALBUMS, user, null, null, null);
}
public void showSharedImages(User user){
- model.resetModel(NavigationEnum.USER_SHARED_IMAGES, user, null, null, null, null);
+ model.resetModel(NavigationEnum.USER_SHARED_IMAGES, user, null, null, null);
}
public boolean isAccessToAlbumGranted(Album album){
@@ -173,19 +167,20 @@
}
public void showUser(User user){
- model.resetModel(NavigationEnum.USER_PREFS, user, null, null, null, null);
+ model.resetModel(NavigationEnum.USER_PREFS, user, null, null, null);
}
public void showUnvisitedImages(Shelf shelf){
- model.resetModel(NavigationEnum.SHELF_UNVISITED, shelf.getOwner(), shelf, shelf.getFirstAlbum(), null, null);
+ model.resetModel(NavigationEnum.SHELF_UNVISITED, shelf.getOwner(), shelf, shelf.getFirstAlbum(), null);
}
public void showUnvisitedImages(Album album){
- model.resetModel(NavigationEnum.ALBUM_UNVISITED, album.getOwner(), album.getShelf(), album, null, null);
+ model.resetModel(NavigationEnum.ALBUM_UNVISITED, album.getOwner(), album.getShelf(), album, null);
}
public void showTag(MetaTag metatag){
- model.resetModel(NavigationEnum.TAGS, model.getSelectedUser(), model.getSelectedShelf(), model.getSelectedAlbum(), model.getSelectedImage(), metatag);
+ model.resetModel(NavigationEnum.TAGS, model.getSelectedUser(), model.getSelectedShelf(), model.getSelectedAlbum(), model.getSelectedImage());
+ model.setSelectedTag(metatag);
}
private boolean canViewShelf(Shelf shelf) {
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -39,11 +39,9 @@
public class DnDManager implements DropListener {
@In User user;
- @In(create=true)
- FileManager fileManager;
- @In(create=true)
- IAlbumAction albumAction;
- @In(create=true) FlushStrategy flushStrategy;
+ @In FileManager fileManager;
+ @In IAlbumAction albumAction;
+ @In FlushStrategy flushStrategy;
public void processDrop(DropEvent dropEvent) {
Dropzone dropzone = (Dropzone) dropEvent.getComponent();
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -34,7 +34,6 @@
import java.util.List;
import java.util.Properties;
-import javax.faces.context.FacesContext;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.ImageWriter;
@@ -44,7 +43,6 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
import org.richfaces.realworld.service.Constants;
@Name("fileManager")
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -21,8 +21,10 @@
package org.richfaces.realworld.manager;
import java.util.Date;
+import java.util.List;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
@@ -31,6 +33,7 @@
import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IImageAction;
@@ -39,21 +42,18 @@
@Name("imageManager")
@Scope(ScopeType.CONVERSATION)
+@AutoCreate
public class ImageManager {
- @In(create=true, required=true)
- private IImageAction imageAction;
+ @In IImageAction imageAction;
@In FlushStrategy flushStrategy;
- @In(create=true)
- FileManager fileManager;
+ @In FileManager fileManager;
@In @Out Model model;
- @In
- private User user;
+ @In private User user;
- @In(create=true)
- private DirectLinkHelper directLink;
+ @In private DirectLinkHelper directLink;
public void deleteImage(Image image){
String imagePath = image.getPath();
@@ -71,8 +71,7 @@
@Observer(Constants.ADD_IMAGE_EVENT)
public void addImage(Image image) {
imageAction.addImage(image, flushStrategy.isDatabaseStoreStrategy());
- model.setSelectedAlbum(image.getAlbum());
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.ALBUM_IMAGE_PREVIEW);
+ model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, model.getSelectedUser(), model.getSelectedShelf(), image.getAlbum(), image);
Events.instance().raiseEvent("imageAdded");
}
@@ -97,4 +96,8 @@
public String getImageDirectLink(Image image) {
return directLink.getDirectImageLink(image.getId());
}
+
+ public List<MetaTag> popularTags(){
+ return imageAction.popularTags();
+ }
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -29,12 +29,11 @@
private NavigationEnum mainArea;
- public void resetModel(NavigationEnum mainArea, User selectedUser, Shelf selectedShelf, Album selectedAlbum, Image selectedImage, MetaTag selectedTag){
+ public void resetModel(NavigationEnum mainArea, User selectedUser, Shelf selectedShelf, Album selectedAlbum, Image selectedImage){
this.setMainArea(mainArea);
this.setSelectedAlbum(selectedAlbum);
this.setSelectedImage(selectedImage);
this.setSelectedShelf(selectedShelf);
- this.setSelectedTag(selectedTag);
this.setSelectedUser(selectedUser);
}
@@ -59,7 +58,7 @@
return selectedImage;
}
- public void setSelectedImage(Image selectedImage) {
+ private void setSelectedImage(Image selectedImage) {
this.selectedImage = selectedImage;
}
@@ -67,7 +66,7 @@
return selectedAlbum;
}
- public void setSelectedAlbum(Album selectedAlbum) {
+ private void setSelectedAlbum(Album selectedAlbum) {
this.selectedAlbum = selectedAlbum;
}
@@ -75,7 +74,7 @@
return selectedUser;
}
- public void setSelectedUser(User selectedUser) {
+ private void setSelectedUser(User selectedUser) {
this.selectedUser = selectedUser;
}
@@ -83,7 +82,7 @@
return selectedShelf;
}
- public void setSelectedShelf(Shelf selectedShelf) {
+ private void setSelectedShelf(Shelf selectedShelf) {
this.selectedShelf = selectedShelf;
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/NavigationEnum.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -30,7 +30,7 @@
SHELF_PREVIEW("/includes/shelf.xhtml"),
ALL_SHELFS("/includes/userShelves.xhtml"),
TAGS("includes/tag.xhtml"),
- ALL_ALBUMS("/includes/albums.xhtml"),
+ ALL_ALBUMS("/includes/userAlbums.xhtml"),
ALL_IMAGES("/includes/images.xhtml"),
ALBUM_IMAGE_EDIT("/includes/imageEdit.xhtml"),
ALBUM_EDIT("/includes/albumEdit.xhtml"),
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -3,14 +3,12 @@
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.security.auth.login.LoginException;
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.faces.FacesMessages;
import org.jboss.seam.log.Log;
@@ -40,9 +38,8 @@
@In FacesMessages facesMessages;
- @In(create=true) PasswordHolder passwordHolder;
- @In(create = true)
- IUserAction userAction;
+ @In PasswordHolder passwordHolder;
+ @In IUserAction userAction;
@End
public String register(User user){
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -25,6 +25,7 @@
import java.util.List;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
@@ -35,26 +36,24 @@
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IShelfAction;
import org.richfaces.realworld.util.FlushStrategy;
@Name("shelfManager")
@Scope(ScopeType.CONVERSATION)
+@AutoCreate
public class ShelfManager implements Serializable{
private static final long serialVersionUID = 2631634926126857691L;
private List<Shelf> shelfs;
- @In private FileManager fileManager;
- @In(create=true, required=true)
- private IShelfAction shelfAction;
+ @In FileManager fileManager;
+ @In IShelfAction shelfAction;
private String oncomplete = ";";
@In FlushStrategy flushStrategy;
@In @Out Model model;
- @In
- private User user;
+ @In User user;
public void initEdit(){
Shelf shelf = new Shelf();
@@ -63,9 +62,7 @@
public void addShelf(Shelf shelf){
shelfAction.addShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
- model.setSelectedImage(null);
- model.setSelectedAlbum(null);
- model.setSelectedShelf(shelf);
+ model.resetModel(model.getMainArea(), model.getSelectedUser(),shelf, null, null);
setOncomplete();
Events.instance().raiseEvent("clearTree");
}
@@ -76,8 +73,7 @@
public void editShelf(Shelf shelf){
shelfAction.editShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
- model.setSelectedShelf(shelf);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.SHELF_PREVIEW);
+ model.resetModel(NavigationEnum.SHELF_PREVIEW, model.getSelectedUser(),shelf, null, null);
}
public void deleteShelf(Shelf shelf){
@@ -88,7 +84,7 @@
}
shelfAction.deleteShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
deleteDirectories(directoriesToDelete);
- model.resetModel(NavigationEnum.ALL_SHELFS, model.getSelectedUser(), null, null, null, null);
+ model.resetModel(NavigationEnum.ALL_SHELFS, model.getSelectedUser(), null, null, null);
Events.instance().raiseEvent("clearTree");
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/TreeManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -7,14 +7,10 @@
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.component.UITree;
-import org.richfaces.component.html.HtmlTree;
-import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.service.Constants;
@Name("treeManager")
@Scope(ScopeType.CONVERSATION)
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -21,9 +21,7 @@
package org.richfaces.realworld.manager;
import java.io.Serializable;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
@@ -32,7 +30,6 @@
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.IUserAction;
@@ -42,15 +39,11 @@
private static final long serialVersionUID = 6027103521084558931L;
- @In
- private User user;
+ @In private User user;
private Long countImages;
private Long countAlbums;
- private Long countSharedImages;
- private Long countSharedAlbums;
- @In(create=true, required=true)
- private IUserAction userAction;
+ @In private IUserAction userAction;
public Long countImages(User u) {
if(null == countImages ){
@@ -60,17 +53,11 @@
}
public Long countSharedImages(User u) {
- if(null == countSharedImages ){
- countSharedImages = userAction.countSharedImages(u);
- }
- return countSharedImages;
+ return userAction.countSharedImages(u);
}
public Long countSharedAlbums(User u) {
- if(null == countSharedAlbums ){
- countSharedAlbums = userAction.countSharedAlbums(user);
- }
- return countSharedAlbums;
+ return userAction.countSharedAlbums(user);
}
public Long countAlbums(User u) {
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -6,16 +6,12 @@
import java.util.Iterator;
import java.util.List;
-import javax.faces.event.ActionEvent;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
-import org.richfaces.realworld.manager.Controller;
import org.richfaces.realworld.manager.NavigationEnum;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.ISearchAction;
@@ -26,8 +22,7 @@
private static final long serialVersionUID = -304368268896942902L;
- @In(create=true, required=true)
- ISearchAction searchAction;
+ @In ISearchAction searchAction;
ISearchOption selectedOption;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByAlbum.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -4,7 +4,6 @@
import java.util.List;
import java.util.Map;
-import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByImage.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -7,7 +7,6 @@
import java.util.List;
import java.util.Map;
-import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByTag.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -5,7 +5,6 @@
import java.util.List;
-import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByUser.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -5,7 +5,6 @@
import java.util.List;
-import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.service.ISearchAction;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/tags/RealworldCommandButtonRenderer.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/tags/RealworldCommandButtonRenderer.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/tags/RealworldCommandButtonRenderer.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -8,10 +8,8 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.render.Renderer;
import org.ajax4jsf.renderkit.AjaxCommandRendererBase;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ConfirmationPopupHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ConfirmationPopupHelper.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/ConfirmationPopupHelper.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -21,10 +21,7 @@
package org.richfaces.realworld.ui;
import java.io.Serializable;
-import java.util.ArrayList;
-import javax.faces.event.ActionEvent;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -32,7 +29,6 @@
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.manager.AlbumManager;
import org.richfaces.realworld.manager.ImageManager;
@@ -57,14 +53,11 @@
@In(create=true, required=true) @Out(required=false)
private Album album;
- @In(create=true)
- private AlbumManager albumManager;
+ @In AlbumManager albumManager;
- @In(create=true)
- private ShelfManager shelfManager;
+ @In ShelfManager shelfManager;
- @In(create=true)
- private ImageManager imageManager;
+ @In ImageManager imageManager;
public void initImagePopup( String actionName, String caption, Image image){
this.caption = caption;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/PasswordHolder.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/PasswordHolder.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/PasswordHolder.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -1,10 +1,13 @@
package org.richfaces.realworld.ui;
import java.security.MessageDigest;
+
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.util.Hex;
@Name("passwordHolder")
+@AutoCreate
public class PasswordHolder {
private String digestAlgorithm;
private String charset;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -21,7 +21,6 @@
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.manager.FileManager;
import org.richfaces.realworld.manager.Model;
-import org.richfaces.realworld.manager.RegistrationManager;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IUserAction;
import org.richfaces.realworld.util.FlushStrategy;
@@ -34,15 +33,12 @@
@Scope(ScopeType.SESSION)
public class UserPrefsHelper {
- @In(create=true)
- IUserAction userAction;
+ @In IUserAction userAction;
- @In(create=true)
- FileManager fileManager;
+ @In FileManager fileManager;
@In FlushStrategy flushStrategy;
@In(create=true) @Out Model model;
- @In
- User user;
+ @In User user;
Boolean avatarModalOpened = false;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -15,17 +15,20 @@
import javax.servlet.http.HttpServletRequest;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.core.Events;
+import org.jboss.seam.security.Identity;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.manager.FileManager;
import org.richfaces.realworld.service.Constants;
@Name("directLink")
@Scope(ScopeType.SESSION)
+@AutoCreate
public class DirectLinkHelper {
@In(value="entityManager")
protected EntityManager em;
@@ -34,41 +37,47 @@
@RequestParameter
protected Long imageId;
+ @In Identity identity;
+
private Long id;
private static final String IMAGE_DIRECT_LINK = "/includes/directImage.seam?imageId=";
private static String imageDirectLinkPrefix;
-
public synchronized void paintImage(OutputStream out, Object data)
throws IOException {
Image im = em.find(Image.class, id);
- File imageResource = fileManager.getImage(im.getPath());
- if (imageResource != null) {
- FileInputStream fileInputStream = new FileInputStream(imageResource);
- BufferedInputStream bufferedInputStream = new BufferedInputStream(
- fileInputStream);
- InputStream paintData = bufferedInputStream;
- if (null == paintData) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
- new Exception(""));
- return;
+ if(im.getAlbum().getShelf().isShared() || (identity.hasRole("admin") && im.getAlbum().getOwner().getLogin().equals(identity.getUsername()))){
+ File imageResource = fileManager.getImage(im.getPath());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(
+ fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
+ new Exception(""));
+ return;
+ }
+ try {
+ BufferedImage images = ImageIO.read(paintData);
+ ImageIO.write(images, Constants.JPEG, out);
+ } catch (Exception e) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
+ new Exception(""));
+ return;
+ } finally {
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
}
- try {
- BufferedImage images = ImageIO.read(paintData);
- ImageIO.write(images, Constants.JPEG, out);
- } catch (Exception e) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
- new Exception(""));
- return;
- } finally {
- fileInputStream.close();
- bufferedInputStream.close();
- paintData.close();
- }
+ }else{
+ return;
}
}
+
public void start(){
id=imageId;
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FileManagerTest.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FileManagerTest.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FileManagerTest.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -1,11 +1,9 @@
package org.richfaces.realworld.util;
-import java.io.IOException;
+import junit.framework.TestCase;
import org.richfaces.realworld.manager.FileManager;
-import junit.framework.TestCase;
-
public class FileManagerTest extends TestCase {
protected void setUp() throws Exception {
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2009-03-20 17:11:11 UTC (rev 13067)
@@ -45,8 +45,7 @@
private static final long serialVersionUID = -1572789608594870285L;
- @In(create=true)
- FileManager fileManager;
+ @In FileManager fileManager;
@In("#{messages['file_processing_error']}")
private String FILE_PROCESSING_ERROR;
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumPreview.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumsList.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumsList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/albumEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/albumUnvisited.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/includes/albums.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageAdditionalInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageEditInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/imageEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/images.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/publicShelves.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-20 17:10:23 UTC (rev 13066)
+++ trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-20 17:11:11 UTC (rev 13067)
@@ -16,8 +16,8 @@
<a4j:mediaOutput rendered="#{!album.isEmpty()}" id="img" element="img"
createContent="#{imageLoader.paintImage}"
styleClass="album-cover-image"
- style="#{richx:rectangle(album.lastImage.width, album.lastImage.height, 120)}"
- value="#{fileManager.transformPath(album.lastImage.path, '_mini')}">
+ style="#{richx:rectangle(album.coveringImage.width, album.coveringImage.height, 120)}"
+ value="#{fileManager.transformPath(album.coveringImage.path, '_mini')}">
</a4j:mediaOutput>
<h:graphicImage rendered="#{album.isEmpty()}"
style="width:80px; height:80px;"
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfPreview.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelves.xhtml
===================================================================
(Binary files differ)
Copied: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelvesList.xhtml (from rev 13053, trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelves.xhtml)
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfUnvisited.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/tag.xhtml
===================================================================
(Binary files differ)
Copied: trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbums.xhtml (from rev 13053, trunk/test-applications/realworld2/web/src/main/webapp/includes/albums.xhtml)
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedImages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelves.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13066 - in trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-20 13:10:23 -0400 (Fri, 20 Mar 2009)
New Revision: 13066
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
Log:
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -36,6 +36,7 @@
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@@ -99,6 +100,9 @@
@Transient
private Long countUnvisitedImages;
+ @OneToOne(cascade=CascadeType.ALL, optional=true)
+ private Image coveringImage;
+
// ********************** Accessor Methods ********************** //
@@ -222,9 +226,13 @@
return -1;
}
- public Image getLastImage(){
+ public Image getCoveringImage(){
+ if(coveringImage != null){
+ return coveringImage;
+ }
if(images != null && images.size() > 0){
- return images.get(images.size() - 1);
+ coveringImage = images.get(0);
+ return images.get(0);
}else{
return null;
}
@@ -270,4 +278,8 @@
countUnvisitedImages--;
}
}
+
+ public void setCoveringImage(Image coveringImage) {
+ this.coveringImage = coveringImage;
+ }
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -87,6 +87,8 @@
@NotEmpty
@Length(min=3)
private String name;
+ @Transient
+ private Boolean covering;
@Column(length = 1024, nullable = false)
@NotNull
@@ -326,5 +328,13 @@
public void setAllowComments(boolean allowComments) {
this.allowComments = allowComments;
}
+
+ public boolean isCovering() {
+ return this.equals(this.getAlbum().getCoveringImage());
+ }
+
+ public void setCovering(Boolean covering) {
+ this.covering = covering;
+ }
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -31,7 +31,6 @@
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -28,16 +28,17 @@
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
@Name("albumAction")
@Stateless
+@AutoCreate
public class AlbumAction implements IAlbumAction {
@In(value="entityManager")
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -20,6 +20,8 @@
*/
package org.richfaces.realworld.service;
+import java.util.List;
+
import javax.ejb.Local;
import org.richfaces.realworld.domain.Comment;
@@ -41,4 +43,6 @@
public abstract MetaTag getTagByName(String tag);
+ public abstract List<MetaTag> popularTags();
+
}
\ No newline at end of file
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -1,12 +1,10 @@
package org.richfaces.realworld.service;
-import java.util.Date;
import java.util.List;
import javax.ejb.Local;
-import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -20,9 +20,12 @@
*/
package org.richfaces.realworld.service;
+import java.util.List;
+
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.richfaces.realworld.domain.Comment;
@@ -31,6 +34,7 @@
@Name("imageAction")
@Stateless
+@AutoCreate
public class ImageAction implements IImageAction {
@In(value="entityManager")
@@ -58,6 +62,11 @@
image.addMetaTag(t);
}
}*/
+ if(image.isCovering()){
+ if(!image.equals(image.getAlbum().getCoveringImage())){
+ image.getAlbum().setCoveringImage(image);
+ }
+ }
if(isFlushNeeded){
em.flush();
}
@@ -101,4 +110,8 @@
public MetaTag getTagByName(String tag) {
return (MetaTag)em.createQuery("from MetaTag m where m.tag =:tag").setParameter("tag", tag).getSingleResult();
}
+
+ public List<MetaTag> popularTags() {
+ return (List<MetaTag>)em.createQuery("from MetaTag m order by count(m.images) desc").setMaxResults(20).getResultList();
+ }
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/SearchAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -6,6 +6,7 @@
import javax.persistence.EntityManager;
import javax.persistence.Query;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
@@ -14,6 +15,7 @@
@Name("searchAction")
@Stateless
+@AutoCreate
@SuppressWarnings("unchecked")
public class SearchAction implements ISearchAction {
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-20 17:02:34 UTC (rev 13065)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-20 17:10:23 UTC (rev 13066)
@@ -30,16 +30,17 @@
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
-import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
@Name("shelfAction")
@Stateless
+@AutoCreate
public class ShelfAction implements IShelfAction {
@In(value="entityManager")
15 years, 9 months
JBoss Rich Faces SVN: r13065 - in trunk/framework/impl: src/main/javascript/jquery and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-03-20 13:02:34 -0400 (Fri, 20 Mar 2009)
New Revision: 13065
Modified:
trunk/framework/impl/generatescript.xml
trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
Log:
https://jira.jboss.org/jira/browse/RF-6465
Modified: trunk/framework/impl/generatescript.xml
===================================================================
--- trunk/framework/impl/generatescript.xml 2009-03-20 16:48:46 UTC (rev 13064)
+++ trunk/framework/impl/generatescript.xml 2009-03-20 17:02:34 UTC (rev 13065)
@@ -50,7 +50,7 @@
-->
<filelist id="jquery"
dir="${basedir}/src/main/javascript/jquery"
- files="jquery-1.3.2.js,noConflict.js,../memory.js,patches.js">
+ files="jquery-1.3.2.js,../memory.js,patches.js">
</filelist>
<filelist id="scriptaculous"
Modified: trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-03-20 16:48:46 UTC (rev 13064)
+++ trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-03-20 17:02:34 UTC (rev 13065)
@@ -21,7 +21,7 @@
// Map over the $ in case of overwrite
_$ = window.$,
- jQuery = window.jQuery = window.$ = function( selector, context ) {
+ jQuery = window.jQuery = window.j$ = function( selector, context ) {
// RF: added for RichFaces components
if (arguments[0] == arguments.callee) {
return arguments.callee;
15 years, 9 months
JBoss Rich Faces SVN: r13064 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-03-20 12:48:46 -0400 (Fri, 20 Mar 2009)
New Revision: 13064
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java
Log:
RF-6523
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java 2009-03-20 16:31:17 UTC (rev 13063)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/tree/TreeTestBean.java 2009-03-20 16:48:46 UTC (rev 13064)
@@ -108,7 +108,7 @@
Object state = null;
if(null != draggedNodeKey) {
// 1. mark its parent as wanting rerendering
- tree.addRequestKey(tree.getTreeNodeRowKey(draggedNode.getParent()));
+ tree.addRequestKey(draggedNodeKey.getParentKey());
// 2. remove node from tree
state = tree.removeNode(draggedNodeKey);
// 3. add the node at the new place
15 years, 9 months
JBoss Rich Faces SVN: r13063 - trunk/samples/dropdownmenu-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-03-20 12:31:17 -0400 (Fri, 20 Mar 2009)
New Revision: 13063
Modified:
trunk/samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
Log:
https://jira.jboss.org/jira/browse/RF-5226
Modified: trunk/samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2009-03-20 16:13:09 UTC (rev 13062)
+++ trunk/samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2009-03-20 16:31:17 UTC (rev 13063)
@@ -350,7 +350,8 @@
</f:verbatim>
</h:panelGrid>
</h:panelGroup>
-
+ <mc:menuItem id="mymenuGroup11Item" value="Active" />
+
</h:form>
</f:view>
</body>
15 years, 10 months