Hi, I need some help on how fade out a Zone. I kinda stumped on how to
do this.
I have a select component paired with a zone. If a certain value in the
selected then the zone will render. What I'm having trouble with is when
the user another value after rendering the zone. It won't remove the zone.
My tml looks like this:
<div class="control-group">
<label class="control-label">Root Cause</label>
<div class="controls">
<t:select t:id="rootCause" value="rootCause"
model="rootCauseSelectModel" encoder="RootCauseEncoder"
t:zone="rootCauseMetaZone"/>
</div>
</div>
<t:zone t:id="rootCauseMetaZone" t:visible="false"
t:update="fade">
<t:if test="isOtherRootCause">
<div class="control-group">
<label class="control-label">Specify Other Root
Cause</label>
<div class="controls">
<input type="text"/>
</div>
</div>
</t:if>
</t:zone>
A onValueChangeFromRootCause() function makes is appear but not disappear.
@InjectComponent
private Zone rootCauseMetaZone;
@Inject
private Request request;
@Property
private boolean isOtherRootCause = false;
public Object onValueChangedFromRootCause(GuidanceRootCauses
rootCause){
if(rootCause.getLabel().equals("Others")){
isOtherRootCause = true;
return rootCauseMetaZone.getBody();
}
isOtherRootCause = false;
return rootCauseMetaZone.getBody();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org