JBoss Rich Faces SVN: r5485 - in trunk/docs/userguide/en/src/main/resources: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-01-21 06:27:01 -0500 (Mon, 21 Jan 2008)
New Revision: 5485
Modified:
trunk/docs/userguide/en/src/main/resources/css/html.css
trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
Log:
http://jira.jboss.com/jira/browse/JBDS-224
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2008-01-21 10:19:13 UTC (rev 5484)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2008-01-21 11:27:01 UTC (rev 5485)
@@ -112,7 +112,7 @@
}
DIV.note{
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #FFFDD3;
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #cfe3ff;
background-image : url('../images/ico_note.gif'); background-repeat : no-repeat; background-position :top left;
}
@@ -127,7 +127,7 @@
MARGIN-TOP: 0px; MARGIN-BOTTOM: 1em; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
DIV.important {
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #CFE3FF;
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #fee3d9;
background-image : url('../images/ico_important.gif'); background-repeat : no-repeat; background-position :top left;
}
@@ -141,7 +141,7 @@
}
DIV.tip {
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #CFE3FF; background-repeat : no-repeat; background-position :top left;
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #CFE3FF; background-repeat : no-repeat; background-position :top left; background-image : url('../images/ico_tip.gif');
}
DIV.tip *{
Modified: trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
===================================================================
(Binary files differ)
16 years, 11 months
JBoss Rich Faces SVN: r5483 - trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-21 05:18:43 -0500 (Mon, 21 Jan 2008)
New Revision: 5483
Modified:
trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml
Log:
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml 2008-01-21 09:03:12 UTC (rev 5482)
+++ trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml 2008-01-21 10:18:43 UTC (rev 5483)
@@ -2,7 +2,16 @@
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
+ <<!--
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
<context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param> -->
+ <context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
16 years, 11 months
JBoss Rich Faces SVN: r5482 - trunk/sandbox/ui/combobox/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-21 04:03:12 -0500 (Mon, 21 Jan 2008)
New Revision: 5482
Modified:
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
fix small bugs
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-21 09:02:40 UTC (rev 5481)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-21 09:03:12 UTC (rev 5482)
@@ -181,19 +181,7 @@
]]>
</jsp:scriptlet>
- <jsp:scriptlet>
- <![CDATA[
- if (listWidth == null) {
- ]]>
- </jsp:scriptlet>
- <style>
-
- </style>
- <jsp:scriptlet>
- <![CDATA[
- }
- ]]>
- </jsp:scriptlet>
+
<div id="#{clientId}">
<div id="control#{clientId}" class="rich-combobox-font rich-combobox-shell #{styleClass}" style="width:#{listWidth}; z-index:1;#{style}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
@@ -204,17 +192,19 @@
class="rich-combobox-font-inactive rich-combobox-input-inactive #{inputDisabledClass}" type="text"
value="#{value}"
size="#{inputSize}"
- autocomplete="off"
onchange="#{component.attributes['onchange']}"
onselect="#{component.attributes['onselect']}"
onblur="#{component.attributes['onblur']}"
- style="width:#{width}; #{inputStyle}"
- />
- <input id="comboBoxButtonBG#{clientId}" readonly="true" type="text" value="" class="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"/>
- <input id="comboboxButton#{clientId}" readonly="true" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}; background-image: #{buttonIconNormal};"
- class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonDisabledClass}"/>
+ style="width:#{width}; #{inputStyle}">
+ </input>
+ <input id="comboBoxButtonBG#{clientId}" readonly="readonly" type="text" value="" class="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive">
+ </input>
+ <input id="comboboxButton#{clientId}" readonly="readonly" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}; background-image: #{buttonIconNormal};"
+ class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonDisabledClass}">
+ </input>
- <input type="text" class="rich-combobox-strut rich-combobox-font" style="width:#{width}"/>
+ <input type="text" class="rich-combobox-strut rich-combobox-font" style="width:#{width}">
+ </input>
</div>
</div>
<iframe id="iframe#{clientId}" class="rich-combobox-list-scroll rich-combobox-list-position" frameborder="0" style="display:none; width:#{listWidth};z-index:2;"/>
16 years, 11 months
JBoss Rich Faces SVN: r5481 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-21 04:02:40 -0500 (Mon, 21 Jan 2008)
New Revision: 5481
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-19 02:52:39 UTC (rev 5480)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-21 09:02:40 UTC (rev 5481)
@@ -648,7 +648,7 @@
},
createItem : function(text, className) {
- return "<span class=" + className+ ">" + text + "</span>";
+ return "<span class=\"" + className+ "\">" + text + "</span>";
}
}
16 years, 11 months
JBoss Rich Faces SVN: r5480 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-18 21:52:39 -0500 (Fri, 18 Jan 2008)
New Revision: 5480
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-1939
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-19 01:48:48 UTC (rev 5479)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-19 02:52:39 UTC (rev 5480)
@@ -975,18 +975,27 @@
}
// if($(topLevel)){ CH-1518
- var onmouseover = function(e){
- if (!e) {
- e = window.event;
- }
-
+ var menuOn = function(e) {
RichFaces.Menu.Layers.showDropDownLayer(this.id, topLevel, e,this.delay);
+ };
+
+ var mouseover = function(e) {
if (options.disabled == false && !RichFaces.Menu.isWithin(e, $(topLevel))) {
this.highlightLabel();
}
-
- }.bindAsEventListener(this);
+ };
+ var menuOff = function(e) {
+ RichFaces.Menu.Layers.setLMTO(this.hideDelay);
+ RichFaces.Menu.Layers.clearPopUpTO();
+ };
+
+ var mouseout = function(e){
+ if (options.disabled == false && !RichFaces.Menu.isWithin(e, $(topLevel))) {
+ this.unHighlightLabel();
+ }
+ };
+
if(!onEvt){
onEvt = 'onmouseover';
}
@@ -996,24 +1005,32 @@
}
offEvt = this.eventJsToPrototype(offEvt);
- var dis = this;
- var onmouseout =
- function(e){
- RichFaces.Menu.Layers.setLMTO(this.hideDelay);
- RichFaces.Menu.Layers.clearPopUpTO();
- if (options.disabled == false && !RichFaces.Menu.isWithin(e, $(topLevel))) {
- this.unHighlightLabel();
- }
- }.bindAsEventListener(this);
+ var addBinding = function(eventName, handler) {
+ var binding = new RichFaces.Menu.Layer.Binding(topLevel, eventName, handler);
+ this.bindings.push(binding);
+ binding.refresh();
+ }.bind(this);
-// var item = $(topLevel);
- var binding = new RichFaces.Menu.Layer.Binding(topLevel,onEvt, onmouseover);
- this.bindings.push(binding);
- binding.refresh();
- binding = new RichFaces.Menu.Layer.Binding (topLevel, offEvt, onmouseout);
- this.bindings.push(binding);
- binding.refresh();
-
+ if (onEvt == 'mouseover') {
+ addBinding(onEvt, function(e) {
+ menuOn.call(this, e);
+ mouseover.call(this, e);
+ }.bindAsEventListener(this));
+ } else {
+ addBinding(onEvt, menuOn.bindAsEventListener(this));
+ addBinding('mouseover', mouseover.bindAsEventListener(this));
+ }
+
+ if (offEvt == 'mouseout') {
+ addBinding(offEvt, function(e) {
+ menuOff.call(this, e);
+ mouseout.call(this, e);
+ }.bindAsEventListener(this));
+ } else {
+ addBinding(offEvt, menuOff.bindAsEventListener(this));
+ addBinding('mouseout', mouseout.bindAsEventListener(this));
+ }
+
RichFaces.Menu.Layers.horizontals[this.id] = topLevel;
// }
return this;
16 years, 12 months
JBoss Rich Faces SVN: r5479 - in trunk: extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-01-18 20:48:48 -0500 (Fri, 18 Jan 2008)
New Revision: 5479
Added:
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgePreDestroy.java
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgeRequestScopeAttributeAdded.java
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/ExcludeFromManagedRequestScope.java
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/PortletNamingContainer.java
Modified:
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/Bridge.java
trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/ServletExternalContextImpl.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
Log:
Remove special StateManager for a portlet. Request state saving is a more compatible with JSR-301
Modified: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/Bridge.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/Bridge.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/Bridge.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -96,7 +96,10 @@
* Per-portlet extensions attributes prefix ( this implementation-specific ),
* for additional parameters, as described in the JSR 301 PLT 3.2
*/
- public static final String EXYENDED_PORTLET_ATTR_PREFIX = "javax.portlet.faces.extension.";
+ public static final String EXTENDED_PORTLET_ATTR_PREFIX = "javax.portlet.faces.extension.";
+ // allows a portlet to which request attributes the bridge excludes from its
+ // managed request scope.
+ public static final String EXCLUDED_REQUEST_ATTRIBUTES = "excludedRequestAttributes";
public static final String PRESERVE_ACTION_PARAM_ATTR_SUFFIX = ".preserveActionParams";
public static final String RENDER_POLICY_PARAM_ATTR_SUFFIX = ".renderPolicy";
/**
Modified: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -8,11 +8,14 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
import javax.portlet.PortletRequest;
@@ -30,14 +33,15 @@
public class GenericFacesPortlet extends GenericPortlet {
private static final String BRIDGE_SERVICE_CLASSPATH = "META-INF/services/javax.portlet.faces.Bridge";
- public static final String BRIDGE_CLASS = "javax.portlet.faces.BridgeClassName";
+ public static final String BRIDGE_CLASS = "javax.portlet.faces.BridgeImplClass";
private volatile String bridgeClassName = null;
private volatile Bridge facesPortletBrige = null;
public void init(PortletConfig config) throws PortletException {
super.init(config);
- bridgeClassName = this.getPortletContext().getInitParameter(
+ PortletContext portletContext = this.getPortletContext();
+ bridgeClassName = portletContext.getInitParameter(
BRIDGE_CLASS);
if (bridgeClassName == null) {
ClassLoader loader = getClassLoader();
@@ -75,18 +79,34 @@
if (null == bridgeClassName) {
throw new PortletException("Can't detect bridge implementation class name");
}
- String renderPolicy =
- this.getPortletConfig().getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.RENDER_POLICY);
+ String renderPolicy =
+ config.getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.RENDER_POLICY);
if (renderPolicy != null)
- this.getPortletContext().setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
+ portletContext.setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
this.getPortletName() + "." + Bridge.RENDER_POLICY,
Bridge.BridgeRenderPolicy.valueOf(renderPolicy));
String preserveActionParams =
- this.getPortletConfig().getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.PRESERVE_ACTION_PARAMS);
+ config.getInitParameter(Bridge.BRIDGE_PACKAGE_PREFIX + Bridge.PRESERVE_ACTION_PARAMS);
if (preserveActionParams != null)
- this.getPortletContext().setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
+ portletContext.setAttribute(Bridge.BRIDGE_PACKAGE_PREFIX +
this.getPortletName() + "." + Bridge.PRESERVE_ACTION_PARAMS,
Boolean.valueOf(preserveActionParams));
+ String excludedAttrs = getPortletConfig()
+ .getInitParameter(
+ Bridge.BRIDGE_PACKAGE_PREFIX
+ + Bridge.EXCLUDED_REQUEST_ATTRIBUTES);
+ if(null != excludedAttrs){
+ String[] atrs = excludedAttrs.split(",");
+ List<String> attrsList = new ArrayList<String>(atrs.length);
+ for (String string : atrs) {
+ attrsList.add(string);
+ }
+ portletContext.setAttribute(
+ Bridge.BRIDGE_PACKAGE_PREFIX + getPortletName() + "."
+ + Bridge.EXCLUDED_REQUEST_ATTRIBUTES,
+ attrsList);
+ }
+
}
protected void doDispatch(RenderRequest request, RenderResponse response)
Added: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgePreDestroy.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgePreDestroy.java (rev 0)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgePreDestroy.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -0,0 +1,11 @@
+package javax.portlet.faces.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.METHOD})
+public @interface BridgePreDestroy {
+}
Property changes on: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgePreDestroy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgeRequestScopeAttributeAdded.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgeRequestScopeAttributeAdded.java (rev 0)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgeRequestScopeAttributeAdded.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -0,0 +1,12 @@
+package javax.portlet.faces.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.METHOD})
+public @interface BridgeRequestScopeAttributeAdded {
+}
+
Property changes on: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/BridgeRequestScopeAttributeAdded.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/ExcludeFromManagedRequestScope.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/ExcludeFromManagedRequestScope.java (rev 0)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/ExcludeFromManagedRequestScope.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -0,0 +1,11 @@
+package javax.portlet.faces.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.TYPE})
+public @interface ExcludeFromManagedRequestScope {
+}
Property changes on: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/ExcludeFromManagedRequestScope.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/PortletNamingContainer.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/PortletNamingContainer.java (rev 0)
+++ trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/PortletNamingContainer.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -0,0 +1,11 @@
+package javax.portlet.faces.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.TYPE})
+public @interface PortletNamingContainer {
+}
Property changes on: trunk/extensions/portletbridge/portletbridge-api/src/main/java/javax/portlet/faces/annotation/PortletNamingContainer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -70,6 +70,7 @@
PortletContext portletContext = config.getPortletContext();
synchronized (portletContext) {
init();
+ PortletStateHolder.init(portletContext);
}
} catch (FacesException e) {
throw new PortletException("Initialization error", e);
@@ -177,13 +178,9 @@
commonAjaxParameters.put(AbstractExternalContext.ACTION__PARAMETER,
facesContext.getExternalContext().encodeActionURL(actionURL));
commonAjaxParameters.put(
- AbstractExternalContext.PORTLET_MODE_PARAMETER, request
- .getPortletMode().toString());
+ PortletStateHolder.STATE_ID_PARAMETER, windowState.getStateId());
commonAjaxParameters.put(
AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
- commonAjaxParameters.put(
- AbstractExternalContext.PORTLET_NAME_PARAMETER,
- getPortletConfig().getPortletName());
render(facesContext);
// writer.println("</div>");
PortletSession portletSession = request.getPortletSession(true);
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -5,22 +5,40 @@
import java.io.Serializable;
import java.util.Map;
+import java.util.UUID;
+import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
import javax.portlet.PortletMode;
import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletSessionUtil;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
import javax.portlet.faces.Bridge;
import javax.portlet.faces.BridgeDefaultViewNotSpecifiedException;
+import javax.portlet.faces.BridgeException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSessionBindingEvent;
+import javax.servlet.http.HttpSessionBindingListener;
import org.ajax4jsf.portlet.AjaxFacesPortlet;
-import org.apache.commons.collections.map.LRUMap;
+import org.ajax4jsf.portlet.WindowIDRetriver;
+import org.ajax4jsf.portlet.context.AbstractExternalContext;
+import org.ajax4jsf.util.LRUMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author asmirnov
*
*/
-public class PortletStateHolder implements Serializable {
+public class PortletStateHolder {
/**
*
*/
@@ -29,17 +47,23 @@
private static final String STATE_HOLDER = PortletStateHolder.class
.getName();
- private static final String[] modes = { PortletMode.VIEW.toString(),
- PortletMode.EDIT.toString(), PortletMode.HELP.toString() };
-
private static final String DEFAULT = "default-";
+ private static final Log log = LogFactory.getLog(PortletStateHolder.class);
+
private PortletMode lastMode = PortletMode.VIEW;
+ public static final String WINDOW_ID_RETRIVER = WindowIDRetriver.class
+ .getName();
+
+ public static final String STATE_ID_PARAMETER = "javax.faces.portlet.STATE_ID";
+
+ private static final int DEFAULT_MAX_MANAGED_SCOPES = 1000;
+
/**
* View states for a different portlet modes, Views and serial numbers.
*/
- private Map states = new LRUMap();
+ private Map<String, PortletViewState> states;
/**
* Private constructor - instance must be stored in the session, and created
@@ -47,9 +71,27 @@
*
* @param context
*/
- private PortletStateHolder() {
+ private PortletStateHolder(int max) {
+ states = new LRUMap<String, PortletViewState>(max);
}
+ public static void init(PortletContext context) {
+ synchronized (context) {
+ PortletStateHolder stateHolder = (PortletStateHolder) context
+ .getAttribute(STATE_HOLDER);
+ if (null == stateHolder) {
+ int maxScopes = DEFAULT_MAX_MANAGED_SCOPES;
+ String maxScopesParameter = context
+ .getInitParameter(Bridge.MAX_MANAGED_REQUEST_SCOPES);
+ if (null != maxScopesParameter) {
+ maxScopes = Integer.parseInt(maxScopesParameter);
+ }
+ context.setAttribute(STATE_HOLDER, new PortletStateHolder(
+ maxScopes));
+ }
+ }
+ }
+
/**
* Get instance of portlet states, stored in the session. If no previsious
* instance in session, create default value.
@@ -59,23 +101,12 @@
*/
public static PortletStateHolder getInstance(FacesContext context) {
ExternalContext externalContext = context.getExternalContext();
- Object session = externalContext.getSession(true);
- Map sessionMap = externalContext.getSessionMap();
- PortletStateHolder instance = null;
- synchronized (session) {
- instance = (PortletStateHolder) sessionMap.get(STATE_HOLDER);
- if (null == instance) {
- // Create and store in session new state holder.
- instance = new PortletStateHolder();
- Object request = externalContext.getRequest();
- if (request instanceof PortletRequest) {
- PortletRequest portletRequest = (PortletRequest) request;
- instance.setLastMode(portletRequest.getPortletMode());
- }
- sessionMap.put(STATE_HOLDER, instance);
- }
+ PortletStateHolder stateHolder = (PortletStateHolder) externalContext
+ .getApplicationMap().get(STATE_HOLDER);
+ if (null == stateHolder) {
+ throw new BridgeException("Jsf portlet bridge not initialised");
}
- return instance;
+ return stateHolder;
}
/**
@@ -97,10 +128,12 @@
// If none of above happen, try to get default viewId for a current
// mode.
if (null == viewId) {
- viewId = (String) context.getExternalContext().getRequestMap().get(Bridge.DEFAULT_VIEWID);
+ viewId = (String) context.getExternalContext().getRequestMap().get(
+ Bridge.DEFAULT_VIEWID);
}
if (null == viewId) {
- throw new BridgeDefaultViewNotSpecifiedException("could'n determine portlet view id");
+ throw new BridgeDefaultViewNotSpecifiedException(
+ "could'n determine portlet view id");
}
return viewId;
}
@@ -112,102 +145,175 @@
* @return
*/
public PortletViewState getWindowState(FacesContext context) {
- PortletMode portletMode = AjaxFacesPortlet.getPortletMode(context);
- if (null == portletMode) {
- portletMode = lastMode;
+ String stateId = getStateId(context);
+ PortletViewState state;
+ synchronized (states) {
+ state = (PortletViewState) states.get(stateId);
+ if (null == state) {
+ state = new PortletViewState(stateId);
+ states.put(stateId, state);
+ }
}
- StateKey windowKey = new StateKey(portletMode);
- PortletViewState state = (PortletViewState) states.get(windowKey);
- if (null == state) {
- state = new PortletViewState();
- states.put(windowKey, state);
- }
return state;
}
+ private void removeSessionStates(String scoprId) {
+ synchronized (states) {
+ for (String key : states.keySet()) {
+ if (key.startsWith(scoprId)) {
+ states.remove(key);
+ }
+ }
+
+ }
+ }
+
+ public String getStateId(FacesContext context) {
+ ExternalContext externalContext = context.getExternalContext();
+ Object request = externalContext.getRequest();
+ String stateId;
+ if (request instanceof HttpServletRequest) {
+ HttpServletRequest servletRequest = (HttpServletRequest) request;
+ stateId = servletRequest.getParameter(STATE_ID_PARAMETER);
+ if (null == stateId) {
+ throw new FacesException();
+ }
+ } else if (request instanceof PortletRequest) {
+ PortletRequest portletRequest = (PortletRequest) request;
+ PortletSession portletSession = portletRequest
+ .getPortletSession(true);
+ PortletConfig portletConfig = (PortletConfig) portletRequest
+ .getAttribute(AbstractExternalContext.PORTLET_CONFIG_ATTRIBUTE);
+ if (null == portletConfig) {
+ throw new FacesException();
+ }
+ String scopeId = portletConfig.getPortletName()
+ + portletSession.getId();
+ String portletModeName = portletRequest.getPortletMode().toString();
+ if (request instanceof RenderRequest) {
+ RenderRequest renderRequest = (RenderRequest) request;
+ stateId = renderRequest.getParameter(STATE_ID_PARAMETER);
+ if (null == stateId) {
+ RenderResponse response = (RenderResponse) externalContext
+ .getResponse();
+ stateId = scopeId + portletModeName
+ + response.getNamespace();
+ }
+ } else if (request instanceof ActionRequest) {
+ ActionRequest actionRequest = (ActionRequest) request;
+ stateId = (String) actionRequest
+ .getAttribute(STATE_ID_PARAMETER);
+ if (null == stateId) {
+
+ UUID uuid = UUID.randomUUID();
+ stateId = scopeId
+ + actionRequest.getPortletMode().toString()
+ + uuid.toString();
+ actionRequest.setAttribute(STATE_ID_PARAMETER, stateId);
+ ActionResponse response = (ActionResponse) externalContext
+ .getResponse();
+ response.setRenderParameter(STATE_ID_PARAMETER, stateId);
+ }
+ } else {
+ throw new FacesException();
+ }
+ WindowIDRetriver idRetriver = (org.ajax4jsf.portlet.application.PortletStateHolder.WindowIDRetriver) portletSession
+ .getAttribute(WINDOW_ID_RETRIVER);
+ if (null == idRetriver) {
+ idRetriver = new WindowIDRetriver(scopeId);
+ portletSession.setAttribute(WINDOW_ID_RETRIVER, idRetriver);
+ }
+ } else {
+ throw new FacesException();
+ }
+ return stateId;
+ }
+
/**
+ * @return the lastMode
+ */
+ public PortletMode getLastMode() {
+ return lastMode;
+ }
+
+ /**
+ * @param lastMode
+ * the lastMode to set
+ */
+ public void setLastMode(PortletMode lastMode) {
+ this.lastMode = lastMode;
+ }
+
+ /**
+ * Based on the Julien Viet idea.
+ *
* @author asmirnov
*
*/
- private static class StateKey implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = -1490104706512592990L;
+ public final class WindowIDRetriver implements HttpSessionBindingListener {
- private PortletMode mode;
+ public static final String PORTLET_SCOPE_PREFIX = "javax.portlet.p.";
- private String namespace;
-
-
+ private final String scopeId;
- public StateKey(PortletMode mode) {
- super();
- this.mode = mode;
- }
+ private String windowID;
/**
- * @param mode
- * @param namespace
+ * @param scopeId
*/
- public StateKey(PortletMode mode, String namespace) {
- this.mode = mode;
- this.namespace = namespace;
+ private WindowIDRetriver(String scopeId) {
+ this.scopeId = scopeId;
}
/*
* (non-Javadoc)
*
- * @see java.lang.Object#hashCode()
+ * @see javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)
*/
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((mode == null) ? 0 : mode.hashCode());
- result = PRIME * result
- + ((namespace == null) ? 0 : namespace.hashCode());
- return result;
+ public void valueBound(HttpSessionBindingEvent event) {
+ String name = event.getName();
+ if (null == name || 0 == name.length()) {
+ throw new FacesException(
+ "WindowIDRetriver bind to session without name");
+ }
+ if (PortletSession.PORTLET_SCOPE != PortletSessionUtil
+ .decodeScope(name)) {
+ throw new FacesException(
+ "WindowIDRetriver bind to APPLICATION_SCOPE. PORTLET_SCOPE is required");
+ }
+ windowID = name.substring(PORTLET_SCOPE_PREFIX.length(), name
+ .indexOf('?'));
+ if (log.isDebugEnabled()) {
+ log
+ .debug("WindowIDRetriver have been bind to session for a portlet window "
+ + windowID);
+ }
+
}
/*
* (non-Javadoc)
*
- * @see java.lang.Object#equals(java.lang.Object)
+ * @see javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
*/
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final StateKey other = (StateKey) obj;
- if (mode == null) {
- if (other.mode != null)
- return false;
- } else if (!mode.equals(other.mode))
- return false;
- if (namespace == null) {
- if (other.namespace != null)
- return false;
- } else if (!namespace.equals(other.namespace))
- return false;
- return true;
+ public void valueUnbound(HttpSessionBindingEvent event) {
+ removeSessionStates(scopeId);
}
- }
+ /**
+ * @return the windowID
+ */
+ public String getWindowID() {
+ return windowID;
+ }
- /**
- * @return the lastMode
- */
- public PortletMode getLastMode() {
- return lastMode;
+ /**
+ * @return the scopeId
+ */
+ public String getScopeId() {
+ return scopeId;
+ }
+
}
- /**
- * @param lastMode the lastMode to set
- */
- public void setLastMode(PortletMode lastMode) {
- this.lastMode = lastMode;
- }
}
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -75,7 +75,20 @@
private Map<String, String[]> _requestParameters;
+ private final String stateId;
+
+ public PortletViewState(String stateId) {
+ this.stateId = stateId;
+ }
+
/**
+ * @return the stateId
+ */
+ public String getStateId() {
+ return stateId;
+ }
+
+ /**
* @return the viewId
*/
public String getViewId() {
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/ServletExternalContextImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/ServletExternalContextImpl.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/ServletExternalContextImpl.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -31,6 +31,8 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.portlet.AjaxPortletBridge;
+import org.ajax4jsf.portlet.application.PortletStateHolder;
+import org.ajax4jsf.portlet.application.PortletStateHolder.WindowIDRetriver;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -229,27 +231,27 @@
private String getSessionPrefix() {
if (sessionPrefix == null) {
HttpSession session = getHttpRequest().getSession(false);
- String namespase = getNamespace();
- if (null == namespase || null == session) {
+ String scopeId = getHttpRequest().getParameter(PortletStateHolder.STATE_ID_PARAMETER);
+ if (null == scopeId || null == session) {
throw new FacesException(
- "JSF request called without portlet namespace parameter");
+ "JSF request called without portlet state parameter");
}
Enumeration attributeNames = session.getAttributeNames();
while (attributeNames.hasMoreElements() && null == sessionPrefix) {
String name = (String) attributeNames.nextElement();
- Object attribute = session.getAttribute(name);
if (PortletSessionUtil.decodeScope(name) == PortletSession.PORTLET_SCOPE
&& PortletSessionUtil.decodeAttributeName(name).equals(
- NAMESPACE_PARAMETER)
- && namespase.equals(attribute)) {
- sessionPrefix = name.substring(0, name.length()
- - NAMESPACE_PARAMETER.length());
+ PortletStateHolder.WINDOW_ID_RETRIVER)) {
+ PortletStateHolder.WindowIDRetriver attribute = (WindowIDRetriver) session.getAttribute(name);
+ if (scopeId.startsWith(attribute.getScopeId())) {
+ sessionPrefix = WindowIDRetriver.PORTLET_SCOPE_PREFIX+attribute.getWindowID()+'?';
if (_log.isDebugEnabled()) {
_log
.debug("Prefix for a PORTLET_SCOPE session attributes: "
+ sessionPrefix);
}
- }
+
+ } }
}
if (null == sessionPrefix) {
throw new FacesException(
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/lifecycle/PortalPhaseListener.java 2008-01-19 01:48:48 UTC (rev 5479)
@@ -3,6 +3,7 @@
*/
package org.ajax4jsf.portlet.lifecycle;
+import java.net.MalformedURLException;
import java.util.Map;
import javax.faces.context.FacesContext;
@@ -15,6 +16,7 @@
import org.ajax4jsf.portlet.application.PortletStateHolder;
import org.ajax4jsf.portlet.application.PortletViewState;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
+import org.ajax4jsf.portlet.context.PortalActionURL;
/**
* @author asmirnov
@@ -57,44 +59,44 @@
*
* @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
*/
+ @SuppressWarnings("unchecked")
public void beforePhase(PhaseEvent event) {
PhaseId phaseId = event.getPhaseId();
FacesContext context = event.getFacesContext();
Object portletPhase = context.getExternalContext().getRequestMap().get(
Bridge.PORTLET_LIFECYCLE_PHASE);
if (null == portletPhase && phaseId.equals(PhaseId.RENDER_RESPONSE)) {
- // For a servlet phase, put all portlet-related parameters
- // back to ajaxContext.
- Map<String, String> requestParameters = context
- .getExternalContext().getRequestParameterMap();
+ // For a servlet phase, put all portlet-related parameters
+ // back to ajaxContext.
+ Map<String, String> requestParameters = context
+ .getExternalContext().getRequestParameterMap();
- AjaxContext ajaxContext = AjaxContext
- .getCurrentInstance(context);
- Map commonAjaxParameters = ajaxContext
- .getCommonAjaxParameters();
- commonAjaxParameters
- .put(
- AbstractExternalContext.ACTION__PARAMETER,
- requestParameters
- .get(AbstractExternalContext.ACTION__PARAMETER));
- commonAjaxParameters
- .put(
- AbstractExternalContext.PORTLET_MODE_PARAMETER,
- requestParameters
- .get(AbstractExternalContext.PORTLET_MODE_PARAMETER));
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ Map commonAjaxParameters = ajaxContext.getCommonAjaxParameters();
+ String portalActionUrl = requestParameters
+ .get(AbstractExternalContext.ACTION__PARAMETER);
+ if (null != portalActionUrl) {
+ try {
+ PortalActionURL pal = new PortalActionURL(portalActionUrl);
+ pal.addParameter(AbstractExternalContext.VIEW_ID_PARAMETER,
+ context.getViewRoot().getViewId());
+ commonAjaxParameters.put(
+ AbstractExternalContext.ACTION__PARAMETER, pal
+ .toString());
- commonAjaxParameters
- .put(
- AbstractExternalContext.NAMESPACE_PARAMETER,
- requestParameters
- .get(AbstractExternalContext.NAMESPACE_PARAMETER));
+ } catch (MalformedURLException e) {
+ // TODO: log exception ?
+ }
+ }
+ commonAjaxParameters.put(
+ AbstractExternalContext.NAMESPACE_PARAMETER,
+ requestParameters
+ .get(AbstractExternalContext.NAMESPACE_PARAMETER));
- commonAjaxParameters
- .put(
- AbstractExternalContext.PORTLET_NAME_PARAMETER,
- requestParameters
- .get(AbstractExternalContext.PORTLET_NAME_PARAMETER));
- }
+ commonAjaxParameters.put(PortletStateHolder.STATE_ID_PARAMETER,
+ requestParameters
+ .get(PortletStateHolder.STATE_ID_PARAMETER));
+ }
}
/*
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-01-19 01:48:48 UTC (rev 5479)
@@ -18,4 +18,40 @@
TARGET="rules:#jsf#start.xhtml" TITLE="start"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#help.jspx"
+ PATH="/jsf/help.jspx" SHAPE="240,145,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#help.jspx:0"
+ NAME="item" PATH="/jsf/help.jspx">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="help2::#jsf#help2.jspx" NAME="output" PATH="/jsf/help2.jspx"
+ TARGET="rules:#jsf#help2.jspx" TITLE="help2"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#help2.jspx"
+ PATH="/jsf/help2.jspx" SHAPE="32,129,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#help2.jspx:0"
+ NAME="item" PATH="/jsf/help2.jspx">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="start::#jsf#help.jspx" NAME="output" PATH="/jsf/help.jspx"
+ TARGET="rules:#jsf#help.jspx" TITLE="start"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#edit.jspx"
+ PATH="/jsf/edit.jspx" SHAPE="240,257,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#edit.jspx:0"
+ NAME="item" PATH="/jsf/edit.jspx">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="edit2::#jsf#edit2.jspx" NAME="output" PATH="/jsf/edit2.jspx"
+ TARGET="rules:#jsf#edit2.jspx" TITLE="edit2"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#jsf#edit2.jspx"
+ PATH="/jsf/edit2.jspx" SHAPE="32,241,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem" ID="rules:#jsf#edit2.jspx:0"
+ NAME="item" PATH="/jsf/edit2.jspx">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="start::#jsf#edit.jspx" NAME="output" PATH="/jsf/edit.jspx"
+ TARGET="rules:#jsf#edit.jspx" TITLE="start"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
</PROCESS>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2008-01-19 01:13:31 UTC (rev 5478)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/faces-config.xml 2008-01-19 01:48:48 UTC (rev 5479)
@@ -70,10 +70,10 @@
<view-handler>
org.ajax4jsf.portlet.application.PortletViewHandler
</view-handler>
+ <!--
<state-manager>
org.ajax4jsf.portlet.application.PortalStateManager
</state-manager>
- <!--
<view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
-->
</application>
16 years, 12 months
JBoss Rich Faces SVN: r5478 - trunk/cdk/generator/src/main/resources/META-INF/templates12.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-18 20:13:31 -0500 (Fri, 18 Jan 2008)
New Revision: 5478
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
Log:
http://jira.jboss.com/jira/browse/RF-1951
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2008-01-18 20:19:41 UTC (rev 5477)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2008-01-19 01:13:31 UTC (rev 5478)
@@ -40,12 +40,6 @@
${component.simpleClassName} comp = (${component.simpleClassName}) component;
#foreach( $prop in $component.properties )
#if( !$prop.existintag && !$prop.hidden)
- #if($prop.elonly)
- if(null != this._${prop.name} && this._${prop.name}.isLiteralText()){
- throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext()) +" allows only EL expressions for property ${prop.name}");
- }
- #end
-
#if($prop.name == "action")
setActionProperty(comp, this._${prop.name});
#elseif($prop.name == "actionListener")
@@ -78,6 +72,12 @@
((${component.simpleClassName})component).${prop.setterName}(this._${prop.name});
}
#else
+ #if($prop.elonly)
+ if(null != this._${prop.name} && this._${prop.name}.isLiteralText()){
+ throw new IllegalArgumentException("Component ${component.name} with Id " + component.getClientId(getFacesContext()) +" allows only EL expressions for property ${prop.name}");
+ }
+ #end
+
#if ($prop.el)
if (this._${prop.name} != null) {
if (this._${prop.name}.isLiteralText()) {
16 years, 12 months
JBoss Rich Faces SVN: r5477 - trunk/samples/richfaces-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-18 15:19:41 -0500 (Fri, 18 Jan 2008)
New Revision: 5477
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Panel menu example - fix property type in bean.
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-18 19:42:19 UTC (rev 5476)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-18 20:19:41 UTC (rev 5477)
@@ -264,7 +264,7 @@
</managed-property>
<managed-property>
<property-name>singleMode</property-name>
- <property-class>java.lang.Boolean</property-class>
+ <property-class>boolean</property-class>
<value>true</value>
</managed-property>
</managed-bean>
16 years, 12 months
JBoss Rich Faces SVN: r5476 - trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-18 14:42:19 -0500 (Fri, 18 Jan 2008)
New Revision: 5476
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1944
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-01-18 19:29:23 UTC (rev 5475)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2008-01-18 19:42:19 UTC (rev 5476)
@@ -253,9 +253,9 @@
String ajaxFunc = function.toScript();
Map ajaxOptions = buildEventOptions(context, toolTip, targetClientId);
- JSFunctionDefinition completeFunc = getUtils().getAsEventHandler(context, component, "oncoplete", "return true;");
- JSFunctionDefinition hideFunc = getUtils().getAsEventHandler(context, component,"onhide", "return true;");
- JSFunctionDefinition showFunc = getUtils().getAsEventHandler(context, component,"onshow", "return true;");
+ JSFunctionDefinition completeFunc = getUtils().getAsEventHandler(context, component, "oncoplete", "; return true;");
+ JSFunctionDefinition hideFunc = getUtils().getAsEventHandler(context, component,"onhide", "; return true;");
+ JSFunctionDefinition showFunc = getUtils().getAsEventHandler(context, component,"onshow", "; return true;");
Map funcMap = new HashMap();
funcMap.put(new JSReference("oncomplete"), completeFunc);
16 years, 12 months