LS,
 
I am experimenting with mmbase and the taglib library.
 
I created four builders, one independant, one base and two who extend from the base adding both some extra fields.
I only added content to mmbase using the extended builders.
I created a posrel relation between the independant and the base builders.
 
so I have
 
1/ builder VFLPage extends object
2/ builder CNTVFL extends object
3/ buider CNTData extends CNTVFL
4/ builder CNTImage extends CNTVFL (adds field href on top of CNTVFL fields)
4/ posrel relation parent child between VFLPage & CNTVFL
 
In my jsp I have the folowing  
<mm:node number="$nnr">
<mm:related path="posrel,CNTVFL" fields ="posrel.pos,CNTVFL.number,CNTVFL.ctitle,CNTVFL.body"
     orderby="posrel.pos" >

   <CONTAINER type="data">
      <mm:field name="CNTVFL.ctitle">
        <mm:isnotempty>
          <TITLE><mm:write /></TITLE>
        </mm:isnotempty>
      </mm:field>  
      <mm:field name="CNTVFL.body">
        <mm:isnotempty>
          <TEXT><mm:write /></TEXT>
        </mm:isnotempty>
      </mm:field>  
   </CONTAINER>
</mm:related>
</mm:node>
 
The mm:related tag correctly returns all the nodes of type CNTData and CNTImage.
 
Questions :
 
1/ How can I access the addtional fields from CNTData and CNTImage. Some kind of casting ?
2/ I want to create different output withthe different types. How can I setup conditional tags or use the JSTL tags in conjunction with the mmbase tags ?
 
Kind regards,
 
Herman Reintke
 

Reply via email to