JBoss Rich Faces SVN: r4834 - branches/3.1.x/cdk.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-12-13 17:50:43 -0500 (Thu, 13 Dec 2007)
New Revision: 4834
Added:
branches/3.1.x/cdk/maven-javascript-plugin/
Log:
copy JavaScript plugin to stable branch
Copied: branches/3.1.x/cdk/maven-javascript-plugin (from rev 4833, trunk/cdk/maven-javascript-plugin)
16 years, 10 months
JBoss Rich Faces SVN: r4833 - in trunk: extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-12-13 17:33:55 -0500 (Thu, 13 Dec 2007)
New Revision: 4833
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/context/AbstractExternalContext.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.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/PortletContextImpl.java
trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
trunk/framework/impl/pom.xml
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/components.xml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/home.xhtml
trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml
trunk/ui/assembly/pom.xml
Log:
Create aggregated JavaScript files, and test it.
Fix some portal-seam issues.
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 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -51,11 +51,11 @@
javax.servlet.ServletContext.class,
javax.servlet.ServletRequest.class,
javax.servlet.ServletResponse.class,
- javax.servlet.http.HttpSession.class,
- AjaxContext.class};
+ javax.servlet.http.HttpSession.class, AjaxContext.class };
private static final String[] excludedRequestAttributes = {
- "javax.servlet.include", ResponseStateManager.VIEW_STATE_PARAM, AbstractExternalContext.EXCLUDED_PARAMETERS_ATTRIBUTE };
+ "javax.servlet.include", ResponseStateManager.VIEW_STATE_PARAM,
+ AbstractExternalContext.EXCLUDED_PARAMETERS_ATTRIBUTE };
public static final String REQUEST_PARAMETERS_ATTRIBUTE = PortletViewState.class
.getName()
@@ -69,15 +69,12 @@
private Object componentsState;
- private UIViewRoot viewRoot;
+ private transient UIViewRoot viewRoot;
private String viewId;
-
private Map<String, String[]> _requestParameters;
-
-
/**
* @return the viewId
*/
@@ -218,7 +215,8 @@
beans = null;
Map<String, Object> requestMap = facesContext.getExternalContext()
.getRequestMap();
- List existingAttributes = (List) requestMap.get(AbstractExternalContext.EXCLUDED_PARAMETERS_ATTRIBUTE);
+ List existingAttributes = (List) requestMap
+ .get(AbstractExternalContext.EXCLUDED_PARAMETERS_ATTRIBUTE);
if (null == existingAttributes) {
existingAttributes = Collections.EMPTY_LIST;
}
@@ -249,6 +247,17 @@
}
_requestParameters = new HashMap<String, String[]>(facesContext
.getExternalContext().getRequestParameterValuesMap());
+ // Seam hack - save conversation Id for a request parameter.
+ try {
+ Object conversationId = facesContext.getApplication()
+ .evaluateExpressionGet(facesContext, "#{conversation.id}",
+ Object.class);
+ if(null != conversationId){
+ _requestParameters.put("conversationId", new String[]{conversationId.toString()});
+ }
+ } catch (Exception e) {
+ // Do nothing - no seam conversation found !
+ }
}
public void restoreBeans(FacesContext facesContext) {
@@ -270,13 +279,17 @@
restoreBeans(facesContext);
}
String viewId = getViewId();
- if(null == viewId && Bridge.PortletPhase.ActionPhase.equals(requestMap.get(Bridge.PORTLET_LIFECYCLE_PHASE))){
- viewId = (String) externalContext.getRequestParameterMap().get(AbstractExternalContext.VIEW_ID_PARAMETER);
+ if (null == viewId
+ && Bridge.PortletPhase.ActionPhase.equals(requestMap
+ .get(Bridge.PORTLET_LIFECYCLE_PHASE))) {
+ viewId = (String) externalContext.getRequestParameterMap().get(
+ AbstractExternalContext.VIEW_ID_PARAMETER);
}
if (null == viewId) {
viewId = (String) requestMap.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");
}
} else {
requestMap.put(Bridge.IS_POSTBACK_ATTRIBUTE, Boolean.TRUE);
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 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/AbstractExternalContext.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -133,8 +133,24 @@
private Map actionSettings;
private Object context;
+
+ private boolean hasNavigationRedirect = false;
/**
+ * @return the hasNavigationRedirect
+ */
+ boolean isHasNavigationRedirect() {
+ return hasNavigationRedirect;
+ }
+
+ /**
+ * @param hasNavigationRedirect the hasNavigationRedirect to set
+ */
+ void setHasNavigationRedirect(boolean hasNavigationRedirect) {
+ this.hasNavigationRedirect = hasNavigationRedirect;
+ }
+
+ /**
*
* @param context
* @param request
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextFactoryImpl.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -133,7 +133,7 @@
throw new NullPointerException(
"One or more parameters for a faces context instantiation is null");
}
- ExternalContext externalContext;
+ AbstractExternalContext externalContext;
if ((context instanceof PortletContext)
&& (request instanceof ActionRequest)
&& (response instanceof ActionResponse)) {
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 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/FacesContextImpl.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -79,307 +79,314 @@
/**
*
- * Implementation for <code>FacesContext</code> in Portlet Environment.
+ * Implementation for <code>FacesContext</code> in Portlet Environment.
+ *
* @author shura
*
*
*/
public class FacesContextImpl extends FacesContext {
-
- private boolean released = true;
- private boolean renderResponse;
+ private boolean released = true;
- private boolean responseComplete;
+ private boolean renderResponse;
- private Application application;
+ private boolean responseComplete;
- private UIViewRoot viewRoot;
+ private Application application;
- private Map messages;
+ private UIViewRoot viewRoot;
- private ExternalContext externalContext;
+ private Map messages;
- private Lifecycle lifecycle;
+ private AbstractExternalContext externalContext;
- private ResponseWriter responseWriter;
+ private Lifecycle lifecycle;
- private ResponseStream responseStream;
+ private ResponseWriter responseWriter;
- private ELContext elContext;
+ private ResponseStream responseStream;
- public FacesContextImpl(ExternalContext externalContext, Lifecycle lifecycle) {
- super();
- setCurrentInstance(this);
- this.externalContext = externalContext;
- this.lifecycle = lifecycle;
- this.released = false;
- }
+ private ELContext elContext;
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see org.apache.cocoon.components.faces.context.CocoonFacesContext#getLifecycle()
- *
- */
- public Lifecycle getLifecycle() {
- checkReleased();
- return this.lifecycle;
- }
+ public FacesContextImpl(AbstractExternalContext externalContext,
+ Lifecycle lifecycle) {
+ super();
+ setCurrentInstance(this);
+ this.externalContext = externalContext;
+ this.lifecycle = lifecycle;
+ this.released = false;
+ }
- public ELContext getELContext() {
- checkReleased();
- if (this.elContext == null) {
- Application application = getApplication();
- this.elContext = new ELContextImpl(application.getELResolver());
- this.elContext.putContext(FacesContext.class, this);
- UIViewRoot root = getViewRoot();
- if (null != root) {
- this.elContext.setLocale(root.getLocale());
- }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see org.apache.cocoon.components.faces.context.CocoonFacesContext#getLifecycle()
+ *
+ */
+ public Lifecycle getLifecycle() {
+ checkReleased();
+ return this.lifecycle;
}
- return this.elContext;
- }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#getExternalContext()
- *
- */
- public ExternalContext getExternalContext() {
- checkReleased();
- return this.externalContext;
- }
+ public ELContext getELContext() {
+ checkReleased();
+ if (this.elContext == null) {
+ Application application = getApplication();
+ this.elContext = new ELContextImpl(application.getELResolver());
+ this.elContext.putContext(FacesContext.class, this);
+ UIViewRoot root = getViewRoot();
+ if (null != root) {
+ this.elContext.setLocale(root.getLocale());
+ }
+ }
+ return this.elContext;
+ }
- /**
- *
- * @param externalContext
- *
- * The externalContext to set.
- *
- */
- // public void setExternalContext(ExternalContext externalContext) {
- // this.externalContext = externalContext;
- // }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#getResponseStream()
- *
- */
- public ResponseStream getResponseStream() {
- checkReleased();
- return this.responseStream;
- }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#getExternalContext()
+ *
+ */
+ public ExternalContext getExternalContext() {
+ checkReleased();
+ return this.externalContext;
+ }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#setResponseStream(javax.faces.context.ResponseStream)
- *
- */
- public void setResponseStream(ResponseStream responseStream) {
- checkReleased();
- this.responseStream = responseStream;
- }
+ /**
+ *
+ * @param externalContext
+ *
+ * The externalContext to set.
+ *
+ */
+ // public void setExternalContext(ExternalContext externalContext) {
+ // this.externalContext = externalContext;
+ // }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#getResponseStream()
+ *
+ */
+ public ResponseStream getResponseStream() {
+ checkReleased();
+ return this.responseStream;
+ }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#getResponseWriter()
- *
- */
- public ResponseWriter getResponseWriter() {
- checkReleased();
- return this.responseWriter;
- }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#setResponseStream(javax.faces.context.ResponseStream)
+ *
+ */
+ public void setResponseStream(ResponseStream responseStream) {
+ checkReleased();
+ this.responseStream = responseStream;
+ }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#setResponseWriter(javax.faces.context.ResponseWriter)
- *
- */
- public void setResponseWriter(ResponseWriter responseWriter) {
- checkReleased();
- this.responseWriter = responseWriter;
- }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#getResponseWriter()
+ *
+ */
+ public ResponseWriter getResponseWriter() {
+ checkReleased();
+ return this.responseWriter;
+ }
- /*
- *
- * (non-Javadoc)
- *
- *
- *
- * @see javax.faces.context.FacesContext#release()
- *
- */
- public void release() {
- // Release this and default instances...
- this.released = true;
- FacesContext.setCurrentInstance(null);
- // defaultContext = null;
- this.lifecycle = null;
- this.externalContext = null;
- this.responseWriter = null;
- this.application = null;
- this.viewRoot = null;
- this.messages = null;
- this.responseWriter = null;
- }
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#setResponseWriter(javax.faces.context.ResponseWriter)
+ *
+ */
+ public void setResponseWriter(ResponseWriter responseWriter) {
+ checkReleased();
+ this.responseWriter = responseWriter;
+ }
- public Application getApplication() {
- checkReleased();
- if (this.application == null) {
- ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder
- .getFactory(FactoryFinder.APPLICATION_FACTORY);
- this.application = aFactory.getApplication();
+ /*
+ *
+ * (non-Javadoc)
+ *
+ *
+ *
+ * @see javax.faces.context.FacesContext#release()
+ *
+ */
+ public void release() {
+ // Release this and default instances...
+ this.released = true;
+ FacesContext.setCurrentInstance(null);
+ // defaultContext = null;
+ this.lifecycle = null;
+ this.externalContext = null;
+ this.responseWriter = null;
+ this.application = null;
+ this.viewRoot = null;
+ this.messages = null;
+ this.responseWriter = null;
}
- return this.application;
- }
- public Iterator getClientIdsWithMessages() {
- checkReleased();
- if (this.messages == null) {
- return Collections.EMPTY_LIST.iterator();
- } else {
- return this.messages.keySet().iterator();
+ public Application getApplication() {
+ checkReleased();
+ if (this.application == null) {
+ ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
+ this.application = aFactory.getApplication();
+ }
+ return this.application;
}
- }
- public Severity getMaximumSeverity() {
- checkReleased();
- Severity max = null;
- Iterator messages = getMessages();
- while (messages.hasNext()) {
- FacesMessage msg = (FacesMessage) messages.next();
- Severity severity = msg.getSeverity();
- if ((null == max) || (max.getOrdinal() < severity.getOrdinal())) {
- max = severity;
- }
+ public Iterator getClientIdsWithMessages() {
+ checkReleased();
+ if (this.messages == null) {
+ return Collections.EMPTY_LIST.iterator();
+ } else {
+ return this.messages.keySet().iterator();
+ }
}
- return max;
- }
- public Iterator getMessages() {
- checkReleased();
- if (this.messages == null) {
- return Collections.EMPTY_LIST.iterator();
+ public Severity getMaximumSeverity() {
+ checkReleased();
+ Severity max = null;
+ Iterator messages = getMessages();
+ while (messages.hasNext()) {
+ FacesMessage msg = (FacesMessage) messages.next();
+ Severity severity = msg.getSeverity();
+ if ((null == max) || (max.getOrdinal() < severity.getOrdinal())) {
+ max = severity;
+ }
+ }
+ return max;
}
- List messages = new ArrayList();
- for (Iterator i = this.messages.values().iterator(); i.hasNext();) {
- final List list = (List) i.next();
- messages.addAll(list);
+
+ public Iterator getMessages() {
+ checkReleased();
+ if (this.messages == null) {
+ return Collections.EMPTY_LIST.iterator();
+ }
+ List messages = new ArrayList();
+ for (Iterator i = this.messages.values().iterator(); i.hasNext();) {
+ final List list = (List) i.next();
+ messages.addAll(list);
+ }
+ if (messages.size() > 0) {
+ return messages.iterator();
+ }
+ return Collections.EMPTY_LIST.iterator();
}
- if (messages.size() > 0) {
- return messages.iterator();
+
+ public Iterator getMessages(String clientID) {
+ checkReleased();
+ if (this.messages != null) {
+ final List list = (List) this.messages.get(clientID);
+ if (list != null) {
+ return list.iterator();
+ }
+ }
+ return Collections.EMPTY_LIST.iterator();
}
- return Collections.EMPTY_LIST.iterator();
- }
- public Iterator getMessages(String clientID) {
- checkReleased();
- if (this.messages != null) {
- final List list = (List) this.messages.get(clientID);
- if (list != null) {
- return list.iterator();
- }
+ public RenderKit getRenderKit() {
+ checkReleased();
+ UIViewRoot viewRoot = getViewRoot();
+ if (viewRoot == null) {
+ return null;
+ }
+ String renderKitId = viewRoot.getRenderKitId();
+ if (renderKitId == null) {
+ return null;
+ } else {
+ RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ return rkFactory.getRenderKit(this, renderKitId);
+ }
}
- return Collections.EMPTY_LIST.iterator();
- }
- public RenderKit getRenderKit() {
- checkReleased();
- UIViewRoot viewRoot = getViewRoot();
- if (viewRoot == null) {
- return null;
+ public boolean getRenderResponse() {
+ checkReleased();
+ return this.renderResponse;
}
- String renderKitId = viewRoot.getRenderKitId();
- if (renderKitId == null) {
- return null;
- } else {
- RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
- .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
- return rkFactory.getRenderKit(this, renderKitId);
+
+ public boolean getResponseComplete() {
+ checkReleased();
+ return this.responseComplete;
}
- }
- public boolean getRenderResponse() {
- checkReleased();
- return this.renderResponse;
- }
+ public UIViewRoot getViewRoot() {
+ checkReleased();
+ return this.viewRoot;
+ }
- public boolean getResponseComplete() {
- checkReleased();
- return this.responseComplete;
- }
+ public void setViewRoot(UIViewRoot viewRoot) {
+ checkReleased();
+ this.viewRoot = viewRoot;
+ // JSR-301 PLT 6.1.2 FacesContext
+ if (viewRoot instanceof PortletNamingContainer) {
+ Object response = getExternalContext().getResponse();
+ if (response instanceof PortletResponse) {
+ PortletResponse portletResponse = (PortletResponse) response;
+ portletResponse.setProperty("X-JAVAX-PORTLET-IS-NAMESPACED",
+ "true");
+ }
+ }
+ }
- public UIViewRoot getViewRoot() {
- checkReleased();
- return this.viewRoot;
- }
-
- public void setViewRoot(UIViewRoot viewRoot) {
- checkReleased();
- this.viewRoot = viewRoot;
- // JSR-301 PLT 6.1.2 FacesContext
- if( viewRoot instanceof PortletNamingContainer ){
- Object response = getExternalContext().getResponse();
- if (response instanceof PortletResponse) {
- PortletResponse portletResponse = (PortletResponse) response;
- portletResponse.setProperty("X-JAVAX-PORTLET-IS-NAMESPACED" , "true");
+ public void addMessage(String clientID, FacesMessage message) {
+ checkReleased();
+ if (message == null) {
+ throw new NullPointerException("Message can't be null");
}
+ if (this.messages == null) {
+ this.messages = new HashMap();
+ }
+ List list = (List) this.messages.get(clientID);
+ if (list == null) {
+ list = new ArrayList();
+ this.messages.put(clientID, list);
+ }
+ list.add(message);
}
- }
- public void addMessage(String clientID, FacesMessage message) {
- checkReleased();
- if (message == null) {
- throw new NullPointerException("Message can't be null");
+ public void renderResponse() {
+ checkReleased();
+ this.renderResponse = true;
}
- if (this.messages == null) {
- this.messages = new HashMap();
+
+ public void responseComplete() {
+ checkReleased();
+ if (externalContext.isHasNavigationRedirect()) {
+ this.renderResponse = true;
+ } else {
+ this.responseComplete = true;
+ }
}
- List list = (List) this.messages.get(clientID);
- if (list == null) {
- list = new ArrayList();
- this.messages.put(clientID, list);
- }
- list.add(message);
- }
- public void renderResponse() {
- checkReleased();
- this.renderResponse = true;
- }
-
- public void responseComplete() {
- checkReleased();
- this.responseComplete = true;
- }
-
- private void checkReleased() {
- if (this.released) {
- throw new IllegalStateException("Context is released.");
+ private void checkReleased() {
+ if (this.released) {
+ throw new IllegalStateException("Context is released.");
+ }
}
- }
}
\ No newline at end of file
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletContextImpl.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -8,6 +8,8 @@
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Collections;
@@ -19,7 +21,9 @@
import java.util.Set;
import java.util.regex.Pattern;
+import javax.faces.application.ViewHandler;
import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
import javax.faces.context.FacesContextFactory;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -37,23 +41,27 @@
import org.ajax4jsf.webapp.WebXml;
/**
- * Version of the {@link ExternalContext} for a Portlet request. {@link FacesContextFactory} will create instance of this class
- * for a portal <code>action</code> phase.
+ * Version of the {@link ExternalContext} for a Portlet request.
+ * {@link FacesContextFactory} will create instance of this class for a portal
+ * <code>action</code> phase.
+ *
* @author asmirnov
*
*/
public class PortletContextImpl extends AbstractExternalContext {
+ public static final String ACTION_URL_DO_NOTHITG = "/ajax4jsfPortletBridge/actionUrl/do/nothitg";
private String namespace;
public PortletContextImpl(PortletContext context, PortletRequest request,
PortletResponse response) {
super(context, request, response);
WebXml webXml = (WebXml) context.getAttribute(WebXml.CONTEXT_ATTRIBUTE);
- if(null != webXml){
- _servletPath = webXml.getFacesServletPrefix();
+ if (null != webXml) {
+ _servletPath = webXml.getFacesServletPrefix();
}
- ArrayList excludedAttributes = Collections.list(request.getAttributeNames());
+ ArrayList excludedAttributes = Collections.list(request
+ .getAttributeNames());
request.setAttribute(EXCLUDED_PARAMETERS_ATTRIBUTE, excludedAttributes);
}
@@ -62,26 +70,26 @@
}
public String getResponseCharacterEncoding() {
- return null;
+ return null;
}
public String getResponseContentType() {
- return null;
+ return null;
}
public void setRequestCharacterEncoding(String encoding)
throws UnsupportedEncodingException {
- try {
- ActionRequest actionRequest = (ActionRequest) getPortletRequest();
- actionRequest.setCharacterEncoding(encoding);
- } catch (IllegalStateException e) {
- // TODO: handle exception
- }
+ try {
+ ActionRequest actionRequest = (ActionRequest) getPortletRequest();
+ actionRequest.setCharacterEncoding(encoding);
+ } catch (IllegalStateException e) {
+ // TODO: handle exception
+ }
}
public String getRequestCharacterEncoding() {
- ActionRequest actionRequest = (ActionRequest) getPortletRequest();
- return actionRequest.getCharacterEncoding();
+ ActionRequest actionRequest = (ActionRequest) getPortletRequest();
+ return actionRequest.getCharacterEncoding();
}
public String getRequestContentType() {
@@ -106,12 +114,11 @@
protected String getNamespace() {
if (null == namespace) {
- namespace = (String) getRequestParameter(
- AbstractExternalContext.NAMESPACE_PARAMETER);
- if(null == namespace){
- throw new IllegalStateException(
- "Can not determine portlet namespace");
- }
+ namespace = (String) getRequestParameter(AbstractExternalContext.NAMESPACE_PARAMETER);
+ if (null == namespace) {
+ throw new IllegalStateException(
+ "Can not determine portlet namespace");
+ }
}
return namespace;
}
@@ -222,31 +229,35 @@
if (null == path) {
throw new NullPointerException("Path to new view is null");
}
- throw new IllegalStateException(
- "Dispatch to new view not at render phase");
+ throw new IllegalStateException(
+ "Dispatch to new view not at render phase");
}
- private static final Pattern absoluteUrl = Pattern.compile("");
- private static final Pattern directLink = Pattern.compile("");
- private static final Pattern viewIdParam = Pattern.compile("");
+ private static final Pattern absoluteUrl = Pattern.compile("");
+ private static final Pattern directLink = Pattern.compile("");
+ private static final Pattern viewIdParam = Pattern.compile("");
/**
* @param parameters
* @return
*/
@Override
- protected String createActionUrl(Map<String, String> parameters){
- RenderResponse renderResponse = (RenderResponse) getPortletResponse();
- PortletURL portletURL = renderResponse.createActionURL();
- portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER,
- renderResponse.getNamespace());
- for (Iterator<Map.Entry<String, String>> param = parameters.entrySet()
- .iterator(); param.hasNext();) {
- Map.Entry<String, String> parameter = param.next();
- portletURL.setParameter(parameter.getKey(), parameter.getValue());
+ protected String createActionUrl(Map<String, String> parameters) {
+ String dummyActionURL = getRequestContextPath() + ACTION_URL_DO_NOTHITG;
+ try {
+ PortalActionURL actionUrl = new PortalActionURL(dummyActionURL);
+ for (Iterator<Map.Entry<String, String>> param = parameters
+ .entrySet().iterator(); param.hasNext();) {
+ Map.Entry<String, String> parameter = param.next();
+ actionUrl
+ .addParameter(parameter.getKey(), parameter.getValue());
+ }
+ return actionUrl.toString();
+ } catch (MalformedURLException e) {
+
}
- return portletURL.toString();
- }
+ return dummyActionURL;
+ }
public String encodeResourceURL(String url) {
return encodeURL(url);
@@ -257,7 +268,7 @@
* @return
*/
protected String encodeURL(String url) {
- return getPortletResponse().encodeURL(url);
+ return getPortletResponse().encodeURL(url);
}
public String getAuthType() {
@@ -281,7 +292,7 @@
}
private String _pathInfo = null;
-
+
public String getRequestPathInfo() {
String pathInfo = (String) getRequestParameter(VIEW_ID_PARAMETER);
if (null == pathInfo) {
@@ -291,7 +302,7 @@
}
private String _servletPath = null;
-
+
public String getRequestServletPath() {
return _servletPath;
}
@@ -321,8 +332,34 @@
throw new NullPointerException("Path to redirect is null");
}
PortalActionURL actionURL = new PortalActionURL(url);
- if(url.startsWith("#") || (!actionURL.isInContext(getRequestContextPath())) || "true".equalsIgnoreCase(actionURL.getParameter(Bridge.DIRECT_LINK))){
+ if (url.startsWith("#")
+ || (!actionURL.isInContext(getRequestContextPath()))
+ || "true".equalsIgnoreCase(actionURL
+ .getParameter(Bridge.DIRECT_LINK))) {
((ActionResponse) getResponse()).sendRedirect(url);
+ } else {
+ internalRedirect(actionURL);
}
}
+
+ /**
+ * @param actionURL
+ */
+ protected void internalRedirect(PortalActionURL actionURL) {
+ // Detect ViewId from URL and create new view for them.
+ String viewId = actionURL.getParameter(VIEW_ID_PARAMETER);
+ 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);
+ } catch (UnsupportedEncodingException e) {
+ // Do nothing - UTF-8 encoding is a default.
+ }
+ }
+ }
}
Modified: trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java
===================================================================
--- trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/extensions/portletbridge/portletbridge-impl/src/main/java/org/ajax4jsf/portlet/context/PortletRenderContextImpl.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -91,13 +91,15 @@
throw new NullPointerException("Path to redirect is null");
}
PortalActionURL actionURL = new PortalActionURL(url);
- if(!actionURL.isInContext(getRequestContextPath()) || "true".equalsIgnoreCase(actionURL.getParameter(Bridge.DIRECT_LINK))){
- dispatch(url);
+ if((!actionURL.isInContext(getRequestContextPath()) && null == actionURL.getParameter(VIEW_ID_PARAMETER)) || "true".equalsIgnoreCase(actionURL.getParameter(Bridge.DIRECT_LINK))){
+// dispatch(url);
// throw new IllegalStateException(
// "Redirect to new url not at action phase");
+ } else {
+ // HACK - if page is in the context, just treat it as navigation case
+ internalRedirect(actionURL);
}
- // HACK - if page is in the context, just treat it as navigation case
}
@Override
Modified: trunk/framework/impl/pom.xml
===================================================================
--- trunk/framework/impl/pom.xml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/framework/impl/pom.xml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -90,16 +90,17 @@
<includes>
<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/prototype-min.js</include>
<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/AJAX-min.js</include>
+ <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js</include>
+ <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/jquery/jquery-min.js</include>
<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/dnd-min.js</include>
- <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js</include>
<include>**/*-min.js</include>
</includes>
<!-- files to exclude, path relative to output's directory -->
<excludes>
<exclude>**/*.pack.js</exclude>
<!-- exclude parts of the scriptaculous, so big file already included -->
- <exclude>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/*.js</exclude>
- <exclude>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/jquery.jcarousel-min.js</exclude>
+ <exclude>**/scriptaculous/*.js</exclude>
+ <exclude>**/jquery.jcarousel-min.js</exclude>
<exclude>**/compressed.css</exclude>
</excludes>
</aggregation>
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -58,6 +58,7 @@
import org.ajax4jsf.renderkit.RendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.ResourceNotFoundException;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
import org.apache.commons.logging.Log;
@@ -103,7 +104,7 @@
Map responseDataMap = new HashMap();
Map commonAjaxParameters = new HashMap();
-
+
Object oncomplete = null;
static {
@@ -114,9 +115,9 @@
invoker = new JsfOneOneInvoker();
}
}
-
+
public void release() {
-
+
ajaxAreasToRender = new HashSet();
ajaxRenderedAreas = new LinkedHashSet();
@@ -138,7 +139,7 @@
responseDataMap = new HashMap();
commonAjaxParameters = new HashMap();
-
+
}
/**
@@ -355,43 +356,78 @@
UIViewRoot root = context.getViewRoot();
ViewResources viewResources = new ViewResources();
try {
- Skin skin = SkinFactory.getInstance().getSkin(
- context);
+ Skin skin = SkinFactory.getInstance().getSkin(context);
// Set default style sheet for current skin.
String styleSheetUri = (String) skin.getParameter(context,
Skin.generalStyleSheet);
- if(null != styleSheetUri){
+ if (null != styleSheetUri) {
String resourceURL = context.getApplication()
- .getViewHandler().getResourceURL(context,
- styleSheetUri);
+ .getViewHandler().getResourceURL(context,
+ styleSheetUri);
viewResources.addStyle(resourceURL);
}
// For a "NULL" skin, do not collect components stylesheets
- if("false".equals(skin.getParameter(context, Skin.loadStyleSheets))){
+ if ("false".equals(skin.getParameter(context,
+ Skin.loadStyleSheets))) {
viewResources.setProcessStyles(false);
}
} catch (SkinNotFoundException e) {
log.warn("Current Skin is not found", e);
}
- InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder.getInstance();
+ InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder
+ .getInstance();
// Check init parameters for a resources processing.
- String scriptStrategy = externalContext.getInitParameter(InternetResourceBuilder.LOAD_SCRIPT_STRATEGY_PARAM);
- if(null != scriptStrategy){
- if(InternetResourceBuilder.LOAD_NONE.equals(scriptStrategy)){
+ String scriptStrategy = externalContext
+ .getInitParameter(InternetResourceBuilder.LOAD_SCRIPT_STRATEGY_PARAM);
+ if (null != scriptStrategy) {
+ if (InternetResourceBuilder.LOAD_NONE
+ .equals(scriptStrategy)) {
viewResources.setProcessScripts(false);
- } else if (InternetResourceBuilder.LOAD_ALL.equals(scriptStrategy)) {
+ } else if (InternetResourceBuilder.LOAD_ALL
+ .equals(scriptStrategy)) {
viewResources.setProcessScripts(false);
- viewResources.addScript(internetResourceBuilder.createResource(this, InternetResourceBuilder.COMMON_FRAMEWORK_SCRIPT).getUri(context, null));
- viewResources.addScript(internetResourceBuilder.createResource(this, InternetResourceBuilder.COMMON_UI_SCRIPT).getUri(context, null));
+ try {
+ viewResources
+ .addScript(internetResourceBuilder
+ .createResource(
+ this,
+ InternetResourceBuilder.COMMON_FRAMEWORK_SCRIPT)
+ .getUri(context, null));
+ viewResources
+ .addScript(internetResourceBuilder
+ .createResource(
+ this,
+ InternetResourceBuilder.COMMON_UI_SCRIPT)
+ .getUri(context, null));
+
+ } catch (ResourceNotFoundException e) {
+ if(log.isWarnEnabled()){
+ log.warn("No aggregated javaScript library found "+e.getMessage());
+ }
+ }
}
}
- String styleStrategy = externalContext.getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
- if(null != styleStrategy){
- if(InternetResourceBuilder.LOAD_NONE.equals(styleStrategy)){
+ String styleStrategy = externalContext
+ .getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
+ if (null != styleStrategy) {
+ if (InternetResourceBuilder.LOAD_NONE.equals(styleStrategy)) {
viewResources.setProcessStyles(false);
- } else if (InternetResourceBuilder.LOAD_ALL.equals(styleStrategy)) {
+ } else if (InternetResourceBuilder.LOAD_ALL
+ .equals(styleStrategy)) {
viewResources.setProcessStyles(false);
- viewResources.addStyle(internetResourceBuilder.createResource(this, InternetResourceBuilder.COMMON_STYLE).getUri(context, null));
+ try {
+ viewResources
+ .addStyle(internetResourceBuilder
+ .createResource(
+ this,
+ InternetResourceBuilder.COMMON_STYLE)
+ .getUri(context, null));
+
+ } catch (ResourceNotFoundException e) {
+ if(log.isWarnEnabled()){
+ log.warn("No aggregated stylesheet found "+e.getMessage());
+ }
+ }
}
}
viewResources.collect(context);
@@ -430,7 +466,6 @@
}
}
-
public void saveViewState(FacesContext context) throws IOException {
// TODO - for facelets environment, we need to remove transient
// components.
@@ -542,8 +577,8 @@
throw new NullPointerException(
"Base component for search re-rendered compnnent is null");
}
- UIComponent target = RendererUtils.getInstance().
- findComponentFor(component, id);
+ UIComponent target = RendererUtils.getInstance().findComponentFor(
+ component, id);
if (null != target) {
return AjaxRendererUtils.getAbsoluteId(target);
}
@@ -702,9 +737,9 @@
ViewHandler viewHandler = context.getApplication().getViewHandler();
String actionURL = viewHandler.getActionURL(context, viewId);
// Mark Ajax action url as transparent with jsf-portlet bridge.
- actionURL = actionURL + ((actionURL.lastIndexOf('?')>0)?"&":"?")+"javax.portlet.faces.DirectLink=true";
- return context.getExternalContext().encodeActionURL(
- actionURL);
+ actionURL = actionURL + ((actionURL.lastIndexOf('?') > 0) ? "&" : "?")
+ + "javax.portlet.faces.DirectLink=true";
+ return context.getExternalContext().encodeActionURL(actionURL);
}
/**
@@ -722,7 +757,8 @@
}
/**
- * @param oncomplete the oncomplete to set
+ * @param oncomplete
+ * the oncomplete to set
*/
public void setOncomplete(Object oncomplete) {
this.oncomplete = oncomplete;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java 2007-12-13 22:33:55 UTC (rev 4833)
@@ -25,10 +25,12 @@
import java.util.LinkedHashSet;
import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import org.ajax4jsf.renderkit.HeaderResourceProducer;
import org.ajax4jsf.resource.InternetResource;
+import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.webapp.BaseFilter;
/**
@@ -47,7 +49,7 @@
*
* @see org.ajax4jsf.renderkit.HeaderResourceProducer#getHeaderScripts(javax.faces.context.FacesContext)
*/
- public LinkedHashSet<String> getHeaderScripts(FacesContext context,
+ public LinkedHashSet<String> getHeaderScripts(FacesContext context,
UIComponent component) {
return getUrisSet(context, getScripts(), component);
}
@@ -67,7 +69,7 @@
*
* @see org.ajax4jsf.renderkit.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext)
*/
- public LinkedHashSet<String> getHeaderStyles(FacesContext context,
+ public LinkedHashSet<String> getHeaderStyles(FacesContext context,
UIComponent component) {
return getUrisSet(context, getStyles(), component);
}
@@ -93,7 +95,7 @@
InternetResource[] resources, UIComponent component) {
if (null != resources) {
LinkedHashSet<String> uris = new LinkedHashSet<String>(); // Collections.singleton(ajaxScript.getUri(context,
- // null));
+ // null));
for (int i = 0; i < resources.length; i++) {
InternetResource resource = resources[i];
uris.add(resource.getUri(context, component));
@@ -113,10 +115,19 @@
throws IOException {
if ((null == context.getExternalContext().getRequestMap().get(
BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE))
- /*&& (!AjaxRendererUtils.isAjaxRequest(context))*/) {
+ /* && (!AjaxRendererUtils.isAjaxRequest(context)) */) {
// Filter not used - encode scripts and CSS before component.
- encodeResourcesArray(context, component, getScripts());
- encodeResourcesArray(context, component, getStyles());
+ ExternalContext externalContext = context.getExternalContext();
+ String scriptStrategy = externalContext
+ .getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
+ if (null == scriptStrategy || !InternetResourceBuilder.LOAD_NONE.equals(scriptStrategy)) {
+ encodeResourcesArray(context, component, getScripts());
+ }
+ String styleStrategy = externalContext
+ .getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
+ if (null != styleStrategy || !InternetResourceBuilder.LOAD_NONE.equals(styleStrategy)) {
+ encodeResourcesArray(context, component, getStyles());
+ }
}
}
@@ -126,10 +137,12 @@
* @param scripts
* @throws IOException
*/
- protected void encodeResourcesArray(FacesContext context, UIComponent component, InternetResource[] scripts) throws IOException {
+ protected void encodeResourcesArray(FacesContext context,
+ UIComponent component, InternetResource[] scripts)
+ throws IOException {
if (scripts != null) {
for (int i = 0; i < scripts.length; i++) {
- scripts[i].encode(context,component);
+ scripts[i].encode(context, component);
}
}
}
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/components.xml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/WEB-INF/components.xml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -18,7 +18,7 @@
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
- <core:init jndi-pattern="seamEAR/#{ejbName}/local" debug="true"/>
+ <core:init jndi-pattern="seamEAR/#{ejbName}/local" debug="false"/>
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/book.xhtml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -94,7 +94,7 @@
<div class="buttonBox">
<a:commandButton id="proceed" value="Proceed" action="#{hotelBooking.setBookingDetails}"/>
 
- <a:commandButton id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/>
+ <a:commandButton id="cancel" value="Cancel" action="#{hotelBooking.cancel}" immediate="true"/>
</div>
</fieldset>
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/home.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/home.xhtml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/home.xhtml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -9,6 +9,7 @@
</div>
<div id="container">
<div id="sidebar">
+ <ui:remove>
<h:form id="login">
<fieldset>
<div>
@@ -25,6 +26,8 @@
<div class="notes"><s:link id="register" view="/register.xhtml" value="Register New User"/></div>
</fieldset>
</h:form>
+ </ui:remove>
+ <p>In the portal environment, this application use portal authentication. Please, login into portal to access hotels pages</p>
</div>
<div id="content">
<div class="section">
Modified: trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml
===================================================================
--- trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/samples/seamPortletEar/seamBookingPortlet/src/main/webapp/main.xhtml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -64,8 +64,12 @@
#{hot.zip}
</h:column>
<h:column>
+ <f:facet name="header">AJAX Action</f:facet>
+ <a:commandLink id="viewHotelAJAX" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
+ </h:column>
+ <h:column>
<f:facet name="header">Action</f:facet>
- <a:commandLink id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
+ <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
</h:column>
</h:dataTable>
<a:commandLink value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}" reRender="searchResults"/>
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2007-12-13 21:00:40 UTC (rev 4832)
+++ trunk/ui/assembly/pom.xml 2007-12-13 22:33:55 UTC (rev 4833)
@@ -59,9 +59,11 @@
<includeModules>core</includeModules>
</taglib>
</taglibs>
- </library><!--
- <templateXpath>/*[local-name()='template']/*</templateXpath>
- --><commonStyle>org/richfaces/skin.xcss</commonStyle>
+ </library>
+ <!--
+ <templateXpath>/*[local-name()='template']/*</templateXpath>
+ -->
+ <commonStyle>org/richfaces/skin.xcss</commonStyle>
</configuration>
<executions>
<execution>
@@ -156,6 +158,20 @@
${project.build.directory}/docs/userguide/en
</outputDirectory>
</artifactItem>
+ <artifactItem>
+ <groupId>
+ org.richfaces.docs.faq
+ </groupId>
+ <artifactId>en</artifactId>
+ <version>
+ ${project.version}
+ </version>
+ <type>war</type>
+ <classifier>pdf</classifier>
+ <outputDirectory>
+ ${project.build.directory}/docs/faq/en
+ </outputDirectory>
+ </artifactItem>
</artifactItems>
<outputDirectory>
${project.build.directory}/docs
@@ -202,8 +218,9 @@
</configuration>
</plugin>
<plugin>
- <groupId>net.sf.alchim</groupId>
- <artifactId>yuicompressor-maven-plugin</artifactId>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-javascript-plugin</artifactId>
+ <version>${project.version}</version>
<executions>
<execution>
<goals>
@@ -224,14 +241,38 @@
<!-- insert new line after each concatenation (default: false) -->
<insertNewLine>true</insertNewLine>
<output>
- ${project.build.directory}/compressed/ui.pack.js
+ ${project.build.outputDirectory}/org/richfaces/ui.pack.js
</output>
<!-- files to include, path relative to output's directory or absolute path-->
- <includes><!--
- <include>
- ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js
- </include>
- --><include>**/*-min.js</include>
+ <includes>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/drag-indicator-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/simple-draggable-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/simple-dropzone-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tree-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tree-selection-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tree-item-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/tree-item-dnd-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/modalPanel-min.js
+ </include>
+ <include>
+ ${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/modalPanelBorders-min.js
+ </include>
+ <include>**/*-min.js</include>
</includes>
<!-- files to exclude, path relative to output's directory -->
<excludes>
@@ -245,31 +286,17 @@
<exclude>**/scriptaculo*/**</exclude>
</excludes>
</aggregation>
- </aggregations><!--
- <warSourceDirectory>${project.build.directory}/modules</warSourceDirectory>
- <webappDirectory>${project.build.directory}/compressed</webappDirectory>
- --><includes>
+ </aggregations>
+ <!--
+ <warSourceDirectory>${project.build.directory}/modules</warSourceDirectory>
+ <webappDirectory>${project.build.directory}/compressed</webappDirectory>
+ -->
+ <includes>
<include>**/*.js</include>
</includes>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>framevork-javascript</id>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <copy todir="target/classes/org/richfaces" file="target/compressed/ui.pack.js"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin> </plugins>
+ </plugins>
</build>
<dependencies />
</project>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r4832 - in branches/3.1.x: ui/listShuttle/src/main/config/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-12-13 16:00:40 -0500 (Thu, 13 Dec 2007)
New Revision: 4832
Modified:
branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1495
Modified: branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-13 20:26:27 UTC (rev 4831)
+++ branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-13 21:00:40 UTC (rev 4832)
@@ -24,6 +24,9 @@
.zebraRow2 * {
color: navy;
+ }
+ .downControlClass {
+ font-weight: bold;
}
</style>
</head>
@@ -102,7 +105,9 @@
<ls:listShuttle onlistchanged="alert(event.type)" id="listShuttle2" var="item" sourceValue="#{listShuttleDemoBean.zebraItems}"
- columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1, zebraRow2">
+ columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1, zebraRow2"
+ moveControlsVerticalAlign="top" orderControlsVerticalAlign="bottom"
+ downControlClass="downControlClass">
<rich:column width="10px">
<f:facet name="header">
<h:outputText value="Name" />
Modified: branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-12-13 20:26:27 UTC (rev 4831)
+++ branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-12-13 21:00:40 UTC (rev 4832)
@@ -23,7 +23,7 @@
</tag>
&ui_component_attributes;
- &html_style_attributes;
+ &html_style_attributes;
&ui_data_attributes;
<property>
<name>columnClasses</name>
@@ -139,8 +139,8 @@
<property>
<name>onorderchanged</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called on an order operation</description>
- </property>
+ <description>HTML: script expression; called after ordering action</description>
+ </property>
<property>
<name>showButtonLabels</name>
@@ -426,7 +426,55 @@
<classname>java.lang.String</classname>
<description>HTML: a script expression; a pointer is moved onto</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
-
+ </property>
+
+ <property>
+ <name>moveControlsVerticalAlign</name>
+ <classname>java.lang.String</classname>
+ <description>Customizes vertically a position of move/copy controls relatively to lists</description>
+ <defaultvalue><![CDATA["middle"]]></defaultvalue>
+ </property>
+ <property>
+ <name>orderControlsVerticalAlign</name>
+ <classname>java.lang.String</classname>
+ <description>Customizes vertically a position of order controls relatively to lists</description>
+ <defaultvalue><![CDATA["middle"]]></defaultvalue>
+ </property>
+ <property>
+ <name>listClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for a list</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for a disabled control</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for top control</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>bottomControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for bottom control</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>upControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for up control</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>downControlClass</name>
+ <classname>java.lang.String</classname>
+ <description>CSS class for down control</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
</component>
</components>
Modified: branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-12-13 20:26:27 UTC (rev 4831)
+++ branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2007-12-13 21:00:40 UTC (rev 4832)
@@ -643,6 +643,15 @@
public abstract boolean isFastMoveControlsVisible();
public abstract void setFastMoveControlsVisible(boolean visible);
+
+ public abstract String getOrderControlsVerticalAlign();
+ public abstract void setOrderControlsVerticalAlign(String align);
+
+ public abstract String getMoveControlsVerticalAlign();
+ public abstract void setMoveControlsVerticalAlign(String align);
+
+ public abstract String getListClass();
+ public abstract void setListClass(String listClass);
private void createValueHolder() {
if (valueHolder == null) {
Modified: branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss 2007-12-13 20:26:27 UTC (rev 4831)
+++ branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/css/listShuttle.xcss 2007-12-13 21:00:40 UTC (rev 4832)
@@ -6,7 +6,7 @@
<f:verbatim><![CDATA[
.rich-shuttle-controls {
- padding : 15px 8px;
+ padding : 0px 8px 5px 8px;
}
.rich-shuttle-list-content {
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 2007-12-13 20:26:27 UTC (rev 4831)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-13 21:00:40 UTC (rev 4832)
@@ -60,7 +60,7 @@
</tr>
<tr>
<td>
- <div class="rich-shuttle-source-items">
+ <div class="rich-shuttle-source-items #{component.listClass}">
<input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;"/>
<table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
@@ -111,7 +111,7 @@
</table>
</div>
</td>
- <td>
+ <td style="vertical-align: #{component.moveControlsVerticalAlign};" >
<div class="rich-shuttle-controls">
<jsp:scriptlet><![CDATA[
encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
@@ -120,7 +120,7 @@
</td>
<td>
- <div class="rich-shuttle-target-items" >
+ <div class="rich-shuttle-target-items #{component.listClass}" >
<input type="hidden" value=":" style="display: none;" name="#{clientId}" />
<input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;"/>
@@ -172,7 +172,7 @@
</table>
</div>
</td>
- <td>
+ <td style="vertical-align: #{component.orderControlsVerticalAlign};" >
<div class="rich-shuttle-controls">
<jsp:scriptlet><![CDATA[
encodeTLControlsFacets(context, component, targetSelectionState);
16 years, 10 months
JBoss Rich Faces SVN: r4831 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-13 15:26:27 -0500 (Thu, 13 Dec 2007)
New Revision: 4831
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
http://jira.jboss.com/jira/browse/RF-1633
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-12-13 20:22:49 UTC (rev 4830)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-12-13 20:26:27 UTC (rev 4831)
@@ -247,6 +247,7 @@
<u:selector name=".rich-ordering-list-output">
<u:style name="background-color" skin="tableBackgroundColor" />
<u:style name="border-color" skin="tableBorderColor" />
+ <u:style name="border-width" skin="tableBorderWidth" />
</u:selector>
<u:selector name=".rich-ordering-list-cell, .rich-ordering-list-cell *">
16 years, 10 months
JBoss Rich Faces SVN: r4830 - in branches/3.1.x/samples/listShuttleDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-13 15:22:49 -0500 (Thu, 13 Dec 2007)
New Revision: 4830
Modified:
branches/3.1.x/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
Log:
switchByClick switch added to listShuttleDemo
Modified: branches/3.1.x/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
===================================================================
--- branches/3.1.x/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2007-12-13 20:11:29 UTC (rev 4829)
+++ branches/3.1.x/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2007-12-13 20:22:49 UTC (rev 4830)
@@ -33,6 +33,16 @@
private boolean orderControlsVisible = true;
private boolean fastOrderControlsVisible = true;
+ private boolean switchByClick = false;
+
+ public boolean isSwitchByClick() {
+ return switchByClick;
+ }
+
+ public void setSwitchByClick(boolean switchByClick) {
+ this.switchByClick = switchByClick;
+ }
+
public ListShuttleDemoBean() {
super();
Modified: branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-13 20:11:29 UTC (rev 4829)
+++ branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-13 20:22:49 UTC (rev 4830)
@@ -49,6 +49,7 @@
sourceSelection="#{listShuttleDemoBean.sourceSelection}"
targetSelection="#{listShuttleDemoBean.targetSelection}"
+ switchByClick="#{listShuttleDemoBean.switchByClick}"
>
<h:column><h:outputText value="#{item.name}" /></h:column>
<h:column><h:outputText value="#{item.price}" /></h:column>
@@ -86,6 +87,10 @@
<h:outputText value="Fast move controls visible:" />
<h:selectBooleanCheckbox value="#{listShuttleDemoBean.fastMoveControlsVisible}" />
+
+ <h:outputText value="Switch by click:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.switchByClick}" />
+
</h:panelGrid>
<a4j:status startText="...start..." />
16 years, 10 months
JBoss Rich Faces SVN: r4829 - branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-12-13 15:11:29 -0500 (Thu, 13 Dec 2007)
New Revision: 4829
Modified:
branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
bug:RF-1612
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 2007-12-13 19:15:11 UTC (rev 4828)
+++ branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2007-12-13 20:11:29 UTC (rev 4829)
@@ -65,6 +65,11 @@
targetList.onclickHandler = function(e) { this.onclickHandler(e, targetList); }.bindAsEventListener(this);
}
+ sourceList._onkeydownHandler = sourceList.onkeydownHandler;
+ sourceList.onkeydownHandler = function(e) { this.onkeydownHandler(e, sourceList); }.bindAsEventListener(this);
+ targetList._onkeydownHandler = targetList.onkeydownHandler;
+ targetList.onkeydownHandler = function(e) { this.onkeydownHandler(e, targetList); }.bindAsEventListener(this);
+
this.controlList = new Array();
this.initControlList(clientId, controlIds);
@@ -107,6 +112,12 @@
Event.stop(event);
},
+ onkeydownHandler : function(event, component) {
+ component._onkeydownHandler(event);
+ this.controlListManager();
+ Event.stop(event);
+ },
+
controlsProcessing : function(disabledControls , action) {
for (var i = 0; i < this.controlList.length; i++) {
control = this.controlList[i];
16 years, 10 months
JBoss Rich Faces SVN: r4828 - in branches/3.1.x/ui/scrollableDataTable/src/main: javascript/ClientUI/common/box and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-13 14:15:11 -0500 (Thu, 13 Dec 2007)
New Revision: 4828
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/InlineBox.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/ScrollableBox.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Substrate.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/StringBuilder.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ArrayDataModel.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataCash.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataModel.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DefaultColumnModel.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUILib.js
branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1617
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -27,13 +27,7 @@
* })
*/
ClientUI.common.box.Box = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.box.Box'
- }
-});
-Object.extend(ClientUI.common.box.Box.prototype, {
-
initialize: function(element, parentElement, dontUpdateStyles) {
this.element = $(element);
if(!this.element) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/InlineBox.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/InlineBox.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/InlineBox.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -10,16 +10,9 @@
/**
* Base class that wrap work with inline blocks like span
*/
-ClientUI.common.box.InlineBox = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.box.InlineBox',
- parent: ClientUI.common.box.Box
- }
-});
+ClientUI.common.box.InlineBox = Class.create(ClientUI.common.box.Box, {
-Object.extend(ClientUI.common.box.InlineBox.prototype, {
-
- initialize: function(element, parentElement, dontUpdateStyles) {
+ initialize: function($super, element, parentElement, dontUpdateStyles) {
if(!element) {
element = $(document.createElement("span"));
if($(parentElement)) {
@@ -33,7 +26,7 @@
element.id = "ClientUI_InlineBox" + ClientUI_common_box_InlineBox_idGenerator++;
}
- ClientUI.common.box.InlineBox.parentClass.constructor().call(this, element, parentElement, dontUpdateStyles);
+ $super(element, parentElement, dontUpdateStyles);
// additional styles
if(!dontUpdateStyles) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/ScrollableBox.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/ScrollableBox.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/ScrollableBox.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,29 +11,11 @@
/**
* This class target to manage scrollable box object.
*/
-ClientUI.common.box.ScrollableBox = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.box.ScrollableBox',
- parent: ClientUI.common.box.Box
- }
-
-});
+ClientUI.common.box.ScrollableBox = Class.create(ClientUI.common.box.Box, {
-Object.extend(ClientUI.common.box.ScrollableBox.prototype, {
-
- // Custom events
- /**
- * Occured when content scrolled in horizontal
- */
- eventHScroll: {},
- /**
- * Occured when content scrolled in vertical
- */
- eventVScroll: {},
-
//Constructor
- initialize: function(element, parentElement) {
- ClientUI.common.box.ScrollableBox.parentClass.constructor().call(this, element, parentElement);
+ initialize: function($super, element, parentElement) {
+ $super(element, parentElement);
this.element.setStyle({overflow: 'auto'});
// Create custom event producers
@@ -61,9 +43,9 @@
this.eventVScroll.fire(this.getViewportScrollY());
}
},
- updateLayout: function() {
+ updateLayout: function($super) {
// NOTE: not implemented in this class
- ClientUI.common.box.ScrollableBox.parentClass.method("updateLayout").call(this);
+ $super();
},
getViewportScrollX: function() {
var scrollX = 0;
@@ -135,4 +117,16 @@
this.scrollerWidth = (wNoScroll - wScroll);
return this.scrollerWidth || 0;
}
+});
+
+Object.extend(ClientUI.common.box.ScrollableBox.prototype, {
+ // Custom events
+ /**
+ * Occured when content scrolled in horizontal
+ */
+ eventHScroll: {},
+ /**
+ * Occured when content scrolled in vertical
+ */
+ eventVScroll: {}
});
\ No newline at end of file
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/SplashBox.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,17 +11,10 @@
/**
* Base class that wrap work with inline blocks like span
*/
-ClientUI.common.box.SplashBox = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.box.SplashBox',
- parent: ClientUI.common.box.Box
- }
-});
+ClientUI.common.box.SplashBox = Class.create(ClientUI.common.box.Box, {
-Object.extend(ClientUI.common.box.SplashBox.prototype, {
-
- initialize: function(text, parentElement, zIndex, supressSplash) {
- ClientUI.common.box.SplashBox.parentClass.constructor().call(this, null, parentElement);
+ initialize: function($super, text, parentElement, zIndex, supressSplash) {
+ $super(null, parentElement);
this.moveTo(-1000, -1000);
this.zIndex = zIndex || 500;
this.supressSplash = supressSplash || false;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Substrate.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Substrate.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Substrate.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -10,17 +10,9 @@
/**
* Base class that wrap work with inline blocks like span
*/
-ClientUI.common.box.Substrate = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.box.Substrate',
- parent: ClientUI.common.box.Box
- }
-
-});
+ClientUI.common.box.Substrate = Class.create(ClientUI.common.box.Box, {
-Object.extend(ClientUI.common.box.Substrate.prototype, {
-
- initialize: function(element, parentElement, dontUpdateStyles) {
+ initialize: function($super, element, parentElement, dontUpdateStyles) {
if(!element) {
var fakeElement = $(document.createElement("div"));
fakeElement.innerHTML = '<iframe id="'+'ClientUI_Substrate' + (ClientUI_common_box_Substrate_idGenerator++) +'" src="" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:block"></iframe>';
@@ -28,7 +20,7 @@
fakeElement.removeChild(element);
}
- ClientUI.common.box.Substrate.parentClass.constructor().call(this, element, parentElement, dontUpdateStyles);
+ $super(element, parentElement, dontUpdateStyles);
// additional styles
if(!dontUpdateStyles) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/CustomEvent.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -9,16 +9,6 @@
ClientUILib.declarePackage("ClientUI.common.utils.CustomEvent");
ClientUI.common.utils.CustomEvent = Class.create({
- CLASSDEF: {
- name: 'ClientUI.common.utils.CustomEvent'
- }
-
-});
-
-Object.extend(ClientUI.common.utils.CustomEvent.prototype, {
- _eventName: 'undefined',
- _id: -1,
-
// Constructor
initialize: function(event) {
this._eventName = event;
@@ -53,6 +43,11 @@
}
});
+Object.extend(ClientUI.common.utils.CustomEvent, {
+ _eventName: 'undefined',
+ _id: -1
+});
+
Event._observe = Event.observe;
Event.observe = function( element, name, observer, useCapture ) {
if(element && element.getName && element.getId) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/StringBuilder.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/StringBuilder.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/StringBuilder.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -16,17 +16,7 @@
* var str = sb.toString();
*/
StringBuilder = Class.create({
- CLASSDEF: {
- name: 'StringBuilder'
- },
- length: 0,
-
- // private
- _current: 0,
- _parts: [],
- _string: null, // used to cache the string
-
initialize: function(str) {
this._string = null;
this._current = 0;
@@ -63,4 +53,11 @@
}
});
-
+Object.extend(StringBuilder.prototype, {
+ length: 0,
+
+ // private
+ _current: 0,
+ _parts: [],
+ _string: null // used to cache the string
+});
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ArrayDataModel.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ArrayDataModel.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ArrayDataModel.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,17 +11,9 @@
* by Denis Morozov <dmorozov(a)exadel.com> distributed under the BSD license.
*
*/
-ClientUI.controls.grid.ArrayDataModel = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.ArrayDataModel',
- parent: ClientUI.controls.grid.DataModel
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.ArrayDataModel.prototype, {
- initialize: function(data) {
- this.parentClass().constructor().call(this);
+ClientUI.controls.grid.ArrayDataModel = Class.create(ClientUI.controls.grid.DataModel, {
+ initialize: function($super, data) {
+ $super();
this.data = $A(data || []);
},
getRow: function(index) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataCash.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataCash.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataCash.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,14 +11,7 @@
*
*/
ClientUI.controls.grid.DataCash = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.DataCash'
- },
- PKG_SIZE: 20
-});
-
-Object.extend(ClientUI.controls.grid.DataCash.prototype, {
initialize: function(cashSize) {
var count = parseInt(cashSize/this.PKG_SIZE + 1);
this.cash = new Array(count);
@@ -34,4 +27,8 @@
var i = parseInt(index/this.PKG_SIZE), j = index%this.PKG_SIZE;
this.cash[i][j] = row;
}
+});
+
+Object.extend(ClientUI.controls.grid.DataCash.prototype, {
+ PKG_SIZE: 20
});
\ No newline at end of file
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataModel.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataModel.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DataModel.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -13,13 +13,6 @@
*
*/
ClientUI.controls.grid.DataModel = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.DataModel'
- }
-});
-
-Object.extend(ClientUI.controls.grid.DataModel.prototype, {
- eventDataReady: {},
initialize: function() {
// constructor
@@ -47,4 +40,7 @@
}
});
+Object.extend(ClientUI.controls.grid.DataModel.prototype, {
+ eventDataReady: {}
+});
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DefaultColumnModel.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DefaultColumnModel.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/DefaultColumnModel.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -7,13 +7,6 @@
ClientUI.controls.grid.DefaultColumnModel = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.DefaultColumnModel'
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.DefaultColumnModel.prototype, {
initialize: function(config) {
this.config = config;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -1,14 +1,7 @@
ClientUILib.declarePackage("ClientUI.controls.grid.FakeArrayDataModel ");
-ClientUI.controls.grid.FakeArrayDataModel = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.FakeArrayDataModel',
- parent: ClientUI.controls.grid.DataModel
- }
- });
-
- Object.extend(ClientUI.controls.grid.FakeArrayDataModel.prototype, {
- initialize: function(rows_count, columns_count, grid_id) {
- ClientUI.controls.grid.FakeArrayDataModel.parentClass.constructor().call(this);
+ClientUI.controls.grid.FakeArrayDataModel = Class.create(ClientUI.controls.grid.DataModel, {
+ initialize: function($super, rows_count, columns_count, grid_id) {
+ $super();
this.data = [];
this.count = rows_count;
this.columns = columns_count;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -29,27 +29,10 @@
* var grid = new ClientUI.controls.grid.Grid('id_of_trigger_element', 'a nice description')
* </script>
*/
-ClientUI.controls.grid.Grid = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.Grid',
- parent: ClientUI.common.box.Box
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.Grid.prototype, {
- // Custom events
- /**
- * Occured when content header clicked
- */
- eventOnSort: {},
- /**
- * Occured when column width adjusted
- */
- eventOnResizeColumn: {},
+ClientUI.controls.grid.Grid = Class.create(ClientUI.common.box.Box, {
- initialize: function(element, dataModel, templates) {
- ClientUI.controls.grid.Grid.parentClass.constructor().call(this, element);
+ initialize: function($super, element, dataModel, templates) {
+ $super(element);
if(!this.element || !this.element.id)
this.element.id = "ClientUI_Grid" + ClientUI_controls_grid_Grid_idGenerator++;
@@ -97,11 +80,11 @@
setTimeout(function() {grid.updateLayout()}, 50);
}
},
- updateLayout: function() {
+ updateLayout: function($super) {
if(!this.controlCreated || this.getHeight()==0) {
return;
}
- ClientUI.controls.grid.Grid.parentClass.method("updateLayout").call(this);
+ $super();
var header = this.getHeader();
if(header.getHeight() == 0) {
@@ -223,6 +206,18 @@
}
});
+Object.extend(ClientUI.controls.grid.Grid.prototype, {
+ // Custom events
+ /**
+ * Occured when content header clicked
+ */
+ eventOnSort: {},
+ /**
+ * Occured when column width adjusted
+ */
+ eventOnResizeColumn: {}
+});
+
if(!ClientUI_controls_grid_Grid_idGenerator) {
var ClientUI_controls_grid_Grid_idGenerator = 0;
};
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -12,39 +12,16 @@
* GridHeader.js - Grid control header pane
* TODO: add comments
*/
-ClientUI.controls.grid.GridBody = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.GridBody',
- parent: ClientUI.common.box.Box
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.GridBody.prototype, {
+ClientUI.controls.grid.GridBody = Class.create(ClientUI.common.box.Box, {
/**
- * Count of rows can be viewed in the same time in grid
- */
- dataVisible: 50,
-
- /**
- * Count of rows loaded additianally to dataVisible rows
- */
- dataDelta: 5,
-
- /**
- * Current data position
- */
- currentPos: 0,
-
- /**
* Constructor
* @param {Object} template for Grid body row
* @param {Object} grid parent grid object
*/
- initialize: function(template, grid) {
+ initialize: function($super, template, grid) {
this.grid = grid;
this.gridId = grid.getElement().id;
- ClientUI.controls.grid.GridBody.parentClass.constructor().call(this, template);
+ $super(template);
// declare event listeners
this._eventOnHScroll = this._onContentHScroll.bind(this);
@@ -217,11 +194,11 @@
// this.defaultRowHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
//}
},
- updateLayout: function() {
+ updateLayout: function($super) {
if(!this.controlCreated || !this.grid.controlCreated) {
return;
}
- ClientUI.controls.grid.GridBody.parentClass.method("updateLayout").call(this);
+ $super();
if(!this.scrollBox || !this.contentBox || !this.sizeBox) {
return;
}
@@ -793,3 +770,21 @@
}
}
});
+
+Object.extend(ClientUI.controls.grid.GridBody.prototype, {
+ /**
+ * Count of rows can be viewed in the same time in grid
+ */
+ dataVisible: 50,
+
+ /**
+ * Count of rows loaded additianally to dataVisible rows
+ */
+ dataDelta: 5,
+
+ /**
+ * Current data position
+ */
+ currentPos: 0
+
+});
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,18 +11,10 @@
/* GridHeader.js - Grid control header pane
* TODO: add comments
*/
-ClientUI.controls.grid.GridFooter = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.GridFooter',
- parent: ClientUI.common.box.Box
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.GridFooter.prototype, {
- initialize: function(template, grid) {
+ClientUI.controls.grid.GridFooter = Class.create(ClientUI.common.box.Box, {
+ initialize: function($super, template, grid) {
this.grid = grid;
- ClientUI.controls.grid.GridFooter.parentClass.constructor().call(this, template);
+ $super(template);
this.createControl(template);
},
createControl: function(template) {
@@ -133,11 +125,11 @@
this.setHeight(this.defaultHeight);
this.setWidth(this.defaultWidth);
},
- updateLayout: function() {
+ updateLayout: function($super) {
if(!this.controlCreated || !this.grid.controlCreated) {
return;
}
- ClientUI.controls.grid.GridFooter.parentClass.method("updateLayout").call(this);
+ $super();
var height = this.getHeight();
var totalWidth = this.grid.getColumnsTotalWidth();
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -12,24 +12,12 @@
* GridHeader.js - Grid control header pane
* TODO: add comments
*/
-ClientUI.controls.grid.GridHeader = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.GridHeader',
- parent: ClientUI.common.box.Box,
- sepStyleClass: "dr-sdt-hsep"
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.GridHeader.prototype, {
- // internal variables
- _columns: [],
-
+ClientUI.controls.grid.GridHeader = Class.create(ClientUI.common.box.Box, {
// constructor
- initialize: function(template, grid) {
+ initialize: function($super, template, grid) {
this.grid = grid;
this.gridId = this.grid.getElement().id;
- ClientUI.controls.grid.GridHeader.parentClass.constructor().call(this, template);
+ $super(template);
// register event handlers
this.eventSepDblClick = this.OnSepDblClick.bindAsEventListener(this);
@@ -303,11 +291,11 @@
this.agjustSeparators();
this.updateHeaders();
},
- updateLayout: function() {
+ updateLayout: function($super) {
if(!this.controlCreated || !this.grid.controlCreated) {
return;
}
- ClientUI.controls.grid.GridHeader.parentClass.method("updateLayout").call(this);
+ $super();
var height = this.getHeight();
var totalWidth = this.grid.getColumnsTotalWidth();
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
@@ -497,3 +485,9 @@
}
}
});
+
+Object.extend(ClientUI.controls.grid.GridHeader.prototype, {
+ sepStyleClass: "dr-sdt-hsep",
+ // internal variables
+ _columns: []
+});
\ No newline at end of file
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -1,24 +1,7 @@
ClientUILib.declarePackage("ClientUI.controls.grid.ScrollableGrid");
-ClientUI.controls.grid.ScrollableGrid = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.ScrollableGrid',
- parent: ClientUI.controls.grid.Grid
- }
-});
-
-Object.extend(ClientUI.controls.grid.ScrollableGrid.prototype, {
- /**
- * Occured when scroll position adjusted
- */
- eventOnPostScroll: {},
-
- /**
- * Occured when sorting adjusted
- */
- eventOnPostSort: {},
-
- initialize: function(options) {
+ClientUI.controls.grid.ScrollableGrid = Class.create(ClientUI.controls.grid.Grid, {
+ initialize: function($super, options) {
this.startInitTime = (new Date()).getTime();
this.options = options;
@@ -35,13 +18,14 @@
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
];
var grid = this;
+ var s = $super;
Event.onReady(function(){
- grid.init();
+ grid.init(s);
});
Utils.execOnLoad(
function(){
- grid.init();
+ grid.init(s);
},
Utils.Condition.ElementPresent(grid.client_id), 100);
@@ -51,13 +35,13 @@
// initialize parent Grid
- init: function(){
+ init: function(superCtor){
// mark that grid control initialized
if(!this.isInitialized) {
this.isInitialized = true;
this.startCreateTime = (new Date()).getTime();
- ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
+ superCtor(this.client_id, this.dataModel, this.templates);
this.endCreateTime = (new Date()).getTime();
@@ -197,10 +181,15 @@
}
});
-
-
-
-
-
-
-
+Object.extend(ClientUI.controls.grid.ScrollableGrid.prototype, {
+ /**
+ * Occured when scroll position adjusted
+ */
+ eventOnPostScroll: {},
+
+ /**
+ * Occured when sorting adjusted
+ */
+ eventOnPostSort: {}
+
+});
\ No newline at end of file
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -1,11 +1,4 @@
ClientUI.controls.grid.Selection = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.Selection'
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.Selection.prototype, {
initialize: function() {
this.ranges = [];
},
@@ -174,13 +167,6 @@
});
ClientUI.controls.grid.Range = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.Range'
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.Range.prototype, {
initialize: function(startIndex, endIndex) {
this.indexes = [startIndex, endIndex];
},
@@ -211,13 +197,6 @@
});
ClientUI.controls.grid.SelectionManager = Class.create({
- CLASSDEF: {
- name: 'ClientUI.controls.grid.SelectionManager'
- }
-
-});
-
-Object.extend(ClientUI.controls.grid.SelectionManager.prototype, {
initialize: function(grid) {
this.grid = grid;
this.selectionFlag;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -21,20 +21,12 @@
*
* TODO: description of control
*/
-ClientUI.layouts.GridLayoutManager = Class.create({
- CLASSDEF: {
- name: 'ClientUI.layouts.GridLayoutManager',
- parent: ClientUI.layouts.VLayoutManager
- }
-
-});
-
-Object.extend(ClientUI.layouts.GridLayoutManager.prototype, {
- initialize: function(element, parentElement, config) {
- ClientUI.layouts.GridLayoutManager.parentClass.constructor().call(this, element, parentElement);
+ClientUI.layouts.GridLayoutManager = Class.create(ClientUI.layouts.VLayoutManager, {
+ initialize: function($super, element, parentElement, config) {
+ $super(element, parentElement);
},
updateLayout: function() {
- ClientUI.layouts.LayoutManager.method("updateLayout").call(this);
+ ClientUI.layouts.LayoutManager.prototype.updateLayout.call(this);
var parentBox = this.getContainer();
if(parentBox==null) parentBox = this;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -11,27 +11,9 @@
*
* TODO: description of control
*/
-ClientUI.layouts.LayoutManager = Class.create({
- CLASSDEF: {
- name: 'ClientUI.layouts.LayoutManager',
- parent: ClientUI.common.box.Box
- },
-
- // Custom events
- /**
- * Occured before resizing
- */
- eventOnBeforeResize: {},
- /**
- * Occured after resizing
- */
- eventOnAfterResize: {}
-
-});
-
-Object.extend(ClientUI.layouts.LayoutManager.prototype, {
- initialize: function(element, parentElement) {
- ClientUI.layouts.LayoutManager.parentClass.constructor().call(this, element, parentElement);
+ClientUI.layouts.LayoutManager = Class.create(ClientUI.common.box.Box, {
+ initialize: function($super, element, parentElement) {
+ $super(element, parentElement);
// store container element to look after
this.container = parentElement;
@@ -59,7 +41,7 @@
this.updateLayout();
this.eventOnAfterResize.fire();
},
- updateLayout: function() {
+ updateLayout: function($super) {
if(this.container) {
var w = this.container.getWidth();
var h = this.container.getHeight();
@@ -70,9 +52,23 @@
this.setWidth(w);
this.setHeight(h);
}
- ClientUI.layouts.LayoutManager.parentClass.method("updateLayout").call(this);
+ $super();
},
getContainer: function() {
return this.container;
}
});
+
+Object.extend(ClientUI.layouts.LayoutManager.prototype, {
+
+ // Custom events
+ /**
+ * Occured before resizing
+ */
+ eventOnBeforeResize: {},
+ /**
+ * Occured after resizing
+ */
+ eventOnAfterResize: {}
+
+});
\ No newline at end of file
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -20,28 +20,20 @@
*
* TODO: description of control
*/
-ClientUI.layouts.VLayoutManager = Class.create({
- CLASSDEF: {
- name: 'ClientUI.layouts.VLayoutManager',
- parent: ClientUI.layouts.LayoutManager
- }
-
-});
-
-Object.extend(ClientUI.layouts.VLayoutManager.prototype, {
- initialize: function(element, parentElement, config) {
- ClientUI.layouts.VLayoutManager.parentClass.constructor().call(this, element, parentElement);
+ClientUI.layouts.VLayoutManager = Class.create(ClientUI.layouts.LayoutManager, {
+ initialize: function($super, element, parentElement, config) {
+ $super(element, parentElement);
if(!element || !element.id) {
this.element.id = "ClientUI_VLayoutManager" + ClientUI_layouts_VLayoutManager_idGenerator++;
}
this.registerEvents();
},
- registerEvents: function() {
- ClientUI.layouts.VLayoutManager.parentClass.method("registerEvents").call(this);
+ registerEvents: function($super) {
+ $super();
},
- destroy: function() {
- ClientUI.layouts.VLayoutManager.parentClass.method("destroy").call(this);
+ destroy: function($super) {
+ $super();
},
/*containerResize: function(event) {
ClientUI.layouts.VLayoutManager.parentClass.method("containerResize").call(this, event);
@@ -57,8 +49,8 @@
getPane: function(align) {
return this.panels[align];
},
- updateLayout: function() {
- ClientUI.layouts.VLayoutManager.parentClass.method("updateLayout").call(this);
+ updateLayout: function($super) {
+ $super();
var parentBox = this.getContainer();
if(!parentBox) parentBox = this;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUILib.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUILib.js 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUILib.js 2007-12-13 19:15:11 UTC (rev 4828)
@@ -21,9 +21,9 @@
throw("ClientUILib requires the Prototype JavaScript framework >= 1.5.0");
// Check for Extend JavaScript library
- if((typeof Extend=='undefined') ||
- Extend.VERSION < 1.1)
- throw("ClientUILib requires the Extend JavaScript library >= 1.1");
+// if((typeof Extend=='undefined') ||
+// Extend.VERSION < 1.1)
+// throw("ClientUILib requires the Extend JavaScript library >= 1.1");
$A(document.getElementsByTagName("script")).findAll( function(s) {
return (s.src && s.src.match(/ClientUILib\.js(\?.*)?$/))
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-12-13 18:37:32 UTC (rev 4827)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-12-13 19:15:11 UTC (rev 4828)
@@ -19,7 +19,6 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/extend/extend.js,
/org/richfaces/renderkit/html/scripts/scrollable-data-table.js
</h:scripts>
16 years, 10 months
JBoss Rich Faces SVN: r4827 - in branches/3.1.x/ui/listShuttle/src: test/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-13 13:37:32 -0500 (Thu, 13 Dec 2007)
New Revision: 4827
Modified:
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
Log:
utils.js link removed
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 2007-12-13 18:37:24 UTC (rev 4826)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-13 18:37:32 UTC (rev 4827)
@@ -20,7 +20,6 @@
new org.ajax4jsf.javascript.PrototypeScript(),
scripts/ShuttleUtils.js
scripts/SelectItem.js,
- /org/richfaces/renderkit/html/scripts/utils.js,
scripts/LayoutManager.js
scripts/Control.js,
scripts/ListBase.js,
Modified: branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
===================================================================
--- branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2007-12-13 18:37:24 UTC (rev 4826)
+++ branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2007-12-13 18:37:32 UTC (rev 4827)
@@ -64,7 +64,6 @@
javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
javaScripts.add("scripts/ShuttleUtils.js");
javaScripts.add("scripts/SelectItem.js");
- javaScripts.add("org/richfaces/renderkit/html/scripts/utils.js");
javaScripts.add("scripts/LayoutManager.js");
javaScripts.add("scripts/Control.js");
javaScripts.add("scripts/OrderingList.js");
16 years, 10 months
JBoss Rich Faces SVN: r4826 - in branches/3.1.x/ui/orderingList/src: test/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-13 13:37:24 -0500 (Thu, 13 Dec 2007)
New Revision: 4826
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
branches/3.1.x/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java
Log:
utils.js link removed
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 2007-12-13 17:41:14 UTC (rev 4825)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-13 18:37:24 UTC (rev 4826)
@@ -19,7 +19,6 @@
new org.ajax4jsf.javascript.PrototypeScript(),
scripts/ShuttleUtils.js,
scripts/SelectItem.js,
- /org/richfaces/renderkit/html/scripts/utils.js,
scripts/LayoutManager.js
scripts/Control.js,
scripts/ListBase.js,
Modified: branches/3.1.x/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java 2007-12-13 17:41:14 UTC (rev 4825)
+++ branches/3.1.x/ui/orderingList/src/test/java/org/richfaces/renderkit/OrderingListRenderingTest.java 2007-12-13 18:37:24 UTC (rev 4826)
@@ -58,7 +58,6 @@
javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
javaScripts.add("scripts/ShuttleUtils.js");
javaScripts.add("scripts/SelectItem.js");
- javaScripts.add("org/richfaces/renderkit/html/scripts/utils.js");
javaScripts.add("scripts/LayoutManager.js");
javaScripts.add("scripts/Control.js");
javaScripts.add("scripts/OrderingList.js");
16 years, 10 months