Thanks Joerg,

That worked fine for populating the form with values.  The jury is still out on whether the changed values are getting back into the bean.  Some problems I need to track down in the java code.  No Exception on the form.save(bean) though.

Thanks

Mark



Joerg Heinicke <[EMAIL PROTECTED]>

04/27/2004 12:07 PM
Please respond to users

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Re: Problem binding Woody form to Map entries in Bean



On 27.04.2004 18:18, [EMAIL PROTECTED] wrote:

> Hi,
>
> I am having a problem I hope someone can help me with.  I have a Bean with
> a Map of metadata in it and I want to be able to create a Woody form to
> update the metadata.  The Map keys are all strings and there is a
> getMetaData(String key) method.
> I have been able to bind to Map entries with:
>
>         <value id="foo" path="./metaData/foo"/>
>
> The problem is some of the Map key strings have spaces in them.  For
> example
>
>         <value id="foo" path="./metaData/Creation Date"/>
>
> Which results in a JXPathException due to an invalid XPath.
>
> Can anybody suggest how I can make this work?

http://jakarta.apache.org/commons/jxpath/users-guide.html#Map%20Element%20Access

alternative syntax:

"[EMAIL PROTECTED]'home']/zipCode"

So for your example it would probably be

<value id="foo" path="./[EMAIL PROTECTED] = 'Creation Date']"/>

But no guarantee that this also works on saving the value back to the
bean. Try it out if you get a JXPathException then too.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to