The TabGroup has a @DirectLink to change the state: minimized/maximized.

Home.html:
<span jwcid="@For" source="ognl:items" value="ognl:item">
 <span jwcid="@Util:TabGroup" title="ognl:item.name"/>
</span>


TabGroup.html:
<span jwcid="@If" condition="ognl:!minimized">
 <a jwcid="@DirectLink" parameters="ognl:minimized"
listener="ognl:listeners.lnkActionToggleGroup">
   <span jwcid="@Insert" value="ognl:title"/>
 </a>
</span>

TabGroup.jwc:
<component-specification class="TabGroup" allow-body="yes"
allow-informal-parameters="no">
 <parameter name="title" required="yes" cache="false"/>
</component-specification>

TabGroup.java:
public abstract class TabGroup extends BaseComponent implements
PageAttachListener, IFormComponent {

   public abstract String getTitle();

   @Persist("client")
   public abstract boolean getMinimized();

   public void lnkActionToggleGroup(boolean minimized) {
       setMinimized(!minimized);
   }
   ...
}


For example if I create 2 TabGroups *without* the @For loop they are
rendered like this:
$TabGroup
$TabGroup_0

But if I create them *with* the @For loop, I get the component twice:
$TabGroup
$TabGroup

--> both are the same component and thus if I click on the DirectLink
of the first component, the second gets minimized too.

Greetings
Reto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to