JBoss Rich Faces SVN: r5515 - in trunk/extensions/portletbridge: portletbridge-impl/src/main/java/org/ajax4jsf/portlet and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-01-21 18:07:45 -0500 (Mon, 21 Jan 2008)
New Revision: 5515
Removed:
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/WindowIDRetriver.java
Modified:
trunk/extensions/portletbridge/portletbridge-api/src/test/java/javax/portlet/faces/GenericPortletTest.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/context/AbstractExternalContext.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletExternalContextImpl.java
trunk/extensions/portletbridge/portletbridge-impl/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java
Log:
Start to implement JSF redirect processing in the portlet requests
Modified: trunk/extensions/portletbridge/portletbridge-api/src/test/java/javax/portlet/faces/GenericPortletTest.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-api/src/test/java/javax/portlet/faces/GenericPortletTest.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-api/src/test/java/javax/portlet/faces/GenericPortletTest.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -83,7 +83,7 @@
public void testDestroy() throws PortletException, IOException {
setupActionRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portlet.init(portletConfig);
MockBridge facesPortletBrige = (MockBridge) portlet
@@ -108,7 +108,7 @@
portletConfig.addInitParameter("javax.portlet.faces.renderPolicy",
Bridge.BridgeRenderPolicy.NEVER_DELEGATE.toString());
portletConfig.setPortletName("foo");
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
GenericFacesPortlet portlet = new GenericFacesPortlet();
portlet.init(portletConfig);
@@ -129,7 +129,7 @@
throws PortletException, IOException {
setupRenderRequest();
GenericFacesPortletExtension portlet = new GenericFacesPortletExtension();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -152,7 +152,7 @@
throws PortletException, IOException {
setupRenderRequest();
GenericFacesPortletExtension portlet = new GenericFacesPortletExtension();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.edit", "index.jsf");
@@ -176,7 +176,7 @@
throws PortletException, IOException {
setupRenderRequest();
GenericFacesPortletExtension portlet = new GenericFacesPortletExtension();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -200,7 +200,7 @@
throws PortletException, IOException {
setupRenderRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -229,7 +229,7 @@
throws PortletException, IOException {
setupRenderRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -249,7 +249,7 @@
throws PortletException, IOException {
setupActionRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -267,7 +267,7 @@
public void testGetBrigeClassName() throws PortletException {
setupActionRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletContext.setInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -333,7 +333,7 @@
public void testGetDefaultViewId() throws PortletException {
setupActionRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portletConfig.addInitParameter(
"javax.portlet.faces.defaultViewId.view", "index.jsf");
@@ -351,7 +351,7 @@
public void testGetFacesPortletBrige() throws PortletException {
setupActionRequest();
GenericFacesPortlet portlet = new GenericFacesPortlet();
- portletContext.setInitParameter("javax.portlet.faces.BridgeClassName",
+ portletContext.setInitParameter("javax.portlet.faces.BridgeImplClass",
MockBridge.class.getName());
portlet.init(portletConfig);
MockBridge facesPortletBrige = (MockBridge) portlet
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-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -28,6 +28,7 @@
import org.ajax4jsf.portlet.application.PortletStateHolder;
import org.ajax4jsf.portlet.application.PortletViewState;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
+import org.ajax4jsf.portlet.context.PortletExternalContextImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -124,7 +125,12 @@
if (!facesContext.getResponseComplete()) {
windowState.saveRequest(facesContext);
- } // saveView(facesContext);
+ } else {
+ String redirectViewId = (String) facesContext.getExternalContext().getRequestMap().get(AbstractExternalContext.REDIRECT_VIEW_ID);
+ if(null != redirectViewId){
+ windowState.setViewId(redirectViewId);
+ }
+ }
} catch (Exception e) {
// TODO - handle exception.
log.error("Error processing execute lifecycle", e);
@@ -169,6 +175,7 @@
windowState.restoreRequest(facesContext, true);
if (null == facesContext.getViewRoot()) {
execute(facesContext);
+ // TODO - detect redirect case.
}
//
AjaxContext ajaxContext = AjaxContext
@@ -182,13 +189,14 @@
commonAjaxParameters.put(
AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
render(facesContext);
+ // TODO - detect redirect case. Reset response, clear request variables as far as Seam state.
+ // Perform new render phase with a new ViewId.
+ String redirectViewId = (String) facesContext.getExternalContext().getRequestMap().get(AbstractExternalContext.REDIRECT_VIEW_ID);
+ if(null != redirectViewId){
+ windowState.setViewId(redirectViewId);
+ }
// writer.println("</div>");
PortletSession portletSession = request.getPortletSession(true);
- // Store namespace value in portlet scope session.
- // ServletContext, in case of ajax requests,
- // will restore session prefiv by it's value.
- portletSession.setAttribute(
- AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
Principal userPrincipal = request.getUserPrincipal();
// TODO - get user roles, defined in the portlet.xml ( ??? parse it ??? ), and store all values for a "isUserInRole(roleName)" calls
portletSession.setAttribute(AbstractExternalContext.PORTAL_USER_PRINCIPAL, userPrincipal, PortletSession.APPLICATION_SCOPE);
@@ -227,12 +235,6 @@
request.setAttribute(AbstractExternalContext.PORTLET_CONFIG_ATTRIBUTE,
getPortletConfig());
PortletSession session = request.getPortletSession();
- // Bind WindowIDRetriver to session.
- WindowIDRetriver idRetriver = (WindowIDRetriver) session.getAttribute(WindowIDRetriver.WINDOW_ID_RETRIVER);
- if(null == idRetriver){
- idRetriver = new WindowIDRetriver();
- session.setAttribute(WindowIDRetriver.WINDOW_ID_RETRIVER, idRetriver);
- }
}
/**
Deleted: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/WindowIDRetriver.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/WindowIDRetriver.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/WindowIDRetriver.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -1,62 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.portlet;
-
-import javax.faces.FacesException;
-import javax.portlet.PortletSession;
-import javax.portlet.PortletSessionUtil;
-import javax.servlet.http.HttpSessionBindingEvent;
-import javax.servlet.http.HttpSessionBindingListener;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Based on the Julien Viet idea.
- * @author asmirnov
- *
- */
-public class WindowIDRetriver implements HttpSessionBindingListener {
-
- private static final String PORTLET_SCOPE_PREFIX = "javax.portlet.p.";
-
- private static final Log log = LogFactory.getLog(WindowIDRetriver.class);
-
- public static final String WINDOW_ID_RETRIVER = WindowIDRetriver.class.getName();
-
- private String windowID;
-
- /* (non-Javadoc)
- * @see javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)
- */
- 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 javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
- */
- public void valueUnbound(HttpSessionBindingEvent event) {
- // DO nothing.
- }
-
- /**
- * @return the windowID
- */
- String getWindowID() {
- return windowID;
- }
-
-}
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-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletStateHolder.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -28,7 +28,6 @@
import javax.servlet.http.HttpSessionBindingListener;
import org.ajax4jsf.portlet.AjaxFacesPortlet;
-import org.ajax4jsf.portlet.WindowIDRetriver;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
import org.ajax4jsf.util.LRUMap;
import org.apache.commons.logging.Log;
@@ -53,8 +52,7 @@
private PortletMode lastMode = PortletMode.VIEW;
- public static final String WINDOW_ID_RETRIVER = WindowIDRetriver.class
- .getName();
+ public static final String WINDOW_ID_RETRIVER = "org.ajax4jsf.portlet.WINDOW_ID_RETRIVER";
public static final String STATE_ID_PARAMETER = "javax.faces.portlet.STATE_ID";
@@ -176,7 +174,7 @@
HttpServletRequest servletRequest = (HttpServletRequest) request;
stateId = servletRequest.getParameter(STATE_ID_PARAMETER);
if (null == stateId) {
- throw new FacesException();
+ throw new FacesException("No portlet stateId parameter for AJAX request");
}
} else if (request instanceof PortletRequest) {
PortletRequest portletRequest = (PortletRequest) request;
@@ -207,7 +205,7 @@
UUID uuid = UUID.randomUUID();
stateId = scopeId
- + actionRequest.getPortletMode().toString()
+ + portletModeName
+ uuid.toString();
actionRequest.setAttribute(STATE_ID_PARAMETER, stateId);
ActionResponse response = (ActionResponse) externalContext
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -135,6 +135,7 @@
private Object context;
private boolean hasNavigationRedirect = false;
+ public static final Object REDIRECT_VIEW_ID = "javax.faces.portlet.REDIRECT_VIEW_ID";
public static final String CONVERSATION_ID_PARAMETER = "conversationId";
/**
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -377,11 +377,11 @@
public void responseComplete() {
checkReleased();
- if (externalContext.isHasNavigationRedirect()) {
- this.renderResponse = true;
- } else {
- this.responseComplete = true;
- }
+// if (externalContext.isHasNavigationRedirect()) {
+// this.renderResponse = true;
+// } else {
+ this.responseComplete = true;
+// }
}
private void checkReleased() {
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletExternalContextImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletExternalContextImpl.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletExternalContextImpl.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -236,7 +236,6 @@
private static final Pattern absoluteUrl = Pattern.compile("");
private static final Pattern directLink = Pattern.compile("");
private static final Pattern viewIdParam = Pattern.compile("");
-
/**
* @param parameters
* @return
@@ -347,12 +346,14 @@
if (null != viewId) {
try {
viewId = URLDecoder.decode(viewId, "UTF8");
- FacesContext facesContext = FacesContext.getCurrentInstance();
- ViewHandler viewHandler = facesContext.getApplication()
- .getViewHandler();
- facesContext.setViewRoot(viewHandler.createView(facesContext,
- viewId));
- setHasNavigationRedirect(true);
+ // Save new viewId to restore after redirect.
+ getRequestMap().put(AbstractExternalContext.REDIRECT_VIEW_ID, viewId);
+// FacesContext facesContext = FacesContext.getCurrentInstance();
+// ViewHandler viewHandler = facesContext.getApplication()
+// .getViewHandler();
+// facesContext.setViewRoot(viewHandler.createView(facesContext,
+// viewId));
+// setHasNavigationRedirect(true);
} catch (UnsupportedEncodingException e) {
// Do nothing - UTF-8 encoding is a default.
}
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java 2008-01-21 20:14:22 UTC (rev 5514)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/test/java/org/ajax4jsf/portlet/application/PortletViewStateTestCase.java 2008-01-21 23:07:45 UTC (rev 5515)
@@ -48,7 +48,7 @@
String clientId = input.getClientId(facesContext);
FacesMessage facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,"msg","detail");
facesContext.addMessage(clientId, facesMessage);
- PortletViewState state = new PortletViewState();
+ PortletViewState state = new PortletViewState("testPortlet012345");
state.saveMessages(facesContext);
Map messages = state.getMessages();
assertEquals(1, messages.size());
16 years, 11 months
JBoss Rich Faces SVN: r5514 - in branches/3.1.x/ui: listShuttle/src/main/templates/org/richfaces and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-21 15:14:22 -0500 (Mon, 21 Jan 2008)
New Revision: 5514
Modified:
branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1659
Modified: branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-01-21 20:14:22 UTC (rev 5514)
@@ -198,7 +198,7 @@
addItem : function(component, item) {
//var newItem = Object.clone(item);
- item.doNormal();
+ item.doNormal(Richfaces.getExternalClass(item.rowIndex), component.columnsClasses);
component.shuttleTbody.insertBefore(item._node, null);
component.shuttleItems.push(item);
Modified: branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-21 20:14:22 UTC (rev 5514)
@@ -191,8 +191,8 @@
var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
- var listShuttle = new Richfaces.ListShuttle(new Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context, component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem),
- new Richfaces.ListShuttle.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem),
+ var listShuttle = new Richfaces.ListShuttle(new Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context, component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
+ new Richfaces.ListShuttle.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
"#{clientId}", listShuttleCotrolsIdPrefix, "#{switchByClick}", sourceLayoutManager, targetLayoutManager, #{this:getAsEventHandler(context, component, "onlistchanged")});
var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2008-01-21 20:14:22 UTC (rev 5514)
@@ -4,7 +4,9 @@
package org.richfaces.renderkit;
import java.io.IOException;
+import java.util.Arrays;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
@@ -16,6 +18,7 @@
import javax.faces.context.ResponseWriter;
import javax.faces.convert.Converter;
+import org.ajax4jsf.component.UIDataAdaptor;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptString;
@@ -529,4 +532,21 @@
return ScriptUtils.toScript(result);
}
+
+ public String getColumnClassesAsJSArray(FacesContext context, UIComponent component) {
+ return ScriptUtils.toScript(getClassesAsList(context, component, "columnClasses"));
+ }
+
+ public String getRowClassesAsJSArray(FacesContext context, UIComponent component) {
+ return ScriptUtils.toScript(getClassesAsList(context, component, "rowClasses"));
+ }
+
+ protected List getClassesAsList(FacesContext context, UIComponent component, String attr) {
+
+ String value = (String) ((UIDataAdaptor) component).getAttributes().get(attr);
+ if (value != null && (value.length() != 0)) {
+ return Arrays.asList(value.split(","));
+ }
+ return null;
+ }
}
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2008-01-21 20:14:22 UTC (rev 5514)
@@ -1,9 +1,12 @@
package org.richfaces.renderkit;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -14,6 +17,7 @@
import javax.faces.convert.Converter;
import org.ajax4jsf.component.UIDataAdaptor;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.ComponentVariables;
import org.ajax4jsf.renderkit.ComponentsVariableResolver;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-01-21 20:14:22 UTC (rev 5514)
@@ -32,7 +32,7 @@
Richfaces.ListBase.prototype = {
initialize : function(containerId, contentTableId, headerTableId, focusKeeperId,
- onclickControlId, controlClass) {
+ onclickControlId, controlClass, columnsClasses, rowClasses) {
this["rich:destructor"] = "destroy";
this.selectedItems = new Array();
@@ -52,6 +52,10 @@
this.activeItem = null;
this.pseudoActiveItem = null; //it services for items selection by Shift+click
this.items = null;
+
+ //FIX
+ this.rowClasses = rowClasses;
+ this.columnsClasses = columnsClasses;
this.retrieveShuttleItems(containerId, controlClass);
@@ -144,7 +148,7 @@
}
if (this.activeItem) {
- this.activeItem.item.doActive();
+ this.activeItem.item.doActive(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
}
},
@@ -187,7 +191,7 @@
this.selectAll();
Event.stop(event);
}
- this.activeItem.item.doActive();
+ this.activeItem.item.doActive(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
//this.saveState();
break;
}
@@ -209,10 +213,11 @@
},
changeActiveItems : function(newItem, item) {
+ item.item.doNormal();
this.resetMarked();
- newItem.item.doSelect();
- newItem.item.doActive();
+ newItem.item.doSelect(this.getExtRowClass(newItem.rowIndex), this.columnsClasses);
+ newItem.item.doActive(this.getExtRowClass(newItem.rowIndex), this.columnsClasses);
this.setActiveItem(newItem);
this.selectedItems.push(newItem);
},
@@ -240,9 +245,9 @@
this.selectedItems[0] = markedShuttleItem;
}*/
if (activeItem.item.isSelected()) {
- activeItem.item.doNormal();
+ activeItem.item.doNormal(this.getExtRowClass(activeItem.rowIndex), this.columnsClasses);
} else {
- activeItem.item.doSelect();
+ activeItem.item.doSelect(this.getExtRowClass(activeItem.rowIndex), this.columnsClasses);
this.selectedItems[0] = markedShuttleItem; //TODO: delete
}
//}
@@ -256,18 +261,18 @@
if (activeItem.item.isSelected()) {
this.selectedItems.remove(markedShuttleItem);
- activeItem.item.doNormal();
+ activeItem.item.doNormal(this.getExtRowClass(activeItem.rowIndex), this.columnsClasses);
} else {
- activeItem.item.doSelect();
+ activeItem.item.doSelect(this.getExtRowClass(activeItem.rowIndex), this.columnsClasses);
this.selectedItems.push(markedShuttleItem);
}
if ((this.activeItem != null) && (this.activeItem.rowIndex != activeItem.rowIndex)) {
//reset activity of an element
if (this.activeItem.item.isSelected()) {
- this.activeItem.item.doSelect();
+ this.activeItem.item.doSelect(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
} else {
- this.activeItem.item.doNormal();
+ this.activeItem.item.doNormal(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
}
}
},
@@ -297,7 +302,7 @@
selectItemRange : function(startIndex, endIndex) {
var rows = this.shuttleTbody.rows;
for (var i = startIndex; i <= endIndex; i++) {
- rows[i].item.doSelect();
+ rows[i].item.doSelect(this.getExtRowClass(rows[i].rowIndex), this.columnsClasses);
this.selectedItems.push(rows[i]);
}
//this.saveState();
@@ -308,7 +313,7 @@
var length = rows.length;
for (var i = 0; i < length; i++) {
var shuttleItem = rows[i];
- shuttleItem.item.doNormal();
+ shuttleItem.item.doNormal(this.getExtRowClass(shuttleItem.rowIndex), this.columnsClasses);
}
this.selectedItems.length = 0;
@@ -364,9 +369,9 @@
if (this.activeItem) {
if (this.activeItem.item.isSelected()) {
- this.activeItem.item.doSelect();
+ this.activeItem.item.doSelect(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
} else {
- this.activeItem.item.doNormal();
+ this.activeItem.item.doNormal(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
}
}
},
@@ -388,16 +393,9 @@
return true;
}
return false;
- }//,
+ },
- /*saveState : function() {
- for (var i = 0; i < this.shuttleItems.length; i++) {
- var item = this.shuttleItems[i];
-
- item.saveState();
- }
- }*/
-
-}
-
-
+ getExtRowClass : function(index) {
+ return Richfaces.getExternalClass(this.rowClasses, index);
+ }
+}
\ No newline at end of file
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2008-01-21 20:14:22 UTC (rev 5514)
@@ -20,8 +20,8 @@
Richfaces.OrderingList = Class.create(Richfaces.ListBase, {
- initialize: function($super, containerId, contentTableId, headerTableId, focusKeeperId, ids, onclickControlId, onorderchanged, controlClass) {
- $super(containerId, contentTableId, headerTableId, focusKeeperId, onclickControlId, controlClass);
+ initialize: function($super, containerId, contentTableId, headerTableId, focusKeeperId, ids, onclickControlId, onorderchanged, controlClass, columnsClasses, rowClasses) {
+ $super(containerId, contentTableId, headerTableId, focusKeeperId, onclickControlId, controlClass, columnsClasses, rowClasses);
this.container.component = this;
@@ -167,7 +167,7 @@
this.selectAll();
Event.stop(event);
}
- this.activeItem.item.doActive();
+ this.activeItem.item.doActive(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
//this.saveState();
this.controlListManager();
break;
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js 2008-01-21 20:14:22 UTC (rev 5514)
@@ -1,5 +1,16 @@
if (!window.Richfaces) { window.Richfaces = {}; }
+Richfaces.getExternalClass = function(classes, index) {
+ if (classes) {
+ var len = classes.length;
+ while (index >= len) {
+ index -= len;
+ }
+ return (classes[index]) ? classes[index] : "";
+ }
+ return "";
+}
+
Richfaces.SelectItem = Class.create();
Richfaces.SelectItem.prototype = {
@@ -21,41 +32,38 @@
this._node.item = null;
},
- doActive : function() {
+ doActive : function(rowStoredClass, cellStoredClasses) {
var classes = this.CLASSES;
var row = this._node;
+ var rowClass = classes.ROW.ACTIVE;
+ var cellClass = classes.CELL.ACTIVE;
+ if (this.isSelected()) {
+ rowClass = classes.ROW.SELECTED + " " + classes.ROW.ACTIVE;
+ cellClass = classes.CELL.SELECTED + " " + classes.CELL.ACTIVE;
+ }
+ this.changeClass(row, rowClass, cellClass, rowStoredClass, cellStoredClasses);
- this.addClass(row, classes.ROW.ACTIVE, classes.CELL.ACTIVE);
-
this.active = true;
this.saveState();
},
- doSelect : function() {
+ doSelect : function(rowStoredClass, cellStoredClasses) {
var row = this._node;
var classes = this.CLASSES;
- this.addClass(row, classes.ROW.SELECTED, classes.CELL.SELECTED);
- if (this.active) {
- this.removeClass(row, classes.ROW.ACTIVE, classes.CELL.ACTIVE);
- }
+ this.changeClass(row, classes.ROW.SELECTED, classes.CELL.SELECTED, rowStoredClass, cellStoredClasses);
this.selected = true;
this.saveState();
},
- doNormal : function() {
+ doNormal : function(rowStoredClass, cellStoredClasses) {
var row = this._node;
var classes = this.CLASSES;
- if (this.active) {
- this.removeClass(row, classes.ROW.ACTIVE, classes.CELL.ACTIVE);
- }
- if (this.selected) {
- this.removeClass(row, classes.ROW.SELECTED, classes.CELL.SELECTED);
- }
+ this.changeClass(row, classes.ROW.NORMAL, classes.CELL.NORMAL, rowStoredClass, cellStoredClasses);
this.active = false;
this.selected = false;
@@ -71,7 +79,16 @@
return this.active;
},
- addClass : function(row, classNameRow, classNameCell) {
+ changeClass : function(row, rowClassName, cellClassName, rowStoredClass, cellStoredClasses) {
+ row.className = rowStoredClass + " " + rowClassName;
+ var cells = row.cells;
+ for (var i = 0; i < cells.length; i++) {
+ var cell = cells[i];
+ cell.className = Richfaces.getExternalClass(cellStoredClasses, cell.cellIndex) + " " + cellClassName;
+ }
+ },
+
+ /*addClass : function(row, classNameRow, classNameCell) {
if (row.addClassName) {
row.addClassName(classNameRow);
} else {
@@ -81,7 +98,6 @@
var cells = row.cells;
for (var i = 0; i < cells.length; i++) {
var cell = cells[i];
-
if (cell.addClassName) {
cell.addClassName(classNameCell);
} else {
@@ -96,7 +112,6 @@
} else {
Element.removeClassName(row, classNameRow);
}
-
var cells = row.cells;
for (var i = 0; i < cells.length; i++) {
var cell = cells[i];
@@ -107,7 +122,7 @@
Element.removeClassName(cell, classNameCell);
}
}
- },
+ },*/
saveState: function() {
var regex = /^s?a?/;
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-01-21 19:49:12 UTC (rev 5513)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-01-21 20:14:22 UTC (rev 5514)
@@ -89,7 +89,13 @@
var clientId = '#{cId}';
Event.onReady(function() {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', cotrolsIdPrefix, '#{cId}sortLabel', #{this:getAsEventHandler(context, component, "onorderchanged")}, Richfaces.OrderingListSelectItem);
+ var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab',
+ '#{cId}internal_header_tab', '#{cId}focusKeeper',
+ cotrolsIdPrefix, '#{cId}sortLabel',
+ #{this:getAsEventHandler(context, component, "onorderchanged")},
+ Richfaces.OrderingListSelectItem,
+ #{this:getColumnClassesAsJSArray(context, component)},
+ #{this:getRowClassesAsJSArray(context, component)});
var layoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
layoutManager.widthSynchronization();
});
16 years, 11 months
JBoss Rich Faces SVN: r5513 - branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-01-21 14:49:12 -0500 (Mon, 21 Jan 2008)
New Revision: 5513
Modified:
branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
fix http://jira.jboss.com/jira/browse/RF-1962
Modified: branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-01-21 19:46:40 UTC (rev 5512)
+++ branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-01-21 19:49:12 UTC (rev 5513)
@@ -814,7 +814,7 @@
req.appendNewHeadElements();
for ( var k =0; k < options.affected.length ; k++ ) {
LOG.debug("Update page part from call parameter for ID " + options.affected[k]);
- req.updatePagePart(options.affected[k], k==childs.length-1);
+ req.updatePagePart(options.affected[k], k==options.affected.length-1);
};
// if resopnce contains element with ID "ajax:update" get id's from
// child text element . like :
16 years, 11 months
JBoss Rich Faces SVN: r5512 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-01-21 14:46:40 -0500 (Mon, 21 Jan 2008)
New Revision: 5512
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
fix http://jira.jboss.com/jira/browse/RF-1962
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-01-21 19:27:17 UTC (rev 5511)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-01-21 19:46:40 UTC (rev 5512)
@@ -814,7 +814,7 @@
req.appendNewHeadElements();
for ( var k =0; k < options.affected.length ; k++ ) {
LOG.debug("Update page part from call parameter for ID " + options.affected[k]);
- req.updatePagePart(options.affected[k], k==childs.length-1);
+ req.updatePagePart(options.affected[k], k==options.affected.length-1);
};
// if resopnce contains element with ID "ajax:update" get id's from
// child text element . like :
16 years, 11 months
JBoss Rich Faces SVN: r5511 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-21 14:27:17 -0500 (Mon, 21 Jan 2008)
New Revision: 5511
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-1926
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-01-21 19:18:00 UTC (rev 5510)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-01-21 19:27:17 UTC (rev 5511)
@@ -49,7 +49,7 @@
if (!window.opera) {
Effect.Appear(update, {duration:0.15});
if (options.iframeId) {
- Effect.Appear($(options.iframeId), {duration:0.15});
+ Effect.Appear($(options.iframeId), {duration:0.15, to: 0.01});
}
} else {
// workaround for RF-205
16 years, 11 months
JBoss Rich Faces SVN: r5510 - branches/3.1.x/ui/scrollableDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-01-21 14:18:00 -0500 (Mon, 21 Jan 2008)
New Revision: 5510
Modified:
branches/3.1.x/ui/scrollableDataTable/pom.xml
Log:
small fix
Modified: branches/3.1.x/ui/scrollableDataTable/pom.xml
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/pom.xml 2008-01-21 19:17:55 UTC (rev 5509)
+++ branches/3.1.x/ui/scrollableDataTable/pom.xml 2008-01-21 19:18:00 UTC (rev 5510)
@@ -2,19 +2,19 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.1.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
<artifactId>scrollableDataTable</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.1.4-SNAPSHOT</version>
<name>Scrollable Data Table</name>
<build>
<plugins>
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.1.4-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -71,12 +71,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dataTable</artifactId>
- <version>3.1.3-SNAPSHOT</version>
+ <version>3.1.4-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
16 years, 11 months
JBoss Rich Faces SVN: r5509 - branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-21 14:17:55 -0500 (Mon, 21 Jan 2008)
New Revision: 5509
Modified:
branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
Log:
http://jira.jboss.com/jira/browse/RF-1955
Modified: branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
===================================================================
--- branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-01-21 19:16:32 UTC (rev 5508)
+++ branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-01-21 19:17:55 UTC (rev 5509)
@@ -31,9 +31,9 @@
*/
public abstract class UIDataGrid extends SequenceDataAdaptor {
- public static final String COMPONENT_TYPE = "org.richfaces.DataGrig";
+ public static final String COMPONENT_TYPE = "org.richfaces.DataGrid";
- public static final String COMPONENT_FAMILY = "org.richfaces.DataGrig";
+ public static final String COMPONENT_FAMILY = "org.richfaces.DataGrid";
/**
* Number of columns in one table row.
16 years, 11 months
JBoss Rich Faces SVN: r5508 - trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-01-21 14:16:32 -0500 (Mon, 21 Jan 2008)
New Revision: 5508
Modified:
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml
trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
Log:
rename portlet to avod name collosion with richfaces demo
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2008-01-21 18:07:39 UTC (rev 5507)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/ajaxportlet-object.xml 2008-01-21 19:16:32 UTC (rev 5508)
@@ -4,8 +4,8 @@
<parent-ref>default</parent-ref>
<if-exists>overwrite</if-exists>
<instance>
- <instance-name>AjaxPortletInstance</instance-name>
- <component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
+ <instance-name>AjaxRepeaterPortletInstance</instance-name>
+ <component-ref>ajaxRepeaterPortletApp.ajaxRepeaterPortlet</component-ref>
</instance>
</deployment>
<deployment>
@@ -13,17 +13,17 @@
<if-exists>overwrite</if-exists>
<instance>
<instance-name>RichfacesPortletInstance</instance-name>
- <component-ref>ajaxPortletApp.richfacesPortlet</component-ref>
+ <component-ref>ajaxRepeaterPortletApp.richfacesPortlet</component-ref>
</instance>
</deployment>
<deployment>
<parent-ref>default</parent-ref>
<if-exists>overwrite</if-exists>
<page>
- <page-name>ajaxPortlet</page-name>
+ <page-name>ajaxRepeaterPortlet</page-name>
<window>
<window-name>ajaxportletWindow</window-name>
- <instance-ref>AjaxPortletInstance</instance-ref>
+ <instance-ref>AjaxRepeaterPortletInstance</instance-ref>
<default>true</default>
<region>center</region>
<height>0</height>
@@ -35,7 +35,7 @@
<parent-ref>default.default</parent-ref>
<window>
<window-name>otherAjaxportletWindow</window-name>
- <instance-ref>AjaxPortletInstance</instance-ref>
+ <instance-ref>AjaxRepeaterPortletInstance</instance-ref>
<default>true</default>
<region>center</region>
<height>0</height>
@@ -57,8 +57,8 @@
<parent-ref>default</parent-ref>
<if-exists>overwrite</if-exists>
<instance>
- <instance-name>AjaxPortletSecondInstance</instance-name>
- <component-ref>ajaxPortletApp.ajaxPortlet</component-ref>
+ <instance-name>AjaxRepeaterPortletSecondInstance</instance-name>
+ <component-ref>ajaxRepeaterPortletApp.ajaxRepeaterPortlet</component-ref>
</instance>
</deployment>
-->
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml 2008-01-21 18:07:39 UTC (rev 5507)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-app.xml 2008-01-21 19:16:32 UTC (rev 5508)
@@ -1,3 +1,3 @@
<jboss-app>
- <app-name>ajaxPortletApp</app-name>
+ <app-name>ajaxRepeaterPortletApp</app-name>
</jboss-app>
\ No newline at end of file
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml 2008-01-21 18:07:39 UTC (rev 5507)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/jboss-portlet.xml 2008-01-21 19:16:32 UTC (rev 5508)
@@ -5,7 +5,7 @@
"http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
<portlet-app>
<portlet>
- <portlet-name>ajaxPortlet</portlet-name>
+ <portlet-name>ajaxRepeaterPortlet</portlet-name>
<header-content>
<script src="/faces/rfRes/org/ajax4jsf/framework.pack.js" type="text/javascript" ></script>
<script src="/faces/rfRes/org/richfaces/ui.pack.js" type="text/javascript" ></script>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml 2008-01-21 18:07:39 UTC (rev 5507)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet-instances.xml 2008-01-21 19:16:32 UTC (rev 5508)
@@ -2,8 +2,8 @@
<deployments>
<deployment>
<instance>
- <instance-id>AjaxPortletInstance</instance-id>
- <portlet-ref>ajaxPortlet</portlet-ref>
+ <instance-id>AjaxRepeaterPortletInstance</instance-id>
+ <portlet-ref>ajaxRepeaterPortlet</portlet-ref>
</instance>
</deployment>
<deployment>
Modified: trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2008-01-21 18:07:39 UTC (rev 5507)
+++ trunk/samples/ajaxPortlet/src/main/webapp/WEB-INF/portlet.xml 2008-01-21 19:16:32 UTC (rev 5508)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
xmlns="http://java.sun.com/xml/ns/portlet">
<portlet>
- <portlet-name>ajaxPortlet</portlet-name>
+ <portlet-name>ajaxRepeaterPortlet</portlet-name>
<portlet-class>
javax.portlet.faces.GenericFacesPortlet
</portlet-class>
16 years, 11 months
JBoss Rich Faces SVN: r5507 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-21 13:07:39 -0500 (Mon, 21 Jan 2008)
New Revision: 5507
Modified:
trunk/docs/userguide/en/src/main/docbook/included/columns.xml
Log:
http://jira.jboss.com/jira/browse/RF-1199 - add 'rowspan', 'colspan' attributes
Modified: trunk/docs/userguide/en/src/main/docbook/included/columns.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2008-01-21 18:05:22 UTC (rev 5506)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2008-01-21 18:07:39 UTC (rev 5507)
@@ -124,17 +124,10 @@
<emphasis role="bold"><property><rich:dataTable></property></emphasis>.
</para>
- <!--para>In order to group columns with text information into one row in one column with a flag, use
- the <emphasis ><property>"colspan"</property></emphasis> attribute, which is similar to an HTML one, specifying that the first column contains 3 columns.
- In addition, it's necessary to specify that the next column begins from the first row with the help of the
- <emphasis ><property>"breakBefore"</property></emphasis> attribute = true.
- </para-->
-
-
<para>
The <emphasis role="bold"><property><rich:columns></property></emphasis> component does not prevent to use
<emphasis role="bold"><property><rich:column></property></emphasis>.
- In the following example one column renders in any way and another columns could be picked from the model:
+ In the following example one column renders in any way and another columns could be picked from the model.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -155,6 +148,78 @@
</rich:columns>
</rich:dataTable>
...]]></programlisting>
+
+ <para>In order to group columns with text information into one row, use
+ the <emphasis ><property>"colspan"</property></emphasis> attribute, which is similar to an HTML one, specifying that the first column contains 3 columns.
+ In addition, it's necessary to specify that the next column begins from the first row with the help of the
+ <emphasis ><property>"breakBefore"</property></emphasis> attribute = true.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:dataTable value="#{columns.data1}" var="data">
+ <rich:column>
+ <h:outputText value="#{column.Item1}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{column.Item2}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{column.Item3}" />
+ </rich:column>
+ <rich:columns columns="3" colspan="3" breakBefore="true">
+ <h:outputText value="#{data.str0}" />
+ </rich:columns>
+</rich:dataTable>
+...
+]]></programlisting>
+
+ <!--para>As a result the following structure is rendered:</para>
+ <figure>
+ <title><rich:column> modified with colspan and breakbefore attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/column3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure-->
+
+ <para>The same way is used for <property>columns</property> grouping with the <emphasis ><property>"rowspan"</property></emphasis>
+ attribute that is similar to an HTML one responsible for rows quantity definition occupied with the
+ current one. The only thing to add in the example is an instruction to move onto the next row for each next after the second column.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:dataTable value="#{columns.data1}" var="data">
+ <rich:columns columns="2" rowspan="3">
+ <h:outputText value="#{data.str0}" />
+ </rich:columns>
+ <rich:column>
+ <h:outputText value="#{column.Item1}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{column.Item2}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{column.Item3}" />
+ </rich:column>
+</rich:dataTable>
+...
+]]></programlisting>
+ <!--para>As a result:</para>
+ <figure>
+ <title><rich:column> generated with rowspan attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/column4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure-->
+
+
</section>
<section>
16 years, 11 months
JBoss Rich Faces SVN: r5506 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-21 13:05:22 -0500 (Mon, 21 Jan 2008)
New Revision: 5506
Added:
trunk/docs/userguide/en/src/main/resources/images/calendar5.png
Log:
http://jira.jboss.com/jira/browse/RF-1724 - add screen for quick year selection feature
Added: trunk/docs/userguide/en/src/main/resources/images/calendar5.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/calendar5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 11 months