cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject RE: Request for a small change in CustomJXPathBinding
Date Mon, 16 Aug 2004 10:49:57 GMT
I've created a patch for an (IMO) improvement to custom bindings. A
custom binding can set a value that was null before setting it
(currently an JXPathException is thrown when CustomJXPathBinding is
trying to create a relative context).

Also, custom bindings can get access to a service manager.

Can someone give his opinion about it?

Thanks,
Bart.

PS if this is a good patch, I can also refactor the sample.

-----Original Message-----
From: Ralph Goers [mailto:Ralph.Goers@dslextreme.com] 
Sent: Friday, August 13, 2004 3:22 AM
To: dev@cocoon.apache.org
Subject: Re: Request for a small change in CustomJXPathBinding

I'd suggest you write a patch and then submit it via bugzilla.

Ralph

At 8/12/2004  06:21 AM, you wrote:
>Hi all,
>
>Three days ago, I posted an email [1] with a small change request in
>custom binding. There is IMO a small problem when trying to bind a
value
>on a bean that is null (ie. the value is null before saving it in a
>binding). The following line in CustomJXPathBinding.java:68 throws an
>exception:
>JXPathContext context =
>jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
>
>This is because the property in the bean is null. My proposal was to
>pass the original context (ie. jxpc) along with the xpath string to the
>custom binding. This gives more flexibility, e.g. for me, I let users
>select a key on a form, then I want to use the binding to find some
>persistent object using the key (and setting that object inside the
>bean).
>
>Secondly, I proposed to pass the service manager from the
>CustomJXPathBindingBuilder's assistant to the custom bindigs.
>
>Would this be a good change? Or do I need to implement my own binding,
>to realize my requirements?
>
>I (think) can do the changes myself, I already looked at it.
>
>Bart.
>
>[1] http://www.mail-archive.com/dev@cocoon.apache.org/msg20645.html


Mime
View raw message