I've done this a lot of times - just like you describe...
First, try
<div jwcid="[EMAIL PROTECTED]" id="personDetailsEditToggle">
or
<div jwcid="[EMAIL PROTECTED]:Id">
instead of 
<span jwcid="@Any" id="personDetailsEditToggle">

Also, try to use a tool (FireBug) to capture the Ajax response 
and see what gets included there...

>From Kevin Fightmaster <[EMAIL PROTECTED]>:

> I wanted to know if the following is possible:
> 
> Have an AjaxDirectLink call a listener which sets a boolean attribute.
>     Then the binding "updateComponents" for the AjaxDirectLink identifies
> two 'If' components.
>         Each of the 'If' components has their condition set to check the
> boolean attribute.
>             Finally the 'If' statement that matches the condition renders
> itself.
> 
> 
> In my code, I can verify that the listener method for the AjaxDirectLink is
> called. I've verified that the boolean attribute is modified correctly.
> However I can't seem to get the 'If' components to update themselves.
> 
> ------------------------
> PAGE
> ------------------------
> 
> <component id="toggleEdit" type="tacos:AjaxDirectLink">
>   <binding name="listener" value="listener:toggleEdit"/>
>   <binding name="updateComponents" value="ognl:{'personDetailsROToggle',
> 'personDetailsEditToggle'}" />
> </component>
> 
> <component id="personDetailsEdit" type="If" >
>   <binding name="condition" value="ognl:isEditable"/>
> </component>
> 
> <component id="personDetailsRO" type="Else" />
> 
> </component>
> 
> ------------------------
> HTML
> ------------------------
> 
> <span jwcid="@Any" id="personDetailsEditToggle">
>   <div jwcid="personDetailsEdit">
>     <form jwcid="personForm">
>         <div>
>           <span key="firstname">First Name</span>
>           <span><input jwcid="firstname"/></span>
>         </div>
>         {.... more of the same}
>     <br>
>     <input type="submit"/>
>     </form>
>   </div>
> </span>
> 
> <span jwcid="@Any" id="personDetailsROToggle">
>   <div jwcid="personDetailsRO">
>     <div>
>       <span key="firstname">First Name:</span>
>       <span><span jwcid="firstnameRO">Foo</span></span>
>     </div>
>      {... more of the same}
>   </div>
>   <div jwcid="toggleEdit"><span key="edit">[Edit]</span></div>
> </span>
> 
> ------------------------
> JAVA
> ------------------------
> *
> 
> public* *boolean* isEditable = *false*;
> **
> 
> *public void** toggleEdit() {
>     isEditable = !isEditable**;
> }*
> 
> **
> 
> ------------------------
> ENVIRONMENT
> ------------------------*
> *Tapestry - 4.0.2
> Tacos - 4-beta-2
> Dojo - 3+
> 
> 
> 
> Thanks for any help,
> 
> Kevin
> 


-- 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to