You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/02/02 21:51:23 UTC
[CForms] Changing the JXPathBindingBase.java
Regularly I have a problem with NPEs in binding when the binding
references an ID which does not exist in the definition. The NPE is
thrown in ValueJXPathBinding.java, line 129. What I want to add is to
throw an Exception before depending on a null test on the widget.
Therefore the method should declare that it throws a checked exception.
Has anybody any objections against the change of
public abstract void doLoad(Widget frmModel, JXPathContext jxpc);
to
public abstract void doLoad(Widget frmModel, JXPathContext jxpc) throws
BindingException;
in org.apache.cocoon.woody.binding.JXPathBindingBase.java, line 149?
Joerg
Re: [CForms] Changing the JXPathBindingBase.java
Posted by Sylvain Wallez <sy...@apache.org>.
Geoff Howard wrote:
> Joerg Heinicke wrote:
>
>> On 02.02.2004 22:00, Tim Larson wrote:
>>
>>> BTW, I think there should be a check in each binding to make sure
>>> the widget is of the required type. Perhaps JXPathBindingBase
>>> should supply a method that the bindings could call to perform this
>>> check?
>>
>>
>> Sounds good. At the moment there are to many unexact error messages
>> not helpful for the users. The NPE was one example. The "strong
>> typing" for the widgets seems to be a good thing too.
>>
>> (I wonder why nearly nobody seems to care about Woody at the moment.
>> Are you all so much sunk in work at the moment?)
>
>
> for me, yes. and too far behind on woody to comment meaningfully (not
> in any way implying that any of my other comments are actually
> meaningful...)
For me, yes also. And I have lots of commits to do before the code
freeze :-/
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance - http://www.orixo.com
Re: [CForms] Changing the JXPathBindingBase.java
Posted by Geoff Howard <co...@leverageweb.com>.
Joerg Heinicke wrote:
> On 02.02.2004 22:00, Tim Larson wrote:
>
>> BTW, I think there should be a check in each binding to make sure the
>> widget is of the required type. Perhaps JXPathBindingBase should supply
>> a method that the bindings could call to perform this check?
>
>
> Sounds good. At the moment there are to many unexact error messages not
> helpful for the users. The NPE was one example. The "strong typing" for
> the widgets seems to be a good thing too.
>
> (I wonder why nearly nobody seems to care about Woody at the moment. Are
> you all so much sunk in work at the moment?)
for me, yes. and too far behind on woody to comment meaningfully (not
in any way implying that any of my other comments are actually
meaningful...)
Geoff
Re: [CForms] Changing the JXPathBindingBase.java
Posted by Joerg Heinicke <jo...@gmx.de>.
On 02.02.2004 22:00, Tim Larson wrote:
> BTW, I think there should be a check in each binding to make sure the
> widget is of the required type. Perhaps JXPathBindingBase should supply
> a method that the bindings could call to perform this check?
Sounds good. At the moment there are to many unexact error messages not
helpful for the users. The NPE was one example. The "strong typing" for
the widgets seems to be a good thing too.
(I wonder why nearly nobody seems to care about Woody at the moment. Are
you all so much sunk in work at the moment?)
Joerg
Re: [CForms] Changing the JXPathBindingBase.java
Posted by Tim Larson <ti...@keow.org>.
On Mon, Feb 02, 2004 at 09:51:23PM +0100, Joerg Heinicke wrote:
> Regularly I have a problem with NPEs in binding when the binding
> references an ID which does not exist in the definition. The NPE is
> thrown in ValueJXPathBinding.java, line 129. What I want to add is to
> throw an Exception before depending on a null test on the widget.
> Therefore the method should declare that it throws a checked exception.
>
> Has anybody any objections against the change of
> public abstract void doLoad(Widget frmModel, JXPathContext jxpc);
> to
> public abstract void doLoad(Widget frmModel, JXPathContext jxpc) throws
> BindingException;
> in org.apache.cocoon.woody.binding.JXPathBindingBase.java, line 149?
No objection here, just so you know somebody is listening.
BTW, I think there should be a check in each binding to make sure the
widget is of the required type. Perhaps JXPathBindingBase should supply
a method that the bindings could call to perform this check?
--Tim Larson
Re: [CForms] Changing the JXPathBindingBase.java
Posted by Joerg Heinicke <jo...@gmx.de>.
To make it clear: this "throws BindingException" bubbles up to the
Binding.java, so it's in fact a interface change.
Joerg
On 02.02.2004 21:51, Joerg Heinicke wrote:
> Regularly I have a problem with NPEs in binding when the binding
> references an ID which does not exist in the definition. The NPE is
> thrown in ValueJXPathBinding.java, line 129. What I want to add is to
> throw an Exception before depending on a null test on the widget.
> Therefore the method should declare that it throws a checked exception.
>
> Has anybody any objections against the change of
> public abstract void doLoad(Widget frmModel, JXPathContext jxpc);
> to
> public abstract void doLoad(Widget frmModel, JXPathContext jxpc) throws
> BindingException;
> in org.apache.cocoon.woody.binding.JXPathBindingBase.java, line 149?
>
> Joerg