Vita Rara: A Life Uncommon

nested components

Hi,

I am trying to create a custombuttonbar component which can house one or more nested custombutton components. I have created three ftls,

  • custombuttonbar.ftl
  • custombuttonbar-close.ftl
  • custombutton.ftl

my code looks something like this... (skipping the unnecessary details)

<s:component template="custombuttonbar.ftl">
    <s:component template="custombutton.ftl"/>
</s:component>

but with this, the ftls are firing in a weird order. custombutton.ftl fires first. then custombuttonbar.ftl and the custombuttonbar-close.ftl does not fire at all! So i have temporarily written this in the ugly form

<s:component template="custombuttonbar.ftl"/>
<s:component template="custombutton.ftl"/>
<s:component template="custombuttonbar-close.ftl"/>

Hope someone can help me solve this problem..

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options