JBoss Rich Faces SVN: r19345 - trunk/core/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-09-27 10:13:39 -0400 (Mon, 27 Sep 2010)
New Revision: 19345
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/jquery.position.js
Log:
https://jira.jboss.org/browse/RF-9277
Modified: trunk/core/impl/src/main/resources/META-INF/resources/jquery.position.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/jquery.position.js 2010-09-27 10:39:57 UTC (rev 19344)
+++ trunk/core/impl/src/main/resources/META-INF/resources/jquery.position.js 2010-09-27 14:13:39 UTC (rev 19345)
@@ -136,6 +136,21 @@
var jqe = $(element);
var offset = jqe.offset();
return {width: jqe.width(), height: jqe.height(), left: Math.floor(offset.left), top: Math.floor(offset.top)};
+ /*
+ var jqe = $(element);
+ var offset = jqe.offset();
+ var width = jqe.width();
+ var height = jqe.height();
+ if (width == 0 && height==0) {
+ //TODO: create getComputedStyle function for this
+ var e = jqe.get(0);
+ if (e.currentStyle) {
+ width = parseInt(e.currentStyle['width'],10) || 0;
+ height = parseInt(e.currentStyle['height'],10) || 0;
+ }
+ }
+ return {width: width, height: height, left: Math.floor(offset.left), top: Math.floor(offset.top)};
+ */
};
function checkCollision (elementRect, windowRect) {
@@ -147,9 +162,10 @@
return 0;
// return collision squire
var rect = {left: (elementRect.left>windowRect.left ? elementRect.left : windowRect.left),
- top: (elementRect.top>windowRect.top ? elementRect.top : windowRect.top),
- right: (elementRect.right<windowRect.right ? elementRect.right : windowRect.right),
- bottom: (elementRect.bottom<windowRect.bottom ? elementRect.bottom : windowRect.bottom)};
+ top: (elementRect.top>windowRect.top ? elementRect.top : windowRect.top)};
+ rect.right = elementRect.right<windowRect.right ? (elementRect.right==elementRect.left ? rect.left : elementRect.right) : windowRect.right;
+ rect.bottom = elementRect.bottom<windowRect.bottom ? (elementRect.bottom==elementRect.top ? rect.top : elementRect.bottom) : windowRect.bottom;
+
return (rect.right-rect.left) * (rect.bottom-rect.top);
};
14 years, 3 months
JBoss Rich Faces SVN: r19344 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-27 06:39:57 -0400 (Mon, 27 Sep 2010)
New Revision: 19344
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
Log:
removing the templates which doesn't work in combination with a4j:repeat (RFPL-819)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java 2010-09-27 10:39:18 UTC (rev 19343)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestMatrix.java 2010-09-27 10:39:57 UTC (rev 19344)
@@ -33,6 +33,7 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -40,6 +41,8 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
+@Templates(exclude = { "a4jRepeat1", "a4jRepeat2", "hDataTable1", "hDataTable2", "richDataTable1,redDiv",
+ "richDataTable2,redDiv", "uiRepeat1", "uiRepeat2" })
public class TestMatrix extends AbstractMetamerTest {
Vector<Vector<Integer>> matrix;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2010-09-27 10:39:18 UTC (rev 19343)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jRepeat/TestSimple.java 2010-09-27 10:39:57 UTC (rev 19344)
@@ -30,6 +30,7 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -38,6 +39,8 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
+@Templates(exclude = { "a4jRepeat1", "a4jRepeat2", "hDataTable1", "hDataTable2", "richDataTable1,redDiv",
+ "richDataTable2,redDiv", "uiRepeat1", "uiRepeat2" })
public class TestSimple extends AbstractMetamerTest {
protected static final int ELEMENTS_TOTAL = 20;
14 years, 3 months
JBoss Rich Faces SVN: r19343 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-27 06:39:18 -0400 (Mon, 27 Sep 2010)
New Revision: 19343
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/
modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
added ui:repeat to Metamer
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-09-24 15:18:00 UTC (rev 19342)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-09-27 10:39:18 UTC (rev 19343)
@@ -110,6 +110,7 @@
components.put("a4jStatus", "A4J Status");
components.put("commandButton", "JSF Command Button");
components.put("hDataTable", "JSF Data Table");
+ components.put("uiRepeat", "UI Repeat");
components.put("richAccordion", "Rich Accordion");
components.put("richAccordionItem", "Rich Accordion Item");
components.put("richAutocomplete", "Rich Autocomplete");
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java 2010-09-27 10:39:18 UTC (rev 19343)
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:repeat.
+ *
+ * <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ *
+ * @version $Revision$
+ */
+@ManagedBean(name = "uiRepeatBean")
+@ViewScoped
+public class UiRepeatBean implements Serializable {
+
+ private static final long serialVersionUID = 4864439475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private List<Data> dataList;
+ private Data selectedDataItem = null;
+
+ private Object binding;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ // initialize model for page simple.xhtml
+ dataList = new ArrayList<Data>();
+ for (int i = 0; i < 20; i++) {
+ Data data = new Data();
+ data.setText(MessageFormat.format("Item {0}", i));
+ dataList.add(data);
+ }
+
+ // initialize attributes
+ attributes = Attributes.getUIComponentAttributes(com.sun.faces.facelets.component.UIRepeat.class, getClass());
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("step", 1);
+ attributes.setAttribute("end", 20);
+
+ // should be hiddens
+ attributes.remove("size");
+ attributes.remove("offset");
+ attributes.remove("value");
+ attributes.remove("var");
+ attributes.remove("varStatus");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * @return the data
+ */
+ public List<Data> getDataList() {
+ return dataList;
+ }
+
+ /**
+ * @return the selectedDataItem
+ */
+ public Data getSelectedDataItem() {
+ return selectedDataItem;
+ }
+
+ /**
+ * @param selectedDataItem
+ * the selectedDataItem to set
+ */
+ public void setSelectedDataItem(Data selectedDataItem) {
+ this.selectedDataItem = selectedDataItem;
+ }
+
+ public static final class Data implements Serializable {
+
+ private static final long serialVersionUID = -1461777632529492912L;
+ private String text;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text
+ * the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+ }
+}
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/list.xhtml 2010-09-27 10:39:18 UTC (rev 19343)
@@ -0,0 +1,41 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">UI Repeat</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page that contains <b>ui:repeat</b> and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml 2010-09-27 10:39:18 UTC (rev 19343)
@@ -0,0 +1,82 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <h:outputStylesheet library="css" name="a4jRepeat.css" />
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <h:outputText id="output" value="#{uiRepeatBean.selectedDataItem.text}"/>
+
+ <ul id="list">
+ <ui:repeat id="uiRepeat"
+ value="#{uiRepeatBean.dataList}" var="item"
+ varStatus="status"
+
+ begin="#{uiRepeatBean.attributes.begin.value}"
+ end="#{uiRepeatBean.attributes.end.value}"
+ offset="#{uiRepeatBean.attributes.offset.value}"
+ rendered="#{uiRepeatBean.attributes.rendered.value}"
+
+ step="#{uiRepeatBean.attributes.step.value}"
+
+ >
+ <li>
+ <h:inputText value="#{item.text}" />
+ <h:commandLink value="Link">
+ <f:ajax render="@form" execute="@form" />
+ <f:setPropertyActionListener target="#{uiRepeatBean.selectedDataItem}" value="#{item}" />
+ </h:commandLink>
+
+ <a4j:outputPanel styleClass="statuses">
+ <h:outputText id="statusIndex" value="index=#{status.index}, "/>
+ <h:outputText id="statusCount" value="count=#{status.count}, "/>
+ <h:outputText id="statusFirst" value="first=#{status.first}, "/>
+ <h:outputText id="statusLast" value="last=#{status.last}, "/>
+ <h:outputText id="statusEven" value="even=#{status.even}, "/>
+ </a4j:outputPanel>
+ </li>
+ </ui:repeat>
+ </ul>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{uiRepeatBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19342 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-09-24 11:18:00 -0400 (Fri, 24 Sep 2010)
New Revision: 19342
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
Log:
Fix problem with domElementAttachment
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-09-24 15:02:58 UTC (rev 19341)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-09-24 15:18:00 UTC (rev 19342)
@@ -222,7 +222,7 @@
if (!this.domReattached) {
- this.parent = element.parent();
+ this.parent = this.div.parent();
var domElementAttachment;
if (opts) {
14 years, 3 months
JBoss Rich Faces SVN: r19341 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-09-24 11:02:58 -0400 (Fri, 24 Sep 2010)
New Revision: 19341
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
Log:
Fix problem with domElementAttachment
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-09-24 07:44:47 UTC (rev 19340)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-09-24 15:02:58 UTC (rev 19341)
@@ -369,8 +369,8 @@
this.shadowDiv.css('opacity', this.options.shadowOpacity);
this.shadowDiv.css('filter ', 'alpha(opacity='+this.options.shadowOpacity*100 +');');
- element.css('visibility', '');
- element.css('display', 'block');
+ this.div.css('visibility', '');
+ this.div.css('display', 'block');
if (this.options.autosized) {
this.shadowDiv.css('height', this.cdiv[0].clientHeight);
this.shadowDiv.css('width', this.cdiv[0].clientWidth);
@@ -715,8 +715,8 @@
findForm: function(elt) {
var target = elt;
while (target) {
- if (!target.tagName /* document node doesn't have tagName */
- || target.tagName.toLowerCase() != "form") {
+ if (!target[0].tagName /* document node doesn't have tagName */
+ || target[0].tagName.toLowerCase() != "form") {
target = $(target).parent();
} else {
14 years, 3 months
JBoss Rich Faces SVN: r19339 - modules/tests/archetypes/richfaces-simpleapp-ftest/tags.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-24 03:44:38 -0400 (Fri, 24 Sep 2010)
New Revision: 19339
Added:
modules/tests/archetypes/richfaces-simpleapp-ftest/tags/richfaces-simpleapp-ftest-4.0.0.20100826-M2/
Log:
[maven-scm] copy for tag richfaces-simpleapp-ftest-4.0.0.20100826-M2
Copied: modules/tests/archetypes/richfaces-simpleapp-ftest/tags/richfaces-simpleapp-ftest-4.0.0.20100826-M2 (from rev 19338, modules/tests/archetypes/richfaces-simpleapp-ftest/trunk)
14 years, 3 months
JBoss Rich Faces SVN: r19337 - modules/tests/archetypes/richfaces-simpleapp-ftest/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-24 03:42:43 -0400 (Fri, 24 Sep 2010)
New Revision: 19337
Modified:
modules/tests/archetypes/richfaces-simpleapp-ftest/trunk/release.sh
Log:
release.sh modified to tag project with name 'richfaces-simpleapp-ftest'
Modified: modules/tests/archetypes/richfaces-simpleapp-ftest/trunk/release.sh
===================================================================
--- modules/tests/archetypes/richfaces-simpleapp-ftest/trunk/release.sh 2010-09-24 07:41:09 UTC (rev 19336)
+++ modules/tests/archetypes/richfaces-simpleapp-ftest/trunk/release.sh 2010-09-24 07:42:43 UTC (rev 19337)
@@ -3,7 +3,7 @@
read -p 'Enter new development version: ' DEVELOPMENT
read -p 'Enter path to the settings.xml: ' MVN_SETTINGS
-CONF="--batch-mode -Dtag=metamer-${RELEASE} -DreleaseVersion=${RELEASE} -DdevelopmentVersion=${DEVELOPMENT}"
+CONF="--batch-mode -Dtag=richfaces-simpleapp-ftest-${RELEASE} -DreleaseVersion=${RELEASE} -DdevelopmentVersion=${DEVELOPMENT}"
if [ -n "$MVN_SETTINGS" ]; then
echo "**** NIE JE PRAZDNE $MVN_SETTINGS"
@@ -20,5 +20,3 @@
mvn release:clean ${CONF}
read -p 'Press ENTER to prepare...'
mvn clean release:prepare ${CONF} || exit 1
-read -p 'Press ENTER to perform...'
-mvn release:perform ${CONF} || exit 1
14 years, 3 months