[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Hi,
Sorry if this question is too basic, but I am not able to find the answer.
I am able to read all the properties of an instance of Species.SpeciesClass class in a document with this code:
#set($obj = $doc.getObject("Species.SpeciesClass").xWikiClass) #foreach($prop in $obj.properties) *${prop.prettyName}:* $doc.display($prop.getName())<br/> #end
But, please, how could I read a single, let's say, Genrus property of this object?
$obj.Genrus -- supports l10n or key-value properties $obj.getProperty("Genrus").value -- raw value $doc.display("Genrus") -- supports automatic forms (the view/inline switch) and there are others, but these are the most important. By the way, you should use $doc.use($obj) before the foreach... -- Sergiu Dumitriu http://purl.org/net/sergiu/