I'm trying to use the new For component within a Form, and I'm running into a strange
error. I have some generic code which renders an edit form based on custom annotations
I've added to my persistent objects to drive the property names, labels, etc. The source
for the For component is a List of my custom Property annotations. Right now, it looks
something like:
<form jwcid="[EMAIL PROTECTED]">
<table>
<tr jwcid="@For" source="ognl:properties" value="ognl:prop" element="tr">
<td align="right">
<strong><span jwcid="@Insert" value="ognl:prop.label()"/>:
</td>
<td>
<span jwcid="@RenderBlock" block="ognl:blockForProperty"/>
<span jwcid="[EMAIL PROTECTED]">
<input jwcid="@TextField" value="ognl:object[prop.name()]"/>
</span>
...
<span jwcid="[EMAIL PROTECTED]">
<span jwcid="@Insert" value="ognl:prop.name()"/>
</span>
</td>
</tr>
</table>
</form>
If I use the Foreach component in the above loop over my Property annotations, everything
works fine. If I use the For component, however, I get a strange error when I submit the
form (*extremely* long string shortened by me):
Unable to convert
ZH4sIAAAAAAAAAH2RPUsDQRCG584EvwJJChU7G7G7A7FLoRIICZzRRguxcHI38U43u8fu5rwT9N/Y+SMids...
back into an object in For component.
Unable to decode stream: java.lang.NullPointerException
java.lang.NullPointerException
Stack Trace:
*
org.apache.tapestry.util.io.ResolvingObjectInputStream.resolveClass(ResolvingObjectInputStream.java:50)
* java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
* java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
* java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1502)
* java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
* java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
* java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
* java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
*
org.apache.tapestry.util.io.SerializableAdaptor.unsqueeze(SerializableAdaptor.java:125)
...
If I look at the page source, there are two hidden values with the name "$For":
<input type="hidden" name="$For" value="V"/>
<input type="hidden" name="$For"
value="ZH4sIAAAAAAAAAH2RPUsDQRCG584EvwJJChU7G7G7A7FLoRIICZzRRguxcHI38U43u8fu5rwT9N/Y+SMids..."/>
Anyone have any idea what's going on? Could it be some kind of converter problem since
I'm using raw Annotation objects in my source list?
Dustin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]