Vita Rara: A Life Uncommon

nested components

Hi,

I had exactly the same need as you. I found nothing consistent on nested content for Struts UI tags. It's a shame. So I used the "param" tag to embed the nested content, like this :

button-bar.ftl :

<div class="button-bar">
  <div class="buttonBarContainer">
    ${parameters.body?if_exists?html}
  </div>
</div>

example.jsp :

<s:component template="button-bar.ftl">
  <s:param name="body">
    <s:submit name="create" type="button" label="commons.action.create" />
  </s:param>
</s:component>

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