Dev at weitling wrote:
Hi folks,

I want to reach the higher level of cform binding zen, but can't find
enough information.
The questions bothering me are at least:
- What does e.g. <fb:value id="id" path="@id"/> mean? Does it make any
sense in Java-binding?

I believe that in Java binding, path="id" and path="@id" are equivalent.

You can find a lot of information about the details of how the binding works from the documentation on the JXPath site: http://jakarta.apache.org/commons/jxpath/ -- JXPath is what interprets the path attribute to traverse whatever object you're binding to/from, so understanding how JXPath works will help you understand the binding framework.

- The path attribute always maps to a member or a get/set-style method
of a bean. What if I have a method name in other style e.g. list() or
iterator()? What if I have a method which needs an argument?

Out of the box JXPath only supports certain object structures: JavaBean getters/setters, collections, arrays, DOMs... maybe a few others but they're all commonly-used standard patterns. It does appear to have some support for custom xpath functions: http://jakarta.apache.org/commons/jxpath/users-guide.html#Extension_Functions so you may be able to use that to call your custom methods.

- Imagine I have an object containing three lists: The first holds
information which key items are displayed and in which order. The others
have data handled by two repeaters which should display according to the
order of their keys in the first list. I have a knot in my brain till now...

It sounds to me like you actually want to have your form definition and binding XML be dynamically generated using the first list; then when the binding is executed it doesn't have to do anything special since the repeater widgets already line up with the keys.

- How to do it when I have a HashMap (key -> data) and I want to display
the keys as well as their data?

Can you give more details... doesn't the binding already have to know the key to get at the value?

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

Reply via email to