JBoss Rich Faces SVN: r10559 - trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-09-25 10:32:54 -0400 (Thu, 25 Sep 2008)
New Revision: 10559
Modified:
trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
Log:
fixed bug: IE javascript error when show function called without context parameter
Modified: trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js
===================================================================
--- trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2008-09-25 13:54:14 UTC (rev 10558)
+++ trunk/ui/contextMenu/src/main/resources/org/richfaces/renderkit/html/scripts/context-menu.js 2008-09-25 14:32:54 UTC (rev 10559)
@@ -81,7 +81,7 @@
div.style.zoom="1";
this.element.appendChild(div);
- var html = this.evaluator.invoke('getContent', context||window).join('');
+ var html = this.evaluator.invoke('getContent', context||{}).join('');
new Insertion.Top(div, html);
this.menuContent = div;
16 years, 3 months
JBoss Rich Faces SVN: r10558 - trunk/framework/impl/src/main/java/org/ajax4jsf/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-09-25 09:54:14 -0400 (Thu, 25 Sep 2008)
New Revision: 10558
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
Log:
https://jira.jboss.org/jira/browse/RF-2914
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-09-25 12:06:18 UTC (rev 10557)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-09-25 13:54:14 UTC (rev 10558)
@@ -24,11 +24,13 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
import java.util.Collections;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
+import java.util.regex.Pattern;
import javax.faces.application.ViewHandler;
import javax.servlet.Filter;
@@ -38,7 +40,6 @@
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import javax.servlet.ServletResponseWrapper;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
@@ -201,6 +202,41 @@
}
}
+ private static final Pattern AMPERSAND = Pattern.compile("&+");
+
+ private Map<String, String> parseQueryString(String queryString) {
+ if (queryString != null) {
+ Map<String, String> parameters = new HashMap<String, String>();
+
+ String[] nvPairs = AMPERSAND.split(queryString);
+ for (String nvPair : nvPairs) {
+ if (nvPair.length() == 0) {
+ continue;
+ }
+
+ int eqIdx = nvPair.indexOf('=');
+ if (eqIdx >= 0) {
+ try {
+ String name = URLDecoder.decode(nvPair.substring(0, eqIdx), "UTF-8");
+ if (!parameters.containsKey(name)) {
+ String value = URLDecoder.decode(nvPair.substring(eqIdx + 1), "UTF-8");
+
+ parameters.put(name, value);
+ }
+ } catch (UnsupportedEncodingException e) {
+ //log warning and skip this parameter
+ log.warn(e.getLocalizedMessage(), e);
+ }
+ }
+ }
+
+ return parameters;
+ } else {
+
+ return Collections.EMPTY_MAP;
+ }
+ }
+
private boolean isMultipartRequest(HttpServletRequest request) {
if (!"post".equals(request.getMethod().toLowerCase())) {
return false;
@@ -225,19 +261,23 @@
return false;
}
- private boolean checkFileCount(HttpServletRequest request) {
- HttpSession session = request.getSession();
- Map<String, Integer> map = (Map<String, Integer>) session
- .getAttribute(UPLOADED_COUNTER);
- if (map != null) {
- String id = request.getParameter("id");
- if (id != null) {
- Integer i = map.get(id);
- if (i != null && i == 0) {
- return false;
+ private boolean checkFileCount(HttpServletRequest request, String idParameter) {
+ HttpSession session = request.getSession(false);
+
+ if (session != null) {
+ Map<String, Integer> map = (Map<String, Integer>) session.getAttribute(UPLOADED_COUNTER);
+
+ if (map != null) {
+ String id = idParameter;
+ if (id != null) {
+ Integer i = map.get(id);
+ if (i != null && i == 0) {
+ return false;
+ }
}
}
}
+
return true;
}
@@ -292,94 +332,97 @@
* @throws ServletException
*/
protected void processUploadsAndHandleRequest(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
- HttpServletRequest httpRequest = (HttpServletRequest) request;
- String uid = httpRequest.getParameter(UPLOAD_FILES_ID);
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+
+ Map<String, String> queryParamMap = parseQueryString(httpRequest.getQueryString());
+ String uid = queryParamMap.get(UPLOAD_FILES_ID);
- if (uid != null) {
-
- if (isMultipartRequest(httpRequest)) {
- MultipartRequest multipartRequest = new MultipartRequest(httpRequest, createTempFiles, maxRequestSize, uid);
- Map<String, MultipartRequest> sessionsMap = null;
- Map<String, Object> percentMap = null;
-
- try {
- if (isFileSizeRestricted(request, maxRequestSize)) {
-
- boolean sendError = Boolean.parseBoolean(request.getParameter(SEND_HTTP_ERROR));
- if (sendError) {
- response.sendError(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
- System.err.println("ERROR " + HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE + "request entity is larger than the server is willing or able to process.");
- return;
+ if (uid != null) {
+
+ if (isMultipartRequest(httpRequest)) {
+ MultipartRequest multipartRequest = new MultipartRequest(httpRequest, createTempFiles, maxRequestSize, uid);
+ Map<String, MultipartRequest> sessionsMap = null;
+ Map<String, Object> percentMap = null;
+
+ try {
+ if (isFileSizeRestricted(request, maxRequestSize)) {
+
+ boolean sendError = Boolean.parseBoolean(queryParamMap.get(SEND_HTTP_ERROR));
+ if (sendError) {
+ response.sendError(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
+ System.err.println("ERROR " + HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE + "request entity is larger than the server is willing or able to process.");
+ return;
+ } else {
+ printResponse(response, "<html id=\"_richfaces_file_upload_size_restricted\"></html>");
+ }
+
+ } else if (!checkFileCount(httpRequest, queryParamMap.get("id"))) {
+ printResponse(response, "<html id=\"_richfaces_file_upload_forbidden\"></html>");
+ } else {
+
+ HttpSession session = httpRequest.getSession();
+ synchronized (session) {
+ sessionsMap = (Map<String, MultipartRequest>) session.getAttribute(REQUESTS_SESSIONS_BEAN_NAME);
+ percentMap = (Map<String, Object>) session.getAttribute(PERCENT_BEAN_NAME);
+ if (sessionsMap == null) {
+ sessionsMap = Collections.synchronizedMap(new HashMap<String, MultipartRequest>());
+ session.setAttribute(REQUESTS_SESSIONS_BEAN_NAME, sessionsMap);
+ }
+ if (percentMap == null) {
+ percentMap = new HashMap<String, Object>();
+ session.setAttribute(PERCENT_BEAN_NAME, percentMap);
+ }
+ }
+
+ /* associate percent value with file entry uid */
+ percentMap.put(uid, 0);
+ sessionsMap.put(uid, multipartRequest);
+
+ if (multipartRequest.parseRequest()) {
+ handleRequest(multipartRequest, multipartRequest.isFormUpload() ? response :
+ new HttpServletResponseWrapper(response){
+ @Override
+ public void setContentType(String type) {
+ super.setContentType(BaseXMLFilter.TEXT_HTML + ";charset=UTF-8");
+ }
+ }, chain);
+ } else {
+ printResponse(response, "<html id=\"_richfaces_file_upload_stopped\"></html>");
+ }
+
+ }
+
+ } finally {
+
+ if (sessionsMap != null) {
+ sessionsMap.remove(uid);
+ percentMap.remove(uid);
+ }
+
+ }
} else {
- printResponse(response, "<html id=\"_richfaces_file_upload_size_restricted\"></html>");
- }
-
- } else if (!checkFileCount(httpRequest)) {
- printResponse(response, "<html id=\"_richfaces_file_upload_forbidden\"></html>");
- } else {
-
- HttpSession session = httpRequest.getSession();
- synchronized (session) {
- sessionsMap = (Map<String, MultipartRequest>) session.getAttribute(REQUESTS_SESSIONS_BEAN_NAME);
- percentMap = (Map<String, Object>) session.getAttribute(PERCENT_BEAN_NAME);
- if (sessionsMap == null) {
- sessionsMap = Collections.synchronizedMap(new HashMap<String, MultipartRequest>());
- session.setAttribute(REQUESTS_SESSIONS_BEAN_NAME, sessionsMap);
- }
- if (percentMap == null) {
- percentMap = new HashMap<String, Object>();
- session.setAttribute(PERCENT_BEAN_NAME, percentMap);
- }
- }
-
- /* associate percent value with file entry uid */
- percentMap.put(uid, 0);
- sessionsMap.put(uid, multipartRequest);
-
- if (multipartRequest.parseRequest()) {
- handleRequest(multipartRequest, multipartRequest.isFormUpload() ? response :
- new HttpServletResponseWrapper(response){
- @Override
- public void setContentType(String type) {
- super.setContentType(BaseXMLFilter.TEXT_HTML + ";charset=UTF-8");
- }
- }, chain);
- } else {
- printResponse(response, "<html id=\"_richfaces_file_upload_stopped\"></html>");
- }
-
- }
-
- } finally {
-
- if (sessionsMap != null) {
- sessionsMap.remove(uid);
- percentMap.remove(uid);
- }
-
- }
- } else {
-
- if ("richfaces_file_upload_action_stop".equals(httpRequest.getParameter("action"))) {
- HttpSession session = httpRequest.getSession();
- Map<String, MultipartRequest> sessions = (Map<String, MultipartRequest>) session.getAttribute(REQUESTS_SESSIONS_BEAN_NAME);
- if (sessions != null) {
- MultipartRequest multipartRequest = sessions.get(uid);
- if (multipartRequest != null) {
- multipartRequest.stop();
+ if ("richfaces_file_upload_action_stop".equals(queryParamMap.get("action"))) {
+ HttpSession session = httpRequest.getSession(false);
+ if (session != null) {
+ Map<String, MultipartRequest> sessions = (Map<String, MultipartRequest>) session.getAttribute(REQUESTS_SESSIONS_BEAN_NAME);
+
+ if (sessions != null) {
+ MultipartRequest multipartRequest = sessions.get(uid);
+ if (multipartRequest != null) {
+ multipartRequest.stop();
+ }
+ handleRequest(request, response, chain);
+ }
+ }
+ } else {
+ handleRequest(request, response, chain);
+ }
}
+ } else {
handleRequest(request, response, chain);
- }
-
- } else {
- handleRequest(request, response, chain);
}
- }
- } else {
- handleRequest(request, response, chain);
}
- }
/**
* @param httpServletRequest
16 years, 3 months
JBoss Rich Faces SVN: r10557 - trunk/samples/richfaces-demo/src/main/webapp/templates/include.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-09-25 08:06:18 -0400 (Thu, 25 Sep 2008)
New Revision: 10557
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-09-25 12:03:02 UTC (rev 10556)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-09-25 12:06:18 UTC (rev 10557)
@@ -50,13 +50,13 @@
<a4j:outputPanel id="hide2" styleClass="viewsourcelooklink" style="display:none">
<rich:effect for="hide2" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
<rich:effect for="hide2" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
- <rich:effect for="hide2" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.0" />
+ <rich:effect for="hide2" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
<h:outputText style="padding-right:5px" value="Hide"/>
</a4j:outputPanel>
<a4j:outputPanel styleClass="viewsourcelooklink" id="look">
- <rich:effect for="look" event="onclick" type="Fade" targetId="source1" params="duration:0.0" />
- <rich:effect for="look" event="onclick" type="Fade" params="duration:0.0" />
+ <rich:effect for="look" event="onclick" type="Fade" targetId="source1" params="duration:0.1" />
+ <rich:effect for="look" event="onclick" type="Fade" params="delay:0.0, duration:0.1" />
<rich:effect for="look" event="onclick" type="BlindDown" targetId="source1" params="delay:0.1,duration:1.0,from:0.0,to:1.0" />
<rich:effect for="look" event="onclick" type="Appear" targetId="source1" params="delay:0.1,duration:0.5,from:0.0,to:1.0" />
<rich:effect for="look" event="onclick" type="Appear" targetId="hide2" params="delay:1.5,duration:1.0,from:0.0,to:1.0" />
@@ -75,7 +75,7 @@
<a4j:outputPanel id="hide" styleClass="viewsourcehidelink">
<rich:effect for="hide" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
<rich:effect for="hide" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
- <rich:effect for="hide" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.0" />
+ <rich:effect for="hide" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
<h:outputText style="padding-right:5px" value="<<Hide Source"/>
</a4j:outputPanel>
16 years, 3 months
JBoss Rich Faces SVN: r10556 - in trunk/samples/richfaces-demo/src/main: webapp/templates/include and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-09-25 08:03:02 -0400 (Thu, 25 Sep 2008)
New Revision: 10556
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/TabAjaxListener.java
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/TabAjaxListener.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/TabAjaxListener.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/TabAjaxListener.java 2008-09-25 12:03:02 UTC (rev 10556)
@@ -0,0 +1,53 @@
+package org.richfaces.demo.validation;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.richfaces.component.UITab;
+import org.richfaces.component.UITabPanel;
+
+public class TabAjaxListener implements AjaxListener{
+
+ public void processAjax(AjaxEvent event) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ //Conversion/Validation Messages appears
+ if (context.getMaximumSeverity() != null){
+ //getting all the components with messages
+ Iterator<String> ids = context.getClientIdsWithMessages();
+ if(ids.hasNext()) {
+ // getting element id as string
+ String id = ids.next();
+ // getting component by it's id
+ UIViewRoot view = context.getViewRoot();
+ UIComponent cmp = (UIComponent)view.findComponent(id);
+ UIComponent parentTab = this.findParentTabComponent(cmp);
+ if (parentTab != null){
+ UIComponent parentTabPanel = parentTab.getParent();
+ ((UITabPanel)parentTabPanel).setSelectedTab(((UITab)parentTab).getName());
+ }
+ }
+ }
+ }
+ public UIComponent findParentTabComponent(UIComponent component)
+ { // need to find and return parent org.richfaces.Tab component
+
+ // searching for parent org.richfaces.Tab component
+ UIComponent parent = component.getParent();
+ while(!"org.richfaces.Tab".equals(parent.getFamily()))
+ {
+ parent = parent.getParent();
+
+ if(parent == null || parent.equals("javax.faces.ViewRoot"))
+ { // if parent = javax.faces.ViewRoot or null(which is parent() of javax.faces.ViewRoot) - we should break while cycle
+ parent = null;
+ break;
+ }
+ }
+ return parent;
+ }
+}
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-09-25 11:41:48 UTC (rev 10555)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-09-25 12:03:02 UTC (rev 10556)
@@ -50,7 +50,7 @@
<a4j:outputPanel id="hide2" styleClass="viewsourcelooklink" style="display:none">
<rich:effect for="hide2" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
<rich:effect for="hide2" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
- <rich:effect for="hide2" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
+ <rich:effect for="hide2" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.0" />
<h:outputText style="padding-right:5px" value="Hide"/>
</a4j:outputPanel>
@@ -75,7 +75,7 @@
<a4j:outputPanel id="hide" styleClass="viewsourcehidelink">
<rich:effect for="hide" event="onclick" type="BlindUp" targetId="source1" params="id:'source1', duration:1.0" />
<rich:effect for="hide" event="onclick" type="Appear" targetId="look" params="delay:1.5, duration:0.5" />
- <rich:effect for="hide" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.1" />
+ <rich:effect for="hide" event="onclick" type="Fade" targetId="hide2" params="delay:0.0, duration:0.0" />
<h:outputText style="padding-right:5px" value="<<Hide Source"/>
</a4j:outputPanel>
16 years, 3 months
JBoss Rich Faces SVN: r10555 - trunk/test-applications/regressionArea/Seam-ear.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-25 07:41:48 -0400 (Thu, 25 Sep 2008)
New Revision: 10555
Modified:
trunk/test-applications/regressionArea/Seam-ear/pom.xml
Log:
Exclude xml-api forom dependencies
Modified: trunk/test-applications/regressionArea/Seam-ear/pom.xml
===================================================================
--- trunk/test-applications/regressionArea/Seam-ear/pom.xml 2008-09-25 11:26:57 UTC (rev 10554)
+++ trunk/test-applications/regressionArea/Seam-ear/pom.xml 2008-09-25 11:41:48 UTC (rev 10555)
@@ -47,6 +47,10 @@
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -91,6 +95,10 @@
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
16 years, 3 months
JBoss Rich Faces SVN: r10554 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-09-25 07:26:57 -0400 (Thu, 25 Sep 2008)
New Revision: 10554
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
Log:
optimization
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2008-09-25 10:59:07 UTC (rev 10553)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2008-09-25 11:26:57 UTC (rev 10554)
@@ -29,12 +29,12 @@
},
// Public functions
getInnerHTML : function(context) {
- var html = "";
+ var children = [];
for (var i = 0; i < this.childs.length; i++)
{
- html += this.childs[i].getContent(context);
+ children.push(this.childs[i].getContent(context));
}
- return html;
+ return children.join('');
},
// Escape XML symbols - < > & ' ...
xmlEscape : function(value) {
16 years, 3 months
JBoss Rich Faces SVN: r10553 - trunk/sandbox/samples/editor-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-25 06:59:07 -0400 (Thu, 25 Sep 2008)
New Revision: 10553
Modified:
trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
Log:
Removing events and style attributes from Editor
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-25 10:59:04 UTC (rev 10552)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/pages/editor.jsp 2008-09-25 10:59:07 UTC (rev 10553)
@@ -5,69 +5,22 @@
<html>
<head>
<title></title>
- <style>
- .editor-new{
- font-size: 20;
- }
- </style>
- <script type="text/javascript">
- <!--
- function testEvent(element, event){
- element = document.getElementById(element.id + '_' + event)
- element.innerHTML = '+';
- }
- </script>
</head>
<body>
<f:view >
<h:form id="formId">
<ed:editor id="editorId"
- styleClass="editor-new"
- style="color: red"
value="#{editorBean.value}"
width="300"
height="175"
rendered="#{editorBean.rendered}"
binding="#{editorBean.editor}"
- theme="advanced"
- onclick="testEvent(this, 'onclick')"
- ondblclick="testEvent(this, 'ondblclick')"
- onkeydown="testEvent(this, 'onkeydown')"
- onkeypress="testEvent(this, 'onkeypress')"
- onkeyup="testEvent(this, 'onkeyup')"
- onmousedown="testEvent(this, 'onmousedown')"
- onmousemove="testEvent(this, 'onmousemove')"
- onmouseout="testEvent(this, 'onmouseout')"
- onmouseover="testEvent(this, 'onmouseover')"
- onmouseup="testEvent(this, 'onmouseup')"/>
+ theme="advanced" />
-
+ <ed:editor ></ed:editor>
<h:outputText value="Editor value: #{editorBean.value}" />
<br/>
- <h:panelGrid columns="10" border="1">
- <h:outputText value="onclick"/>
- <h:outputText value="ondblclick"/>
- <h:outputText value="onmouseup"/>
- <h:outputText value="onmousedown"/>
- <h:outputText value="onmousemove"/>
- <h:outputText value="onmouseover"/>
- <h:outputText value="onmouseout"/>
- <h:outputText value="onkeydown"/>
- <h:outputText value="onkeypress"/>
- <h:outputText value="onkeyup"/>
- <h:outputText id="editorId_onclick" value="-"/>
- <h:outputText id="editorId_ondblclick" value="-"/>
- <h:outputText id="editorId_onmouseup" value="-"/>
- <h:outputText id="editorId_onmousedown" value="-"/>
- <h:outputText id="editorId_onmousemove" value="-"/>
- <h:outputText id="editorId_onmouseover" value="-"/>
- <h:outputText id="editorId_onmouseout" value="-"/>
- <h:outputText id="editorId_onkeydown" value="-"/>
- <h:outputText id="editorId_onkeypress" value="-"/>
- <h:outputText id="editorId_onkeyup" value="-"/>
- </h:panelGrid>
- <br/>
<h:commandButton value="h:commandButton" action="#{editorBean.action1}"/>
<a4j:commandButton value="a4j:commandButton" action="#{editorBean.action1}"
reRender="editorId"/>
16 years, 3 months
JBoss Rich Faces SVN: r10552 - in trunk/sandbox/ui/editor/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-25 06:59:04 -0400 (Thu, 25 Sep 2008)
New Revision: 10552
Modified:
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Removing events and style attributes from Editor
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-09-25 10:28:16 UTC (rev 10551)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-09-25 10:59:04 UTC (rev 10552)
@@ -24,8 +24,6 @@
</test>
</tag>
&ui_component_attributes;
- &html_events;
- &html_style_attributes;
<property hidden="true">
<name>type</name>
<classname>java.lang.String</classname>
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-09-25 10:28:16 UTC (rev 10551)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-09-25 10:59:04 UTC (rev 10552)
@@ -13,18 +13,8 @@
<f:clientid var="clientId"/>
<h:styles>css/editor.xcss</h:styles>
<h:scripts>scripts/tiny_mce/tiny_mce_src.js, scripts/editor.js</h:scripts>
- <div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass,class"
- class="rich-editor #{component.attributes['styleClass']}"
- onclick="#{component.attributes['onclick']}"
- ondblclick="#{component.attributes['ondblclick']}"
- onmouseup="#{component.attributes['onmouseup']}"
- onmousedown="#{component.attributes['onmousedown']}"
- onmousemove="#{component.attributes['onmousemove']}"
- onmouseover="#{component.attributes['onmouseover']}"
- onmouseout="#{component.attributes['onmouseout']}"
- onkeydown="#{component.attributes['onkeydown']}"
- onkeypress="#{component.attributes['onkeypress']}"
- onkeyup="#{component.attributes['onkeyup']}">
+ <div id="#{clientId}" x:passThruWithExclusions="id,value"
+ class="rich-editor">
<textarea id="#{clientId}TextArea" name='#{clientId}'
style="width: #{component.attributes['width']}px; height: #{component.attributes['height']}px;">
16 years, 3 months
JBoss Rich Faces SVN: r10551 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-09-25 06:28:16 -0400 (Thu, 25 Sep 2008)
New Revision: 10551
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java 2008-09-24 17:09:39 UTC (rev 10550)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/GraphValidatorTest.java 2008-09-25 10:28:16 UTC (rev 10551)
@@ -22,8 +22,8 @@
public void testGraphValidatorComponentWithComponentSubtree(Template template) {
renderPage(template);
- writeStatus("Check that components subtree confined by the component is validated " +
- "with Hibernate Validator properly");
+ writeStatus("Check that components subtree confined by the component is validated "
+ + "with Hibernate Validator properly");
String parentId = getParentId() + "_form:";
String tfNameId = parentId + NAME;
@@ -75,21 +75,32 @@
public void testGraphValidatorComponentWithValueBoundToBean(Template template) {
renderPage(template);
- writeStatus("Check that component validates a bean bound to component value property. " +
- "After model is updated the bean must be validated again.");
+ writeStatus("Check that component validates a bean bound to component value property. "
+ + "After model is updated the bean must be validated again.");
String parentId = getParentId() + "_form1:";
- String firstCompId = parentId + "table:0:time";
String firstCompErrMsg = parentId + "table:0:time" + ERR_MSG_POSTFIX;
String saveBtn = parentId + SAVE_BTN;
String allMessages = parentId + ALL_MSGS;
-// writeStatus("Try to save an input. Model validation cannot be passed");
-// clickAjaxCommandAndWait(saveBtn);
-//
-// AssertTextEquals(allMessages, "Invalid values: Please fill at least one entry");
-
+ writeStatus("Try to save an input. Model validation cannot be passed");
+ clickAjaxCommandAndWait(saveBtn);
+
+ AssertTextEquals(allMessages, "Invalid values: Please fill at least one entry");
+
+ writeStatus("Check bean properties are validated at validation phase. Type time of sport activity greater than allowed");
+ spinnerManualInput("13");
+
+ clickAjaxCommandAndWait(saveBtn);
+ assertPresent(firstCompErrMsg);
+
+ writeStatus("Correct the input and save data again");
+ spinnerManualInput("11");
+ clickAjaxCommandAndWait(saveBtn);
+ assertNotPresent(firstCompErrMsg);
+
+ AssertTextEquals(allMessages, "Changes Stored Successfully");
}
private void assertPresent(String id) {
@@ -100,6 +111,10 @@
AssertTextEquals(id, "", "Message [" + id + "] must be empty on the page");
}
+ private void spinnerManualInput(String value) {
+ type("xpath=//table[@id='" + getParentId() + "_form1:table:0:time']/tbody/tr/td/input", value);
+ }
+
@Override
public String getTestUrl() {
return "pages/graphValidator/graphValidatorTest.xhtml";
16 years, 3 months
JBoss Rich Faces SVN: r10550 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-09-24 13:09:39 -0400 (Wed, 24 Sep 2008)
New Revision: 10550
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
Log:
RF-4517
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-09-24 15:40:23 UTC (rev 10549)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/component/UIScrollableDataTable.java 2008-09-24 17:09:39 UTC (rev 10550)
@@ -40,6 +40,7 @@
import org.richfaces.model.ScrollableTableDataRange;
import org.richfaces.model.SortOrder;
import org.richfaces.model.internal.ComponentSortableDataModel;
+import org.richfaces.renderkit.html.ScrollableDataTableUtils;
/**
@@ -414,7 +415,7 @@
}
if (getRowCount() < getFirst() + rows) {
setFirst(0);
- setScrollPos("0,0," + rows);
+ setScrollPos("0,0," + rows + "," + ScrollableDataTableUtils.getClientRowIndex(this));
}
}
16 years, 3 months