If you only need string return values there is a workaround described here: http://old.nabble.com/macro-question-td23105606.html Better than nothing I guess. Cheers, Olaf
________________________________ Von: Scott Serr <[email protected]> An: [email protected] Gesendet: 15:51 Mittwoch, 28.September 2011 Betreff: [xwiki-users] data model and velocity
I have a data model that follow this page structure:
Detectors -> Detector1 -> Detector1History1 -> Detector1History2 -> Detector2
(Implemented with my DetectorClass and DetectorHistoryClass)
The Detectors is like a dashboard for Detectors and their history. It's mostly working. My issue is that my Velocity code on that top dashboard page is looking pretty ugly. It has nested loops and I don't know how to do any encapsulation. If I could do things like detector1.getNewestHistory() that would be very helpful. But my Detector Object Class is limited to what I can define in XWiki. To my knowledge, XWiki's "user defined" classes aren't able to encapsulate code. Am I wrong?
It seems like defining my Velocity macros would help, but my understanding is a macro can't return anything, just evaluates to output.
If I'm wrong-headed, please correct me.
Thanks, Scott _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users