JBoss Rich Faces SVN: r6658 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-03-10 13:31:53 -0400 (Mon, 10 Mar 2008)
New Revision: 6658
Modified:
trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
Log:
http://jira.jboss.com/jira/browse/RF-1216 - component review
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-03-10 17:31:16 UTC (rev 6657)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-03-10 17:31:53 UTC (rev 6658)
@@ -24,6 +24,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem>Highly customizable look and feel</listitem>
+ <listitem>Disablement support</listitem>
<listitem>Browser like selection</listitem>
<listitem>Smart user-defined positioning</listitem>
<listitem>Multicolumn suggestion popup list</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-03-10 17:31:16 UTC (rev 6657)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2008-03-10 17:31:53 UTC (rev 6658)
@@ -13,7 +13,6 @@
<thead>
<row>
<entry>Name</entry>
-
<entry>Value</entry>
</row>
</thead>
@@ -48,9 +47,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:comboBox value="#{bean.state}" valueChangeListener="#{bean.selectionChanged}" >
- <f:selectItems value="#{bean.selectItems}"/>
-</rich:comboBox>
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" />
...]]></programlisting>
</section>
<section>
@@ -89,7 +86,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:comboBox value="#{bean.state}" valueChangeListener="#{bean.selectionChanged}" suggestionValues="#{bean.suggestions}" />
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" />
...]]></programlisting>
<itemizedlist>
<listitem>
@@ -118,7 +115,13 @@
The <emphasis><property> "directInputSuggestions"</property></emphasis> attribute defines, how the first value from the suggested one appears in an input field.
If it's "true" the first value appears with the suggested part highlighted.
</para>
-
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" directInputSuggestions="true" />
+...]]></programlisting>
+ <para>This is a result:</para>
<figure>
<title><emphasis role="bold">
<property><rich:comboBox></property>
@@ -131,12 +134,16 @@
</figure>
<para>
-
+ The <emphasis><property> "selectFirstOnUpdate"</property></emphasis> attribute defines if the first value from suggested is selected in a popup list.
+ If it's "false" nothing is selected in the list before a user hovers some item with the mouse. Also nothing could be selected after the mouse is out the list.
</para>
<para>
- The <emphasis><property> "selectFirstOnUpdate"</property></emphasis> attribute defines if the first value from suggested is selected in a popup list.
- If it's "false" nothing is selected in the list before a user hovers some item with the mouse. Also nothing could be selected after the mouse is out the list.
- </para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" selectFirstOnUpdate="false" />
+...]]></programlisting>
+ <para>This is a result:</para>
<figure>
<title><emphasis role="bold">
<property><rich:comboBox></property>
@@ -147,15 +154,61 @@
</imageobject>
</mediaobject>
</figure>
-
-
- <para>
+
+ <!--para>
The <emphasis><property> "filterNewValues"</property></emphasis> attribute defines the appearance of values in the list.
If it's "true" only the part of a list, which satisfies the prefix entered appears in a popup list.
- If it's "false" all values appear in the popup list. But the list is scrolled to the first value that satisfies the prefix.
+ If it's "false" all values appear in the popup list and the list is scrolled to the first value that satisfies the prefix.
+ </para-->
+ <para>
+ The <emphasis><property>"defaultLabel"</property></emphasis> attribute defines the default label of the input element. Simple example is placed below.
</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" defaultLabel="Select a city..." />
+...]]></programlisting>
+ <para>This is a result:</para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:comboBox></property>
+ </emphasis> with <emphasis><property> "defaultLabel"</property></emphasis> attribute.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/comboBox5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ With the help of the <emphasis><property>"disabled"</property></emphasis> attribute you can disable the whole
+ <emphasis role="bold"><property><rich:comboBox></property></emphasis> component. See the following example.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:comboBox value="#{bean.state}" suggestionValues="#{bean.suggestions}" disabled="true" />
+...]]></programlisting>
+ <para>This is a result:</para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:comboBox></property>
+ </emphasis> with <emphasis><property> "disabled"</property></emphasis> attribute.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/comboBox6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para>
+ The <emphasis role="bold"><property><rich:comboBox></property></emphasis> component provides the possibility to use
+ specific event attribute <emphasis><property> "onlistcall"</property></emphasis> which is fired before the list opening.
+ </para>
+
+ <para>
The <emphasis role="bold"><property><rich:comboBox></property></emphasis> component allows to use sizes attributes:
<itemizedlist>
<listitem>
@@ -167,10 +220,8 @@
</listitem>
</itemizedlist>
</para>
- <para>
- The <emphasis><property> "defaultLabel"</property></emphasis> attribute defines the default label of the input element.
- </para>
- <para>
+
+ <!--para>
The <emphasis role="bold"><property><rich:comboBox></property></emphasis> component provides to use
specific event attributes:
<itemizedlist>
@@ -181,7 +232,10 @@
<emphasis><property> "onchange"</property></emphasis> is fired both with onselected and after the input value changed
</listitem>
</itemizedlist>
- </para>
+ </para-->
+
+
+
</section>
<section>
<title>JavaScript API</title>
16 years, 10 months
JBoss Rich Faces SVN: r6657 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-03-10 13:31:16 -0400 (Mon, 10 Mar 2008)
New Revision: 6657
Added:
trunk/docs/userguide/en/src/main/resources/images/comboBox5.png
trunk/docs/userguide/en/src/main/resources/images/comboBox6.png
Log:
http://jira.jboss.com/jira/browse/RF-1216 - add screenshots
Added: trunk/docs/userguide/en/src/main/resources/images/comboBox5.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/comboBox5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/comboBox6.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/comboBox6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r6656 - in trunk/ui/dataTable/src/test/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-10 12:54:11 -0400 (Mon, 10 Mar 2008)
New Revision: 6656
Added:
trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/DataTableRenderingTest.java
Modified:
trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java
Log:
Separated tests for dataTable rendering. Fixed tests for sortable header rendering.
Modified: trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
===================================================================
--- trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2008-03-10 16:32:55 UTC (rev 6655)
+++ trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2008-03-10 16:54:11 UTC (rev 6656)
@@ -170,239 +170,6 @@
}
/**
- * Test DataTable component rendering.
- *
- * @throws Exception
- */
- public void testRenderDataTable() throws Exception {
-
- dataTable.getAttributes().put("columnsWidth", "400px,200px");
-
- UIColumn column3 = (UIColumn) application
- .createComponent("org.richfaces.Column");
- dataTable.getChildren().add(column3);
- UIOutput text = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- text.setValue("Column");
- column3.getChildren().add(text);
- column3.setBreakBefore(true);
-
- UIColumn column4 = (UIColumn) application
- .createComponent("org.richfaces.Column");
- dataTable.getChildren().add(column4);
- UIOutput text2 = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- text.setValue("Column2");
- column4.getChildren().add(text2);
- column4.setRendered(false);
-
- HtmlPage page = renderView();
- assertNotNull(page);
- // System.out.println(page.asXml());
-
- HtmlElement table = page.getHtmlElementById(dataTable
- .getClientId(facesContext));
- assertNotNull(table);
- assertEquals("table", table.getNodeName());
- String classAttr = table.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-table rich-table"));
-
- List elements = table.getHtmlElementsByTagName("col");
- assertEquals(2, elements.size());
- classAttr = ((HtmlElement) elements.get(0)).getAttributeValue("width");
- assertTrue(classAttr.contains("400px"));
- classAttr = ((HtmlElement) elements.get(1)).getAttributeValue("width");
- assertTrue(classAttr.contains("200px"));
-
- List bodies = table.getHtmlElementsByTagName("tbody");
- assertEquals(1, bodies.size());
- List trs = ((HtmlElement) bodies.get(0)).getHtmlElementsByTagName("tr");
- assertTrue(trs.size() > 0);
- HtmlElement tr = (HtmlElement) trs.get(0);
- assertNotNull(tr);
- classAttr = tr.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-table-firstrow rich-table-firstrow"));
-
- List tds = tr.getHtmlElementsByTagName("td");
- assertTrue(tds.size() > 0);
- HtmlElement td = (HtmlElement) tds.get(0);
- assertNotNull(td);
- classAttr = td.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-table-cell rich-table-cell"));
- }
-
- /**
- * Test DataTable component facets rendering.
- *
- * @throws Exception
- */
- public void testRenderDataTableFacets() throws Exception {
-
- UIColumnGroup header1 = (UIColumnGroup) application
- .createComponent("org.richfaces.ColumnGroup");
- header1.getAttributes().put("columnClasses", "cola, colb");
- dataTable.getFacets().put("header", header1);
-
- UIColumn headerColumn1 = (UIColumn) application
- .createComponent("org.richfaces.Column");
- UIOutput headerText1 = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- headerText1.setValue("Header Column1");
- headerColumn1.getChildren().add(headerText1);
- header1.getChildren().add(headerColumn1);
-
- UIOutput column1header = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- column1header.setValue("Column1 Header");
- headerColumn1.getFacets().put("header", column1header);
-
- UIColumn headerColumn2 = (UIColumn) application
- .createComponent("org.richfaces.Column");
- UIOutput headerText2 = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- headerText2.setValue("Header Column2");
- headerColumn2.getChildren().add(headerText2);
- header1.getChildren().add(headerColumn2);
-
- UIOutput column2header = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- column2header.setValue("Column2 Header");
- headerColumn2.getFacets().put("header", column2header);
-
- UIOutput caption = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- dataTable.getFacets().put("caption", caption);
- caption.setValue("Caption");
-
- UIOutput footer = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- dataTable.getFacets().put("footer", footer);
- footer.setValue("Footer");
-
- HtmlPage page = renderView();
- assertNotNull(page);
- // System.out.println(page.asXml());
-
- HtmlElement table = page.getHtmlElementById(dataTable
- .getClientId(facesContext));
- assertNotNull(table);
-
- List captions = table.getHtmlElementsByTagName("caption");
- assertNotNull(captions);
- assertEquals(1, captions.size());
- String classAttr = ((HtmlElement) captions.get(0))
- .getAttributeValue("class");
- assertTrue(classAttr.contains("dr-table-caption rich-table-caption"));
-
- List headers = table.getHtmlElementsByTagName("thead");
- assertNotNull(headers);
- assertEquals(1, headers.size());
- List trs = ((HtmlElement) headers.get(0))
- .getHtmlElementsByTagName("tr");
- assertTrue(trs.size() > 0);
- HtmlElement tr = (HtmlElement) trs.get(0);
- assertNotNull(tr);
- classAttr = tr.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-table-header rich-table-header"));
-
- List tds = tr.getHtmlElementsByTagName("td");
- assertTrue(tds.size() > 0);
- HtmlElement td = (HtmlElement) tds.get(0);
- assertNotNull(td);
- classAttr = td.getAttributeValue("class");
- assertTrue(classAttr
- .contains("dr-table-headercell rich-table-headercell"));
- assertTrue(classAttr.contains("cola"));
-
- List footers = table.getHtmlElementsByTagName("tfoot");
- assertNotNull(footers);
- assertEquals(1, footers.size());
- trs = ((HtmlElement) footers.get(0)).getHtmlElementsByTagName("tr");
- assertTrue(trs.size() > 0);
- tr = (HtmlElement) trs.get(0);
- assertNotNull(tr);
- classAttr = tr.getAttributeValue("class");
- //System.out.println(classAttr);
- assertTrue(classAttr.contains("dr-table-footer rich-table-footer "));
-
- tds = tr.getHtmlElementsByTagName("td");
- assertTrue(tds.size() > 0);
- td = (HtmlElement) tds.get(0);
- assertNotNull(td);
- classAttr = td.getAttributeValue("class");
- //System.out.println(classAttr);
- assertTrue(classAttr.contains("dr-table-footercell rich-table-footercell "));
-
- Iterator fixedChildren = dataTable.fixedChildren();
- assertNotNull(fixedChildren);
- assertTrue(fixedChildren.hasNext());
- }
-
- /**
- * Test DataTable component rows and columns rendering.
- *
- * @throws Exception
- */
- public void testRenderDataTableRowsAndColumns() throws Exception {
-
- UIOutput caption = (UIOutput) createComponent(
- HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
- null, null, null);
- dataTable.getFacets().put("caption", caption);
- caption.setValue("Caption");
- dataTable.getAttributes().put("captionClass", "captionClass");
- dataTable.getAttributes().put("captionStyle", "captionStyle");
-
- dataTable.getAttributes().put("rowClasses", "row1,row2");
- dataTable.getAttributes().put("columnClasses", "column1,column2");
-
- column1.getAttributes().put("styleClass", "column1StyleClass");
- column2.getAttributes().put("styleClass", "");
-
- HtmlPage page = renderView();
- assertNotNull(page);
- // System.out.println(page.asXml());
-
- HtmlElement table = page.getHtmlElementById(dataTable
- .getClientId(facesContext));
- assertNotNull(table);
-
- List captions = table.getHtmlElementsByTagName("caption");
- assertNotNull(captions);
- assertEquals(1, captions.size());
- String classAttr = ((HtmlElement) captions.get(0))
- .getAttributeValue("class");
- assertTrue(classAttr.contains("captionClass"));
- classAttr = ((HtmlElement) captions.get(0)).getAttributeValue("style");
- assertTrue(classAttr.contains("captionStyle"));
-
- List bodies = table.getHtmlElementsByTagName("tbody");
- assertTrue(bodies.size() > 0);
- List trs = ((HtmlElement) bodies.get(0)).getHtmlElementsByTagName("tr");
- assertTrue(trs.size() > 0);
- HtmlElement tr = (HtmlElement) trs.get(0);
- assertNotNull(tr);
- classAttr = tr.getAttributeValue("class");
- assertTrue(classAttr.contains("row1"));
-
- List tds = tr.getHtmlElementsByTagName("td");
- assertTrue(tds.size() > 0);
- HtmlElement td = (HtmlElement) tds.get(0);
- assertNotNull(td);
- classAttr = td.getAttributeValue("class");
- assertTrue(classAttr.contains("column1"));
- assertTrue(classAttr.contains("column1StyleClass"));
- }
-
- /**
* Test SubTable component rendering.
*
* @throws Exception
Added: trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/DataTableRenderingTest.java
===================================================================
--- trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/DataTableRenderingTest.java (rev 0)
+++ trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/DataTableRenderingTest.java 2008-03-10 16:54:11 UTC (rev 6656)
@@ -0,0 +1,399 @@
+/**
+ * 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.Date;
+import java.util.Iterator;
+import java.util.List;
+
+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.HtmlOutputLink;
+import javax.faces.component.html.HtmlOutputText;
+import javax.faces.model.ListDataModel;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColumn;
+import org.richfaces.component.UIColumnGroup;
+import org.richfaces.component.UIDataTable;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class DataTableRenderingTest extends AbstractAjax4JsfTestCase {
+
+ private UIDataTable dataTable;
+
+ private UIColumn column1;
+
+ private UIColumn column2;
+
+ private UIForm form = null;
+
+ private UIColumnGroup columnGroup;
+
+ /**
+ * Create the test case
+ *
+ * @param testName
+ * name of the test case
+ */
+ public DataTableRenderingTest(String name) {
+ super(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+
+ 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 = 1; i <= 5; i++) {
+ list.add(new Date((long) Math.random()));
+ }
+ dataTable.setValue(new ListDataModel(list));
+
+ columnGroup = (UIColumnGroup) application
+ .createComponent("org.richfaces.ColumnGroup");
+ dataTable.getChildren().add(columnGroup);
+
+ column1 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ UIOutput cellElement1 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ cellElement1.setValueExpression("column", new ColumnValueExpression());
+ column1.getChildren().add(cellElement1);
+ columnGroup.getChildren().add(column1);
+
+ column2 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ UIOutput cellElement2 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputLink.class.getName(),
+ null, null, null);
+ cellElement2.setValueExpression("value", new ColumnValueExpression());
+ column2.getChildren().add(cellElement2);
+ columnGroup.getChildren().add(column2);
+
+
+ form.getChildren().add(dataTable);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ column1 = null;
+ column2 = null;
+ columnGroup = null;
+ dataTable = null;
+ }
+
+ /**
+ * Test DataTable component rendering.
+ *
+ * @throws Exception
+ */
+ public void testRenderDataTable() throws Exception {
+
+ dataTable.getAttributes().put("columnsWidth", "400px,200px");
+
+ UIColumn column3 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ dataTable.getChildren().add(column3);
+ UIOutput text = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ text.setValue("Column");
+ column3.getChildren().add(text);
+ column3.setBreakBefore(true);
+
+ UIColumn column4 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ dataTable.getChildren().add(column4);
+ UIOutput text2 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ text.setValue("Column2");
+ column4.getChildren().add(text2);
+ column4.setRendered(false);
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ HtmlElement table = page.getHtmlElementById(dataTable
+ .getClientId(facesContext));
+ assertNotNull(table);
+ assertEquals("table", table.getNodeName());
+ String classAttr = table.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table rich-table"));
+
+ List<HtmlElement> elements = table.getHtmlElementsByTagName("col");
+ assertEquals(2, elements.size());
+ classAttr = ((HtmlElement) elements.get(0)).getAttributeValue("width");
+ assertTrue(classAttr.contains("400px"));
+ classAttr = ((HtmlElement) elements.get(1)).getAttributeValue("width");
+ assertTrue(classAttr.contains("200px"));
+
+ List<HtmlElement> bodies = table.getHtmlElementsByTagName("tbody");
+ assertEquals(1, bodies.size());
+ List<HtmlElement> trs = ((HtmlElement) bodies.get(0)).getHtmlElementsByTagName("tr");
+ assertTrue(trs.size() > 0);
+ HtmlElement tr = (HtmlElement) trs.get(0);
+ assertNotNull(tr);
+ classAttr = tr.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-firstrow rich-table-firstrow"));
+
+ Iterator<HtmlElement> tds = tr.getChildIterator();
+ assertTrue(tds.hasNext());
+ HtmlElement td = (HtmlElement) tds.next();
+ assertNotNull(td);
+ classAttr = td.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-cell rich-table-cell"));
+ }
+
+ /**
+ * Test DataTable component facets rendering.
+ *
+ * @throws Exception
+ */
+ public void testRenderDataTableFacets() throws Exception {
+
+ UIColumnGroup header1 = (UIColumnGroup) application
+ .createComponent("org.richfaces.ColumnGroup");
+ header1.getAttributes().put("columnClasses", "cola, colb");
+ dataTable.getFacets().put("header", header1);
+
+ UIColumn headerColumn1 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ UIOutput headerText1 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ headerText1.setValue("Header Column1");
+ headerColumn1.getChildren().add(headerText1);
+ header1.getChildren().add(headerColumn1);
+
+ UIOutput column1header = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ column1header.setValue("Column1 Header");
+ headerColumn1.getFacets().put("header", column1header);
+
+ UIColumn headerColumn2 = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ UIOutput headerText2 = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ headerText2.setValue("Header Column2");
+ headerColumn2.getChildren().add(headerText2);
+ header1.getChildren().add(headerColumn2);
+
+ UIOutput column2header = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ column2header.setValue("Column2 Header");
+ headerColumn2.getFacets().put("header", column2header);
+
+ UIOutput caption = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ dataTable.getFacets().put("caption", caption);
+ caption.setValue("Caption");
+
+ UIOutput footer = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ dataTable.getFacets().put("footer", footer);
+ footer.setValue("Footer");
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ HtmlElement table = page.getHtmlElementById(dataTable
+ .getClientId(facesContext));
+ assertNotNull(table);
+
+ List captions = table.getHtmlElementsByTagName("caption");
+ assertNotNull(captions);
+ assertEquals(1, captions.size());
+ String classAttr = ((HtmlElement) captions.get(0))
+ .getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-caption rich-table-caption"));
+
+ List headers = table.getHtmlElementsByTagName("thead");
+ assertNotNull(headers);
+ assertEquals(1, headers.size());
+ List trs = ((HtmlElement) headers.get(0))
+ .getHtmlElementsByTagName("tr");
+ assertTrue(trs.size() > 0);
+ HtmlElement tr = (HtmlElement) trs.get(0);
+ assertNotNull(tr);
+ classAttr = tr.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-header rich-table-header"));
+
+ Iterator<HtmlElement> tds = tr.getChildIterator();
+ assertNotNull(tds);
+ assertTrue(tds.hasNext());
+ HtmlElement td = tds.next();
+ assertNotNull(td);
+ classAttr = td.getAttributeValue("class");
+ assertTrue(classAttr
+ .contains("dr-table-headercell rich-table-headercell"));
+ assertTrue(classAttr.contains("cola"));
+
+ List footers = table.getHtmlElementsByTagName("tfoot");
+ assertNotNull(footers);
+ assertEquals(1, footers.size());
+ trs = ((HtmlElement) footers.get(0)).getHtmlElementsByTagName("tr");
+ assertTrue(trs.size() > 0);
+ tr = (HtmlElement) trs.get(0);
+ assertNotNull(tr);
+ classAttr = tr.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-footer rich-table-footer "));
+
+ tds = tr.getChildIterator();
+ assertTrue(tds.hasNext());
+ td = tds.next();
+ assertNotNull(td);
+ classAttr = td.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-table-footercell rich-table-footercell "));
+
+ Iterator fixedChildren = dataTable.fixedChildren();
+ assertNotNull(fixedChildren);
+ assertTrue(fixedChildren.hasNext());
+ }
+
+ /**
+ * Test DataTable component rows and columns rendering.
+ *
+ * @throws Exception
+ */
+ public void testRenderDataTableRowsAndColumns() throws Exception {
+
+ UIOutput caption = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ dataTable.getFacets().put("caption", caption);
+ caption.setValue("Caption");
+ dataTable.getAttributes().put("captionClass", "captionClass");
+ dataTable.getAttributes().put("captionStyle", "captionStyle");
+
+ dataTable.getAttributes().put("rowClasses", "row1,row2");
+ dataTable.getAttributes().put("columnClasses", "column1,column2");
+
+ column1.getAttributes().put("styleClass", "column1StyleClass");
+ column2.getAttributes().put("styleClass", "");
+
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ HtmlElement table = page.getHtmlElementById(dataTable
+ .getClientId(facesContext));
+ assertNotNull(table);
+
+ List captions = table.getHtmlElementsByTagName("caption");
+ assertNotNull(captions);
+ assertEquals(1, captions.size());
+ String classAttr = ((HtmlElement) captions.get(0))
+ .getAttributeValue("class");
+ assertTrue(classAttr.contains("captionClass"));
+ classAttr = ((HtmlElement) captions.get(0)).getAttributeValue("style");
+ assertTrue(classAttr.contains("captionStyle"));
+
+ List bodies = table.getHtmlElementsByTagName("tbody");
+ assertTrue(bodies.size() > 0);
+ List trs = ((HtmlElement) bodies.get(0)).getHtmlElementsByTagName("tr");
+ assertTrue(trs.size() > 0);
+ HtmlElement tr = (HtmlElement) trs.get(0);
+ assertNotNull(tr);
+ classAttr = tr.getAttributeValue("class");
+ assertTrue(classAttr.contains("row1"));
+
+ List tds = tr.getHtmlElementsByTagName("td");
+ assertTrue(tds.size() > 0);
+ HtmlElement td = (HtmlElement) tds.get(0);
+ assertNotNull(td);
+ classAttr = td.getAttributeValue("class");
+ assertTrue(classAttr.contains("column1"));
+ assertTrue(classAttr.contains("column1StyleClass"));
+ }
+
+ protected class ColumnValueExpression extends ValueExpression {
+
+ public Class<?> getExpectedType() {
+ return null;
+ }
+
+ public Class<?> getType(ELContext context) {
+ return String.class;
+ }
+
+ public Object getValue(ELContext context) {
+ return Long.toString(((Date) dataTable.getValue()).getTime());
+ }
+
+ public boolean isReadOnly(ELContext context) {
+ return false;
+ }
+
+ public void setValue(ELContext context, Object value) {
+
+ }
+
+ public boolean equals(Object obj) {
+ return false;
+ }
+
+ public String getExpressionString() {
+ return null;
+ }
+
+ public int hashCode() {
+ return 0;
+ }
+
+ public boolean isLiteralText() {
+ return false;
+ }
+
+ }
+
+}
Modified: trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java
===================================================================
--- trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java 2008-03-10 16:32:55 UTC (rev 6655)
+++ trunk/ui/dataTable/src/test/java/org/richfaces/renderkit/SortableHeaderRenderingTest.java 2008-03-10 16:54:11 UTC (rev 6656)
@@ -217,12 +217,16 @@
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"));
+ if (1 == spans.size()) { // inplace input is used
+ HtmlElement span = spans.get(0);
+ String clazz = span.getAttributeValue(HTML.class_ATTRIBUTE);
+ assertNotNull(clazz);
+ assertTrue(clazz.contains("rich-inplace-view"));
+ } else { // simple inputText
+ HtmlElement input = (HtmlElement) div.getFirstChild();
+ assertNotNull(input);
+ assertEquals(HTML.INPUT_ELEM, input.getTagName());
+ }
}
/**
@@ -233,7 +237,6 @@
public void testRenderFilteredData() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
- System.out.println(page.asXml());
HtmlElement table = page.getHtmlElementById(dataTable.getClientId(facesContext));
assertNotNull(table);
@@ -292,8 +295,6 @@
assertTrue(found);
}
}
- assertEquals(javaScripts.size(), foundCount);
-
}
protected class ColumnOneExpression extends ValueExpression {
16 years, 10 months
JBoss Rich Faces SVN: r6655 - Suite and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-03-10 12:32:55 -0400 (Mon, 10 Mar 2008)
New Revision: 6655
Modified:
trunk/test-applications/qa/Performance Suite/Performance Test Suite Blank.doc
Log:
Modified: trunk/test-applications/qa/Performance Suite/Performance Test Suite Blank.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6654 - trunk/samples/tree-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-10 12:04:37 -0400 (Mon, 10 Mar 2008)
New Revision: 6654
Modified:
trunk/samples/tree-demo/src/main/webapp/pages/index2.jsp
Log:
Update test for http://jira.jboss.com/jira/browse/RF-1629
Modified: trunk/samples/tree-demo/src/main/webapp/pages/index2.jsp
===================================================================
--- trunk/samples/tree-demo/src/main/webapp/pages/index2.jsp 2008-03-10 16:04:01 UTC (rev 6653)
+++ trunk/samples/tree-demo/src/main/webapp/pages/index2.jsp 2008-03-10 16:04:37 UTC (rev 6654)
@@ -21,16 +21,22 @@
<rich:tree switchType="client" style="width:300px"
- value="#{pathwayBean.pathwayTree}" var="item"
+ value="#{pathwayBean.pathwayTree}" var="item" treeNodeVar="treeNode"
nodeFace="#{item.type}">
<rich:treeNode type="library">
<h:outputText value="#{item.type}"/>
+ <h:outputText value="_" />
+ <h:outputText value="#{treeNode.data.type}" />
</rich:treeNode>
<rich:treeNode type="pathway">
<h:outputText value="#{item.name}"/>
+ <h:outputText value="-" />
+ <h:outputText value="#{treeNode.data.name}" />
</rich:treeNode>
<rich:treeNode type="organism">
<h:outputText value="#{item.name}"/>
+ <h:outputText value="+" />
+ <h:outputText value="#{treeNode.data.name}" />
</rich:treeNode>
</rich:tree>
16 years, 10 months
JBoss Rich Faces SVN: r6653 - in trunk/ui/tree/src/main: java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-10 12:04:01 -0400 (Mon, 10 Mar 2008)
New Revision: 6653
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
Log:
http://jira.jboss.com/jira/browse/RF-1629
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2008-03-10 15:56:08 UTC (rev 6652)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2008-03-10 16:04:01 UTC (rev 6653)
@@ -66,8 +66,13 @@
<name>rowKeyVar</name>
<classname>java.lang.String</classname>
<description>The attribute provides access to a row key in a Request scope</description>
- </property>
+ </property>
<property>
+ <name>treeNodeVar</name>
+ <classname>java.lang.String</classname>
+ <description>The attribute provides access to a TreeNode instance in a Request scope</description>
+ </property>
+ <property>
<name>componentState</name>
<classname>org.ajax4jsf.model.DataComponentState</classname>
<description>It defines EL-binding for a component state for saving or redefinition</description>
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-03-10 15:56:08 UTC (rev 6652)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-03-10 16:04:01 UTC (rev 6653)
@@ -35,6 +35,7 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;
import javax.faces.event.PhaseId;
+import javax.faces.model.DataModel;
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.component.UIDataAdaptor;
@@ -111,6 +112,13 @@
public final static String DEFAULT_HIGHLIGHTED_CSS_CLASS = "dr-tree-i-hl";
private UITreeNode defaultFacet;
+
+ /**
+ * Name of EL variable for the tree node.
+ * This reference is needed to let this parent class
+ * know about the attributes defined in the subclass
+ */
+ private String _treeNodeVar;
public UITree() {
super();
@@ -124,6 +132,24 @@
}
/**
+ * Get name of EL variable for the tree node.
+ *
+ * @return the varState
+ */
+ public String getTreeNodeVar() {
+ return _treeNodeVar;
+ }
+
+ /**
+ * Set the name of EL variable
+ *
+ * @param treeNodeVar the varStatus to set
+ */
+ public void setTreeNodeVar(String treeNodeVar) {
+ this._treeNodeVar = treeNodeVar;
+ }
+
+ /**
* Lazily creates default node representation that is used if there is no
* {@link UITreeNode} child for that nodeFace
*
@@ -276,6 +302,34 @@
return getOrCreateDefaultFacet();
}
+
+ /**
+ * Setup EL variable for different iteration. Value of row tree node
+ * is put into request scope attributes with name "treeNodeVar" bean
+ * property. All other attributes are processed in parent
+ * <code>UIDataAdaptor</code> class
+ *
+ * @param faces - current faces context
+ * @param localModel - reference to data model
+ * @param rowSelected - boolean flag indicating whether the row is selected
+ */
+ protected void setupVariable(FacesContext faces, DataModel localModel, boolean rowSelected) {
+ super.setupVariable(faces, localModel, rowSelected);
+ // get the map storing the request scope attributes
+ Map<String, Object> attrs = faces.getExternalContext().getRequestMap();
+
+ String treeNodeVar = getTreeNodeVar();
+ if (rowSelected) {
+ // Current row tree node.
+ if (treeNodeVar != null) {
+ attrs.put(treeNodeVar, getTreeNode());
+ }
+ } else {
+ if (treeNodeVar != null) {
+ attrs.remove(treeNodeVar);
+ }
+ }
+ }
/*
* (non-Javadoc)
16 years, 10 months
JBoss Rich Faces SVN: r6652 - Plan/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-03-10 11:56:08 -0400 (Mon, 10 Mar 2008)
New Revision: 6652
Modified:
trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
Log:
update
Modified: trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6651 - Plan/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-03-10 11:36:47 -0400 (Mon, 10 Mar 2008)
New Revision: 6651
Modified:
trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
Log:
Modified: trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6650 - in trunk/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-10 11:08:28 -0400 (Mon, 10 Mar 2008)
New Revision: 6650
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
strut is deleted
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-10 15:08:13 UTC (rev 6649)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-10 15:08:28 UTC (rev 6650)
@@ -4,7 +4,7 @@
Richfaces.InplaceInput.prototype = {
- initialize: function(clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events, classes, barParams) {
+ initialize: function(clientId, temValueKeepId, valueKeepId, tabberId, attributes, events, classes, barParams) {
this.inplaceInput = $(clientId);
this.inplaceInput.component = this;
@@ -12,7 +12,6 @@
this.valueKeeper = $(valueKeepId);
this.attributes = attributes;
this.tabber = $(tabberId);
- //this.strut = $(strutId);
this.events = events;
this.classes = classes;
@@ -186,7 +185,6 @@
this.tabber.hide();
this.tempValueKeeper.show();
- //this.setStrutWidth(textSize);
this.inplaceInput.className = this.classes.COMPONENT.EDITABLE;
if (this.bar) {
@@ -199,12 +197,6 @@
this.tempValueKeeper.focus();
},
- /*setStrutWidth : function(textSize) {
- this.tempValueKeeper.show();
- this.strut.style.width = textSize + "px";
- this.strut.show();
- },*/
-
startViewState : function() {
this.deleteViewArtifacts();
this.changeState(Richfaces.InplaceInput.STATES[0]);
@@ -212,8 +204,6 @@
this.createNewText(this.currentText);
this.inplaceInput.className = this.classes.COMPONENT.VIEW.NORMAL;
this.inplaceInput.observe("mouseover", function(e){this.inplaceMouseOverHandler(e);}.bindAsEventListener(this));
-
- //this.strut.hide();
},
startChangedState : function () {
@@ -224,7 +214,6 @@
//this.createNewText(this.valueKeeper.value);
this.createNewText(this.currentText);
this.inplaceInput.className = this.classes.COMPONENT.CHANGED.NORMAL;
- //this.strut.hide();
},
/**
@@ -320,14 +309,14 @@
},
deleteViewArtifacts : function () {
- var text = this.inplaceInput.childNodes[5];
+ var text = this.inplaceInput.childNodes[4];
if (text) {
this.inplaceInput.removeChild(text);
}
},
getCurrentText : function() {
- return this.inplaceInput.childNodes[5];
+ return this.inplaceInput.childNodes[4];
},
createNewText : function(text) {
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-10 15:08:13 UTC (rev 6649)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-10 15:08:28 UTC (rev 6650)
@@ -60,7 +60,6 @@
<span id="#{clientId}" class='rich-inplace rich-inplace-view #{component.attributes["styleClass"]}'
x:passThruWithExclusions="id,styleClass,class,style">
<input id="#{clientId}tabber" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" />
- <!-- img id="#{clientId}strut" src="#{spacer}" class="rich-inplace-input-strut"/-->
<input id='#{clientId}tempValue'
class='rich-inplace-field'
style='display:none;'
@@ -150,7 +149,7 @@
#{this:encodeInplaceInputCss(context, component)};
var inplaceInput = new Richfaces.InplaceInput('#{clientId}', '#{clientId}tempValue', '#{clientId}value', '#{clientId}tabber',
- '#{clientId}strut', attributes, events, classes, ['#{clientId}bar',
+ attributes, events, classes, ['#{clientId}bar',
'#{clientId}ok', '#{clientId}cancel', '#{clientId}buttons','#{clientId}btns_shadow']);
</script>
</f:root>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6649 - in trunk/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-10 11:08:13 -0400 (Mon, 10 Mar 2008)
New Revision: 6649
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
strut is deleted
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-10 14:42:18 UTC (rev 6648)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-10 15:08:13 UTC (rev 6649)
@@ -1,9 +1,9 @@
if(!window.Richfaces) window.Richfaces = {};
Richfaces.InplaceSelect = Class.create(Richfaces.InplaceInput, {
- initialize : function($super, listObj, clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events, classes, barParams, buttonId) {
+ initialize : function($super, listObj, clientId, temValueKeepId, valueKeepId, tabberId, attributes, events, classes, barParams, buttonId) {
this.comboList = listObj;
this.button = $(buttonId);
- $super(clientId, temValueKeepId, valueKeepId, tabberId, strutId, attributes, events, classes, barParams);
+ $super(clientId, temValueKeepId, valueKeepId, tabberId, attributes, events, classes, barParams);
this.clickOnBar = false;
this.button.style.top = Richfaces.getBorderWidth(this.tempValueKeeper, "t") + "px";
@@ -135,15 +135,13 @@
},
deleteViewArtifacts : function () {
- var text = this.inplaceInput.childNodes[7];
+ var text = this.inplaceInput.childNodes[6];
if (text) {
this.inplaceInput.removeChild(text);
}
},
getCurrentText : function() {
- return this.inplaceInput.childNodes[7];
+ return this.inplaceInput.childNodes[6];
}
-
- //setStrutWidth : function() {}
});
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-10 14:42:18 UTC (rev 6648)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-10 15:08:13 UTC (rev 6649)
@@ -64,7 +64,6 @@
<span id="#{clientId}" class="rich-inplace-select-view"
x:passThruWithExclusions="id,styleClass,class,style">
<input id="#{clientId}tabber" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" />
- <img id="#{clientId}inplaceStrut" src="#{spacer}" class="rich-inplace-select-strut"/>
<input id="#{clientId}inplaceTmpValue"
type="text"
style='display:none;'
@@ -182,7 +181,7 @@
Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '#{component.attributes["listWidth"]}', '#{component.attributes["listHeight"]}', #{this:getItemsTextAsJSArray(context, component)}, null,
'#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0, 0);
var richInplaceSelect = new Richfaces.InplaceSelect(richInplaceList, '#{clientId}', '#{clientId}inplaceTmpValue',
- '#{clientId}inplaceValue', '#{clientId}tabber', '#{clientId}inplaceStrut',
+ '#{clientId}inplaceValue', '#{clientId}tabber',
richInplaceSelAttributes, richInplaceSelEvents, Richfaces.InplaceSelect.CLASSES,
['#{clientId}bar', '#{clientId}ok', '#{clientId}cancel', '#{clientId}buttons', '#{clientId}btns_shadow'], '#{clientId}inselArrow');
</script>
16 years, 10 months