Author: sdzmitrovich
Date: 2008-01-11 10:16:46 -0500 (Fri, 11 Jan 2008)
New Revision: 5622
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1548/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1548/JBIDE-1548.jsp
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1548
was resolved issue, was added test
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2008-01-11
15:14:45 UTC (rev 5621)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2008-01-11
15:16:46 UTC (rev 5622)
@@ -417,7 +417,7 @@
* @param visualNode
* @return
*/
- private nsIDOMElement getMaxValueElement(nsIDOMElement visualNode) {
+ private nsIDOMNode getMaxValueElement(nsIDOMElement visualNode) {
nsIDOMElement table = visualNode;
nsIDOMNodeList tableList = table.getChildNodes();
nsIDOMNode tr = tableList.item(0);
@@ -425,8 +425,7 @@
nsIDOMNode td1 = trList.item(1);
nsIDOMNodeList td1List = td1.getChildNodes();
nsIDOMNode maxValue = td1List.item(0);
- nsIDOMElement maxValueElement = (nsIDOMElement)
maxValue.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- return maxValueElement;
+ return maxValue;
}
/**
@@ -434,7 +433,7 @@
* @param visualNode
* @return
*/
- private nsIDOMElement getMinValueElement(nsIDOMElement visualNode) {
+ private nsIDOMNode getMinValueElement(nsIDOMElement visualNode) {
nsIDOMElement table = visualNode;
nsIDOMNodeList tableList = table.getChildNodes();
nsIDOMNode tr = tableList.item(0);
@@ -442,13 +441,7 @@
nsIDOMNode td1 = trList.item(0);
nsIDOMNodeList td1List = td1.getChildNodes();
nsIDOMNode minValue = td1List.item(0);
- nsIDOMElement minValueElement = null;
- try {
- minValueElement = (nsIDOMElement)
minValue.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- } catch (org.mozilla.xpcom.XPCOMException e) {
- return null; // It could happen if source code doesn't have such element.
- }
- return minValueElement;
+ return minValue;
}
/**
@@ -509,7 +502,7 @@
* @param sourceNode
*/
public void setMaxValue(nsIDOMElement visualNode, Element sourceNode) {
- nsIDOMElement maxValue = getMaxValueElement(visualNode);
+ nsIDOMNode maxValue = getMaxValueElement(visualNode);
if (maxValue != null) {
if (getAttribute(SLIDER_SHOWBOUNDARY_ATTR, sourceNode)
.equalsIgnoreCase("false")) {
@@ -533,7 +526,7 @@
* @param sourceNode
*/
public void setMinValue(nsIDOMElement visualNode, Element sourceNode) {
- nsIDOMElement minValue = getMinValueElement(visualNode);
+ nsIDOMNode minValue = getMinValueElement(visualNode);
if (minValue != null) {
if (getAttribute(SLIDER_SHOWBOUNDARY_ATTR, sourceNode)
.equalsIgnoreCase("false")) {
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1548/JBIDE-1548.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1548/JBIDE-1548.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1548/JBIDE-1548.jsp 2008-01-11
15:16:46 UTC (rev 5622)
@@ -0,0 +1,18 @@
+<%@ taglib
uri="http://richfaces.org/rich" prefix="rich" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<html>
+<head>
+</head>
+<body>
+
+<f:view>
+
+<rich:inputNumberSlider/>
+
+<rich:inputNumberSlider minValue="-10" maxValue="200"
value="40"/>
+
+</f:view>
+</body>
+</html>
\ No newline at end of file