Thanks. I've been using custom processors for a while however it adds a lot of unnecessary code which would be nice to have built in.
Is it possible to submit feature requests or submit code that would provide this capability? Cheers On Saturday, September 21, 2013, Willem jiang wrote: > I'm afraid current Camel doesn't implement this feature. > If you want to render the object as you want, I suggest you to write a > customer process for your object. > > > -- > Willem Jiang > > Red Hat, Inc. > Web: http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > (English) > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: 姜宁willem > > > > > On Sunday, September 22, 2013 at 5:34 AM, Jamie Archibald wrote: > > > I'm wondering if camel supports custom object renders (similar to log4j) > > when doing the simple expression language? Currently it appears it just > > calls toString() on the object > > > > for example. > > > > .log("Hello World ${body}"); > > > > > > Rather than calling ${body}.toString() I would like to have it call some > > external bean that knows how to render the object. > > > > For example > > > > MyCustomRenderer implement ICamelObjectRenderer { > > > > public String render(MyObject obj) > > { > > return obj.getName() + obj.getPhoneNumber(); > > } > > } > > > > > > > > -- > > Jamie > > > > -- Jamie