JBoss Rich Faces SVN: r6548 - in trunk: ui/dataTable/src/test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-04 14:10:36 -0500 (Tue, 04 Mar 2008)
New Revision: 6548
Added:
trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/
trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
http://jira.jboss.com/jira/browse/RF-1743
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-03-04 18:44:52 UTC (rev 6547)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2008-03-04 19:10:36 UTC (rev 6548)
@@ -268,6 +268,7 @@
public static final String BODY_ELEMENT = "body";
public static final String TR_ELEMENT = "tr";
public static final String CAPTION_ELEMENT = "caption";
+ public static final String TBOBY_ELEMENT = "tbody";
public static final String THEAD_ELEMENT = "thead";
public static final String TFOOT_ELEMENT = "tfoot";
public static final String IMG_ELEMENT = "img";
Added: trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java
===================================================================
--- trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java (rev 0)
+++ trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java 2008-03-04 19:10:36 UTC (rev 6548)
@@ -0,0 +1,378 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIOutput;
+import javax.faces.component.html.HtmlForm;
+import javax.faces.component.html.HtmlOutputText;
+import javax.faces.model.ListDataModel;
+
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+import org.richfaces.component.UIColumn;
+import org.richfaces.component.UIDataTable;
+import org.richfaces.model.Ordering;
+
+import com.gargoylesoftware.htmlunit.html.DomText;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
+public class SortableHeaderRenderingTest extends AbstractAjax4JsfTestCase {
+ private static final int ROWS_COUNT = 10;
+
+ private static Set<String> javaScripts = new HashSet<String>();
+ static {
+ javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
+ javaScripts.add("org.ajax4jsf.javascript.AjaxScript");
+ javaScripts.add("org/richfaces/renderkit/html/scripts/data-table.js");
+ javaScripts.add("scripts/inplaceinput.js");
+ javaScripts.add("scripts/utils.js");
+ }
+
+ private UIDataTable dataTable;
+
+ private UIColumn column1;
+
+ private UIColumn column2;
+
+ private UIForm form = null;
+
+ private Comparator<Date> comparator;
+
+ /**
+ * Create the test case
+ *
+ * @param testName
+ * name of the test case
+ */
+ public SortableHeaderRenderingTest(String name) {
+ super(name);
+ }
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ comparator = new SortComparator();
+
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+ dataTable = (UIDataTable) application
+ .createComponent("org.richfaces.DataTable");
+ dataTable.setId("dataTable");
+
+ List<Date> list = new ArrayList<Date>();
+ for (int i = 0; i < ROWS_COUNT; i++) {
+ list.add(new Date((long) Math.random()));
+ }
+ dataTable.setValue(new ListDataModel(list));
+ dataTable.setVar("var");
+
+ column1 = (UIColumn) application.createComponent("org.richfaces.Column");
+ UIOutput cellElement1 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),null, null, null);
+ cellElement1.setValueExpression("value", new ColumnOneExpression());
+
+ column1.getChildren().add(cellElement1);
+ column1.setId("column1");
+ column1.setSortOrder(Ordering.ASCENDING);
+ column1.setValueExpression("comparator", new ComparatorExpression());
+
+ UIOutput facet1 = new HtmlOutputText();
+ facet1.setValue("sort");
+ column1.getFacets().put("header", facet1);
+
+ dataTable.getChildren().add(column1);
+
+ column2 = (UIColumn) application.createComponent("org.richfaces.Column");
+ column2.setId("column2");
+ UIOutput cellElement2 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),null, null, null);
+ cellElement2.setValueExpression("value", new ColumnTwoExpression());
+ column2.setFilterValue("filterValue");
+ column2.setValueExpression("filterBy", new ColumnTwoExpression());
+
+
+ column2.getChildren().add(cellElement2);
+ dataTable.getChildren().add(column2);
+
+ form.getChildren().add(dataTable);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ form = null;
+ column1 = null;
+ column2 = null;
+ dataTable = null;
+
+ super.tearDown();
+ }
+
+ /**
+ * Test sortable header rendering.
+ *
+ * @throws Exception
+ */
+ public void testRenderSortableHeader() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ List<HtmlElement> headers = page.getDocumentElement().getHtmlElementsByTagName(HTML.th_ELEM);
+ assertNotNull(headers);
+ assertEquals(2, headers.size());
+
+ HtmlElement th = headers.get(0);
+ assertNotNull(th);
+ String onclick = th.getAttributeValue(HTML.onclick_ATTRIBUTE);
+ assertNotNull(onclick);
+ assertTrue(onclick.startsWith("A4J.AJAX.Submit"));
+
+ HtmlElement div = (HtmlElement) th.getFirstChild();
+ assertNotNull(div);
+ assertEquals(HTML.DIV_ELEM, div.getTagName());
+ assertNull(div.getNextSibling());
+
+ HtmlElement span = (HtmlElement) div.getFirstChild();
+ assertNotNull(span);
+ assertEquals(HTML.SPAN_ELEM, span.getTagName());
+ assertNull(span.getNextSibling());
+
+ String clazz = span.getAttributeValue(HTML.class_ATTRIBUTE);
+ assertNotNull(clazz);
+ assertTrue(clazz.contains("dr-table-header-sort-up"));
+ assertTrue(clazz.contains("dr-table-sortable-header"));
+
+ DomText text = (DomText) span.getFirstChild();
+ assertNotNull(text);
+
+ HtmlElement img = (HtmlElement) text.getNextSibling();
+ assertNotNull(img);
+ assertEquals(HTML.IMG_ELEMENT, img.getTagName());
+ assertNull(img.getNextSibling());
+
+ String src = img.getAttributeValue(HTML.src_ATTRIBUTE);
+ assertNotNull(src);
+ assertTrue(src.contains("spacer.gif"));
+ }
+
+ /**
+ * Test filtered header rendering.
+ *
+ * @throws Exception
+ */
+ public void testRenderFilteredHeader() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ List<HtmlElement> headers = page.getDocumentElement().getHtmlElementsByTagName(HTML.th_ELEM);
+ assertNotNull(headers);
+ assertEquals(2, headers.size());
+
+ HtmlElement th = headers.get(1);
+ assertNotNull(th);
+
+ HtmlElement div = (HtmlElement) th.getFirstChild();
+ assertNotNull(div);
+ assertEquals(HTML.DIV_ELEM, div.getTagName());
+ assertNull(div.getFirstChild());
+
+ div = (HtmlElement) div.getNextSibling();
+ assertNotNull(div);
+ assertEquals(HTML.DIV_ELEM, div.getTagName());
+ assertNull(div.getNextSibling());
+
+ List<HtmlElement> spans= div.getHtmlElementsByTagName(HTML.SPAN_ELEM);
+ assertNotNull(spans);
+ assertEquals(1, spans.size());
+
+ HtmlElement span = spans.get(0);
+ String clazz = span.getAttributeValue(HTML.class_ATTRIBUTE);
+ assertNotNull(clazz);
+ assertTrue(clazz.contains("rich-inplace-view"));
+ }
+
+ /**
+ * Test filtered data rendering
+ *
+ * @throws Exception
+ */
+ public void testRenderFilteredData() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+
+ HtmlElement table = page.getHtmlElementById(dataTable.getClientId(facesContext));
+ assertNotNull(table);
+
+ HtmlElement tbody = table.getHtmlElementById(dataTable.getClientId(facesContext)+ ":tb");
+ assertNotNull(tbody);
+ assertNull(tbody.getFirstChild());
+
+ tearDown();
+ setUp();
+
+ column2.setFilterValue(null);
+ column2.setValueExpression("filterBy", null);
+
+ page = renderView();
+ assertNotNull(page);
+
+ table = page.getHtmlElementById(dataTable.getClientId(facesContext));
+ assertNotNull(table);
+
+ tbody = table.getHtmlElementById(dataTable.getClientId(facesContext)+ ":tb");
+ assertNotNull(tbody);
+ assertNotNull(tbody.getFirstChild());
+
+ int count = 0;
+ Iterator<HtmlElement> it = tbody.getChildElementsIterator();
+ while (it.hasNext()) {
+ HtmlElement tr = it.next();
+ count++;
+ }
+ assertEquals(ROWS_COUNT, count);
+ }
+
+ public void testScript() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List<HtmlScript> scripts = page.getDocumentElement().getHtmlElementsByTagName(
+ "script");
+ int foundCount = 0;
+ for (Iterator<HtmlScript> it = scripts.iterator(); it.hasNext();) {
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
+
+ if (StringUtils.isNotBlank(srcAttr)) {
+ boolean found = false;
+ for (Iterator<String> srcIt = javaScripts.iterator(); srcIt.hasNext();) {
+ String src = (String) srcIt.next();
+
+ found = srcAttr.contains(src);
+ if (found) {
+ foundCount++;
+ break;
+ }
+ }
+
+ assertTrue(found);
+ }
+ }
+ assertEquals(javaScripts.size(), foundCount);
+
+ }
+
+ protected class ColumnOneExpression extends ValueExpression {
+
+ private static final long serialVersionUID = -60617505361080421L;
+
+ @Override
+ public Class<?> getExpectedType() {
+ return String.class;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context) {
+ return String.class;
+ }
+
+ @Override
+ public Object getValue(ELContext context) {
+ return ((Date)dataTable.getRowData()).getTime();
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context) {
+ return false;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object value) {
+
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return false;
+ }
+
+ @Override
+ public String getExpressionString() {
+ return null;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public boolean isLiteralText() {
+ return false;
+ }
+ }
+
+ protected class ColumnTwoExpression extends ColumnOneExpression {
+
+ private static final long serialVersionUID = -865017340246458449L;
+
+ @Override
+ public Object getValue(ELContext context) {
+ return ((Date)dataTable.getRowData()).getTimezoneOffset();
+ }
+ }
+
+ protected class ComparatorExpression extends ColumnOneExpression {
+
+ private static final long serialVersionUID = -865017340246458449L;
+
+ @Override
+ public Object getValue(ELContext context) {
+ return comparator;
+ }
+ }
+
+ protected class SortComparator implements Comparator<Date> {
+
+ @Override
+ public int compare(Date o1, Date o2) {
+ return o1.compareTo(o2);
+ }
+
+ }
+
+}
16 years, 2 months
JBoss Rich Faces SVN: r6547 - trunk/test-applications.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-03-04 13:44:52 -0500 (Tue, 04 Mar 2008)
New Revision: 6547
Modified:
trunk/test-applications/pom.xml
Log:
Modified: trunk/test-applications/pom.xml
===================================================================
--- trunk/test-applications/pom.xml 2008-03-04 18:17:55 UTC (rev 6546)
+++ trunk/test-applications/pom.xml 2008-03-04 18:44:52 UTC (rev 6547)
@@ -23,10 +23,6 @@
<layout>default</layout>
</repository-->
<repository>
- <releases>
- <enabled>true</enabled>
- </releases>
-
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
@@ -37,6 +33,17 @@
<url>http://snapshots.jboss.org/maven2/</url>
<layout>default</layout>
</repository>
+
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+
+ <id>jboss.org</id>
+ <name>JBoss repository</name>
+ <url>http://repository.jboss.org/maven2/</url>
+ <layout>default</layout>
+ </repository>
</repositories>
<modelVersion>4.0.0</modelVersion>
@@ -75,16 +82,6 @@
<version>${rfVersion}</version>
</dependency>
<dependency>
-
- <groupId>org.richfaces.ui</groupId>
-
- <artifactId>core</artifactId>
-
- <version>${rfVersion}</version>
- <scope>provided</scope>
-
- </dependency>
- <dependency>
<artifactId>richfaces-impl</artifactId>
<groupId>org.richfaces.framework</groupId>
<version>${rfVersion}</version>
16 years, 2 months
JBoss Rich Faces SVN: r6546 - in trunk/ui/inplaceInput/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-04 13:17:55 -0500 (Tue, 04 Mar 2008)
New Revision: 6546
Modified:
trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
Log:
fix css, min/max attribute
Modified: trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-04 17:02:18 UTC (rev 6545)
+++ trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-04 18:17:55 UTC (rev 6546)
@@ -44,13 +44,13 @@
<name>maxInputWidth</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["150px"]]></defaultvalue>
+ <defaultvalue><![CDATA["500px"]]></defaultvalue>
</property>
<property>
<name>minInputWidth </name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["70px"]]></defaultvalue>
+ <defaultvalue><![CDATA["40px"]]></defaultvalue>
</property>
<property>
<name>inputWidth</name>
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-03-04 17:02:18 UTC (rev 6545)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-03-04 18:17:55 UTC (rev 6546)
@@ -6,6 +6,7 @@
<f:verbatim>
<![CDATA[
+
.rich-inplace {
}
@@ -35,6 +36,8 @@
border-style: inset;
margin:0px;
padding:0px 0px 0px 0px;
+ position: absolute;
+ left: 0px;
}
.rich-inplace-input-view-hover {
@@ -47,7 +50,6 @@
.rich-inplace-input-strut {
height : 1px;
- position: absolute;
}
.rich-inplace-controls {
16 years, 2 months
JBoss Rich Faces SVN: r6545 - trunk/ui/inplaceSelect/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-04 12:02:18 -0500 (Tue, 04 Mar 2008)
New Revision: 6545
Modified:
trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
Log:
min/max default value with "px"
Modified: trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-04 16:51:13 UTC (rev 6544)
+++ trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-04 17:02:18 UTC (rev 6545)
@@ -38,13 +38,13 @@
<name>maxSelectWidth</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["200"]]></defaultvalue>
+ <defaultvalue><![CDATA["200px"]]></defaultvalue>
</property>
<property>
<name>minSelectWidth</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["100"]]></defaultvalue>
+ <defaultvalue><![CDATA["100px"]]></defaultvalue>
</property>
<property>
<name>selectWidth</name>
16 years, 2 months
JBoss Rich Faces SVN: r6544 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-04 11:51:13 -0500 (Tue, 04 Mar 2008)
New Revision: 6544
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
button handling
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 16:30:27 UTC (rev 6543)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 16:51:13 UTC (rev 6544)
@@ -19,8 +19,8 @@
this.comboList.listParent.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
},
- setInputWidth : function($super) {
- $super();
+ setInputWidth : function($super, textSize) {
+ $super(textSize);
this.button.show();
this.button.style.left = (parseInt(this.tempValueKeeper.style.width) - this.button.offsetWidth) + "px";
},
16 years, 2 months
JBoss Rich Faces SVN: r6543 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-04 11:30:27 -0500 (Tue, 04 Mar 2008)
New Revision: 6543
Added:
trunk/docs/userguide/en/src/main/resources/images/progressbar.png
Log:
Image was added
http://jira.jboss.com/jira/browse/RF-1690
Added: trunk/docs/userguide/en/src/main/resources/images/progressbar.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/progressbar.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months
JBoss Rich Faces SVN: r6542 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-04 11:29:45 -0500 (Tue, 04 Mar 2008)
New Revision: 6542
Modified:
trunk/docs/userguide/en/src/main/docbook/included/progressBar.desc.xml
Log:
Image was added
http://jira.jboss.com/jira/browse/RF-1690
Modified: trunk/docs/userguide/en/src/main/docbook/included/progressBar.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/progressBar.desc.xml 2008-03-04 16:24:47 UTC (rev 6541)
+++ trunk/docs/userguide/en/src/main/docbook/included/progressBar.desc.xml 2008-03-04 16:29:45 UTC (rev 6542)
@@ -11,14 +11,14 @@
<property><rich:progressBar></property>
</emphasis> component is designed for displaying a progress bar which shows the current status of the process. </para>
- <!--figure>
- <title><emphasis role="bold"><property><rich:column></property></emphasis> component</title>
+ <figure>
+ <title><emphasis role="bold"><property><rich:progressBar></property></emphasis> component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/column1.png"/>
+ <imagedata fileref="images/progressbar.png"/>
</imageobject>
</mediaobject>
- </figure-->
+ </figure>
</section>
<section>
<title>Key Features</title>
16 years, 2 months
JBoss Rich Faces SVN: r6541 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-04 11:24:47 -0500 (Tue, 04 Mar 2008)
New Revision: 6541
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
button handling
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 16:03:46 UTC (rev 6540)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 16:24:47 UTC (rev 6541)
@@ -2,9 +2,9 @@
Richfaces.InplaceSelect = Class.create(Richfaces.InplaceInput, {
initialize : function($super, listObj, clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events, classes, barParams, buttonId) {
this.comboList = listObj;
+ this.button = $(buttonId);
$super(clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events, classes, barParams);
this.clickOnBar = false;
- this.button = $(buttonId);
},
initHandlers : function($super) {
@@ -12,6 +12,8 @@
this.tempValueKeeper.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
this.tempValueKeeper.observe("keydown", function(e){this.tmpValueKeyDownHandlerIn(e);}.bindAsEventListener(this));
+ this.button.observe("mousedown", function(e){this.buttonClickHandler(e);}.bindAsEventListener(this));
+
this.comboList.listParent.observe("mousedown", function(e){this.listMousedownHandler(e);}.bindAsEventListener(this));
this.comboList.listParent.observe("mousemove", function(e){this.listMouseMoveHandler(e)}.bindAsEventListener(this));
this.comboList.listParent.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
@@ -50,6 +52,11 @@
this.comboList.showWithDelay();
},
+ buttonClickHandler : function(e) {
+ this.tempKeeperClickHandler();
+ Event.stop(e);
+ },
+
tmpValueBlurHandler : function($super, event) {
$super(event);
16 years, 2 months
JBoss Rich Faces SVN: r6540 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-04 11:03:46 -0500 (Tue, 04 Mar 2008)
New Revision: 6540
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
button positioning
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 15:53:03 UTC (rev 6539)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-04 16:03:46 UTC (rev 6540)
@@ -19,7 +19,8 @@
setInputWidth : function($super) {
$super();
- this.button.style.left = (parseInt(this.tempValueKeeper.style.width) - 12) + "px";
+ this.button.show();
+ this.button.style.left = (parseInt(this.tempValueKeeper.style.width) - this.button.offsetWidth) + "px";
},
switchingStatesHandler : function($super, e) {
16 years, 2 months
JBoss Rich Faces SVN: r6539 - trunk/samples/richfaces-demo/src/main/webapp/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-03-04 10:53:03 -0500 (Tue, 04 Mar 2008)
New Revision: 6539
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect.xhtml
Log:
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox.xhtml 2008-03-04 15:53:03 UTC (rev 6539)
@@ -0,0 +1,20 @@
+<!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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Combo Box Component</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" value="#{componentNavigator.activeTab}" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/comboBox/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="rich/comboBox"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput.xhtml 2008-03-04 15:53:03 UTC (rev 6539)
@@ -0,0 +1,20 @@
+<!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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Inplace Input component</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/inplaceInput/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="rich/inplaceInput"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect.xhtml 2008-03-04 15:53:03 UTC (rev 6539)
@@ -0,0 +1,20 @@
+<!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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Inplace Select component</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/inplaceSelect/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="rich/inplaceSelect"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
16 years, 2 months