Author: yradtsevich
Date: 2009-02-11 08:38:39 -0500 (Wed, 11 Feb 2009)
New Revision: 13581
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
Log:
RESOLVED - issue JBIDE-3777: Incorrect position of rich:dataScroller
https://jira.jboss.org/jira/browse/JBIDE-3777
- Support of the attribute 'align' has been added
- JUnit test has been modified
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2009-02-11
11:04:02 UTC (rev 13580)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2009-02-11
13:38:39 UTC (rev 13581)
@@ -125,7 +125,12 @@
*/
creationData.addChildrenInfo(new VpeChildrenInfo(div));
- div.setAttribute(HTML.ATTR_ALIGN, HTML.VALUE_ALIGN_CENTER);
+ String align = sourceElement.getAttribute(RichFaces.ATTR_ALIGN);
+ if (align == null) {
+ align = HTML.VALUE_ALIGN_CENTER;
+ }
+ div.setAttribute(HTML.ATTR_ALIGN, align);
+
div.setAttribute(HTML.ATTR_CLASS, styleClass);
if (ComponentUtil.isNotBlank(style)) {
div.setAttribute(HTML.ATTR_STYLE, style);
@@ -138,7 +143,6 @@
table.appendChild(tbody);
div.appendChild(table);
- table.setAttribute(HTML.ATTR_ALIGN, HTML.VALUE_ALIGN_CENTER);
table.setAttribute(HTML.ATTR_CLASS, tableStyleClass);
if (ComponentUtil.isNotBlank(tableStyle)) {
table.setAttribute(HTML.ATTR_STYLE, tableStyle);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml 2009-02-11
11:04:02 UTC (rev 13580)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml 2009-02-11
13:38:39 UTC (rev 13581)
@@ -11,7 +11,7 @@
<body>
<h:form>
<h1>datascroller</h1>
- <rich:datascroller id="datascroller" for="dataTable"
align="top" >
+ <rich:datascroller id="datascroller" for="dataTable"
align="right" >
</rich:datascroller>
<rich:dataTable cellpadding="0" cellspacing="0"
width="700" border="0"
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2009-02-11
11:04:02 UTC (rev 13580)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2009-02-11
13:38:39 UTC (rev 13581)
@@ -1,7 +1,7 @@
<tests>
<test id="datascroller">
- <DIV ALIGN="center" CLASS="rich-datascr">
- <TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
ALIGN="center"
+ <DIV ALIGN="right" CLASS="rich-datascr">
+ <TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
CLASS="rich-dtascroller-table">
<TBODY>
<TR>