commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Michael Reilly <>
Subject [Jelly] Swing action objects
Date Fri, 28 Feb 2003 13:44:51 GMT
I have a question about using action objects in a loop, something

<panel name="libPanel" var="libPanel">
  <j:forEach var="item" items="${manager.managedObjects}">
    <j:set var="panelName" value="${item.ID}IconPNL"/>
    <j:set var="buttonName" value="${item.ID}IconBTN"/>
    <j:set var="buttonIcon" value="${manager.getIcon(item)}"/>
    <panel name="${panelName}" var="${panelName}">
        <gbc gridy="0" gridx="0" fill="none" anchor="center">
          <label text="${item.topCaption}"/>
        <gbc gridy="1" gridx="0" fill="none" anchor="center">
          <button name="${buttonName}" var="buttonName">
              <j:set var="tabTitle" value="${item.title}"/>
              <j:include uri="openContainerTab.xml" 
                         inherit="true" export="true"/>
          ${dccApp.registerButton( buttonName, buttonIcon, item )}
        <gbc gridy="2" gridx="0" fill="none" anchor="center">
          <label text="${item.bottomCaption}"/>

The "openContainerTab.xml" script needs to have the tab title
generated in the loop and saved for use when the button is
activated.  I don't think the <action> element is this robust.  Nor
can I see clearly how to accomplish this without creating Java
support (registerButton).  Am I missing something obvious?

Is there an opportunity here to enhance Jelly is some useful fashion?



View raw message