- Isn't partialFor deprecated? I don't think it's supported any more
it'll probably go away sooner or later - use a normal @For.
- updateComponents should be used.
- Did you try
<binding name="updateComponents" value="ognl:{structuralPublishItem.name}"/>



Cypher ! wrote:

> Hi
>
> I am using tapestry 4 and the latest release of tacos but I am having
> a few problems with the updateComponents binding in the
> AjaxDirectlink. I have created a component with two nested PartialFor
> loops and I want to update the inner PartialFor when the
> AjaxDirectLink is clicked. Here is the code and as it is it does work
> but i am being forced to updated the div containing the outer loop
> rather than hust updating the inner loop. Trying to update that fails.
>
> A bit of background, the persistent layer is Cayenne (latest release)
> and all the objects are persistent.
>
> .html
>
> <div jwcid="structuralPublishItemsArea" id="structuralPublishItemsArea">
>     <span jwcid="@If" condition="ognl:structuralNode">
>         <div
> style="padding-bottom:10px;font-size:10pt;font-weight:bold;"><span
> jwcid="@Insert" value="ognl:structuralNode.structuralPath" /></div>
>         <span jwcid="foreachPublishItem">
>             <div jwcid="publishItemName"
> id="ognl:structuralPublishItem.name">
>                 <span jwcid="publishItemLink">
>                     <span jwcid="@Insert"
> value="ognl:structuralPublishItem.name" />
>                 </span>
>                 <span jwcid="@If" condition="ognl:isPublishItemSelected">
>                     <span jwcid="foreachPublishItemKeyValue">
>                         <div jwcid="@Any"
> class="ognl:beans.evenOdd.next">
>                             <span jwcid="@Insert"
> value="ognl:structuralPersistentKey" />&nbsp;
>                             <span jwcid="@Insert"
> value="ognl:structuralPublishItem.mergedDictionary.get(structuralPersistentKey)"
> />
>                         </div>
>                     </span>
>                 </span>
>             </div>
>         </span>
>     </span>
> </div>
>
>
> .jwc
>
>    <parameter name="dataContext" required="yes">
>         <description>Provides the dataContext for refetching the
> persistent objects.</description>
>     </parameter>
>
>     <parameter name="structuralNode" required="yes">
>        <description>
>            Structural node for which to get the publishItems from.
>        </description>
>    </parameter>
>
>    <property name="structuralPublishItem"/>
>
>    <property name="structuralPersistentKey"/>
>
>    <property name="selectedPublishItems" persist="session"
> initial-value="ognl:new java.util.HashMap()"/>
>
>    <component id="structuralPublishItemsArea" type="Any"
> inherit-informal-parameters="yes">
>        <binding name="element" value="literal:div"/>
>    </component>
>
>    <component id="foreachPublishItem" type="tacos:PartialFor">
>        <binding name="source"
>            value="ognl:structuralNode ?
> structuralNode.structuralMergedPublishItems : null"/>
>        <binding name="value" value="ognl:structuralPublishItem"/>
>        <binding name="evenOdd" value="ognl:beans.evenOdd"/>
>    </component>
>
>    <component id="publishItemName" type="Any">
>        <binding name="element" value="literal:div"/>
>    </component>
>
>    <component id="publishItemLink" type="tacos:AjaxDirectLink">
>        <binding name="listener" value="listener:togglePublishItem"/>
>        <binding name="parameters" value="structuralPublishItem"/>
>        <binding name="updateComponents"
> value="ognl:{'structuralPublishItemsArea'}"/>
>        <binding name="keyProvider"
> value="structuralPublishItemKeyProvider"/>
>        <binding name="effects"
> value="template:{highlight:{structuralPublishItemsArea:'[255,255,184],
> 0, 500'}}"/>
>    </component>
>
>    <component id="foreachPublishItemKeyValue" type="tacos:PartialFor">
>        <binding name="source"
>            value="ognl:structuralPublishItem.mergedDictionary.isEmpty
> ? null : structuralPublishItemKeySetArray"/>
>        <binding name="value" value="ognl:structuralPersistentKey"/>
>        <binding name="evenOdd" value="ognl:beans.evenOdd"/>
>    </component>
>
>    <inject property="listenerInvoker"
> object="infrastructure:listenerInvoker"/>
>    <inject property="ajaxWebRequest"
> object="service:tacos.AjaxWebRequest"/>
>    <bean name="evenOdd" class="org.apache.tapestry.bean.EvenOdd"/>
>
>
> What is the difference between updateComponents and updateBlocks? What
> am I doing wrong here. Please let me know if you need more information
> or if any of this in unclear.
>
> Regards
>
> _________________________________________________________________
> Be the first to hear what's new at MSN - sign up to our free
> newsletters! http://www.msn.co.uk/newsletters
>
>
>
> -------------------------------------------------------
> 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
>


-------------------------------------------------------
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