commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Aust <>
Subject Re: [betwixt] How can I make betwixt accept any attribute "id" as an element id?
Date Mon, 10 Jan 2005 09:31:02 GMT
Hi Jason,

Jason Wood schrieb:
> or if you don't want to make all primitive values attribute as the above
> will do ... in a .betwixt file write ...
> <?xml version='1.0' encoding='UTF-8' ?>
> <info>
> <element name='YourElementName'>
>   <attribute name='id' property='Id'/>
>   <addDefaults/>
> </element>
> </info>
> There ways to do this by code but, not familar with that approach.

I've created .betwixt text files and placed them in the directory 
containing the .class files. Each .betwixt is named like the 
corresponding class. This is what a file "Link.betwixt" looks like:

<?xml version='1.0' encoding='UTF-8' ?>
<element name='Link'>
   <attribute name='id' property='Id'/>

It's used for a class com.test.Link and is placed in directory com/test.

Unfortunately, I get a NPE each time I try to write a bean.

The line where the NPE occurs is

Object exp = idAttribute.getTextExpression().evaluate( context );

getTextExpression() returns null, thus the NPE. What do I have to do in 
order to solve this? Best regards,

-  Christian

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message