Author: yradtsevich
Date: 2008-12-05 14:10:47 -0500 (Fri, 05 Dec 2008)
New Revision: 12316
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
Log:
CODING IN PROGRESS - issue JBIDE-3279: rich:listShuttle bugs.
https://jira.jboss.org/jira/browse/JBIDE-3279
Item #1 has been fixed: Attributes sourceListWidth, targetListWidth, listsHeight don't
work
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-12-05
18:10:15 UTC (rev 12315)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-12-05
19:10:47 UTC (rev 12316)
@@ -803,33 +803,26 @@
// prepare lists attributes
- String listsHeightString = sourceElement
- .getAttribute(ATTR_LISTS_HEIGHT);
- try {
- Integer.parseInt(listsHeightString);
- listsHeight = listsHeightString;
- } catch (NumberFormatException e) {
+ listsHeight = sourceElement.getAttribute(ATTR_LISTS_HEIGHT);
+ if (listsHeight == null) {
listsHeight = DEFAULT_LIST_HEIGHT;
+ } else {
+ listsHeight = VpeStyleUtil.addPxIfNecessary(listsHeight);
}
- String sourceListWithString = sourceElement
- .getAttribute(ATTR_SOURCE_LIST_WIDTH);
- try {
- Integer.parseInt(sourceListWithString);
- sourceListsWidth = sourceListWithString;
- } catch (NumberFormatException e) {
+ sourceListsWidth = sourceElement.getAttribute(ATTR_SOURCE_LIST_WIDTH);
+ if (sourceListsWidth == null) {
sourceListsWidth = DEFAULT_LIST_WIDTH;
+ } else {
+ sourceListsWidth = VpeStyleUtil.addPxIfNecessary(sourceListsWidth);
}
-
- String targetListWithString = sourceElement
- .getAttribute(ATTR_TARGET_LIST_WIDTH);
- try {
- Integer.parseInt(targetListWithString);
- targetListsWidth = targetListWithString;
- } catch (NumberFormatException e) {
+
+ targetListsWidth = sourceElement.getAttribute(ATTR_TARGET_LIST_WIDTH);
+ if (targetListsWidth == null) {
targetListsWidth = DEFAULT_LIST_WIDTH;
+ } else {
+ targetListsWidth = VpeStyleUtil.addPxIfNecessary(targetListsWidth);
}
-
}
private void clearData() {
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml 2008-12-05
18:10:15 UTC (rev 12315)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml 2008-12-05
19:10:47 UTC (rev 12316)
@@ -13,7 +13,10 @@
<f:view>
<rich:listShuttle id="listShuttle"
sourceValue="#{person.source}"
- targetValue="#{person.target}" var="items"
targetListWidth="200"
+ targetValue="#{person.target}" var="items"
+ sourceListWidth="234"
+ targetListWidth="278"
+ listsHeight="245"
sourceCaptionLabel="source label" targetCaptionLabel="target
label">
<rich:column>
<f:facet name="header">
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2008-12-05
18:10:15 UTC (rev 12315)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2008-12-05
19:10:47 UTC (rev 12316)
@@ -7,7 +7,7 @@
</TR>
<TR>
<TD>
- <DIV CLASS="rich-shuttle-list-content" STYLE="width: 140px;
height: 140px;">
+ <DIV CLASS="rich-shuttle-list-content" STYLE="width: 234px;
height: 245px;">
<TABLE WIDTH="100%" CELLSPACING="0"
CELLPADDING="0">
<TR CLASS="">
<TH
@@ -101,7 +101,7 @@
</DIV>
</TD>
<TD>
- <DIV CLASS="rich-shuttle-list-content" STYLE="height:
140px;">
+ <DIV CLASS="rich-shuttle-list-content" STYLE="width: 278px;
height: 245px;">
<TABLE WIDTH="100%" CELLSPACING="0"
CELLPADDING="0">
<TR CLASS="">
<TH