webwork/src/main/webwork/util BeanUtil.java,1.38,1.39
[email protected] Mon, 17 Nov 2003 16:55:39 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/util
In directory sc8-pr-cvs1:/tmp/cvs-serv21531/src/main/webwork/util
Modified Files:
BeanUtil.java
Log Message:
Fix for getIndexedPropertyIndex to handle new parser
Index: BeanUtil.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/util/BeanUtil.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- BeanUtil.java 13 Nov 2003 02:04:16 -0000 1.38
+++ BeanUtil.java 18 Nov 2003 00:55:37 -0000 1.39
@@ -457,7 +457,7 @@
}
else if (pe instanceof ValidationEditorSupport)
{
- ((ValidationEditorSupport) pe).setValue(obj);
+ pe.setValue(obj);
result = pe.getAsText();
}
else
@@ -480,7 +480,7 @@
*/
private static Integer getIndexedPropertyIndex(QuerySegment curSegment)
{
- Integer index = null;
+ Integer index;
try
{
List values = curSegment.getValues();
@@ -488,7 +488,15 @@
{
throw new IllegalArgumentException("Only Indexed properties allowed!");
}
- index = new Integer(values.get(0).toString());
+ Object value = values.get(0);
+ if(value instanceof Query)
+ {
+ index = new Integer(((Query)value).getSegments()[0].getValues().get(0).toString());
+ }
+ else
+ {
+ index = new Integer(values.get(0).toString());
+ }
} catch (Exception e)
{
throw new IllegalArgumentException("Only Indexed properties allowed! - Parameter must be an integer ");
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl