No this is not possible. And I think pos is defined as an integer? So the type would have to change to String, to allow you to specify the key of the property.
It kinda sucks as for people not using the placeholders, they want to know the types. pos = 1 If its a String then would need to type pos = "1" On Mon, Apr 15, 2013 at 8:15 AM, Okello Nelson <[email protected]> wrote: > Hi Guys, > > I'm using Bindy to unmarshall a CSV file. My model class looks something > like this: > > @CsvRecord( separator = "\\|", skipFirstLine = true) > @XmlRootElement( name = "SampleModel" ) > public class SampleModel { > > @DataField( pos = 1 ) > private String field1; > > @DataField( pos = 2 ) > private Date field2; > } > > > Whereas this works fine, I'd like to specify the value of the @DataField > annotation in an external file, and have it look like: > > @DataField( pos = "${field1.pos}") > private String field1; > > where "pos" takes the value of "${field1.pos}" as specified in an external > properties file, instead of specifying a value directly in the model class. > Is this possible? > > Kind Regards, > Okello Nelson. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
