Hello
I have problems with rendering XML.
In my web app I have 2 classes:
andCode:class Vprasanje { String naziv; String besedilo; Boolean flag Date dateCreated; Date lastUpdated; static hasMany = [operandi: Operand] static constraints = { flag(blank: false, nullable: false) naziv(blank: false, nullable: false) besedilo(blank: false, nullable: false) } }
Then in VprasanjeController in list I have this:Code:class Operand { String ukaz Boolean tip static belongsTo = [vprasanje:Vprasanje] static constraints = { ukaz(nullable: false, blank: false) tip(nullable: false, blank: false) } }
and in XML response I get XML like this:Code:def listXML = { render Vprasanje.findAllByFlag(true) as XML }
Now I would like to have full operand review in XML response. How to make this ? Any suggestions ?Code:<list> − <vprasanje id="1"> <besedilo>To je moje novo vprasanje.</besedilo> <dateCreated>2010-09-09 14:42:56.775 CEST</dateCreated> <flag>true</flag> <lastUpdated>2010-09-09 14:42:56.775 CEST</lastUpdated> <naziv>Vprasanje 1 </naziv> − <operandi> <operand id="1"/> <operand id="2"/> </operandi> </vprasanje> </list>
Thanks, Simon


Reply With Quote