Note that there are some explanatory texts on larger screens.

plurals
  1. PO[t5.2.6]Generating zones within a loop, then updating some of them
    text
    copied!<p>I've been trying to do this for some time now but nothing worked. I searched through this list and I still can't figure it out !!</p> <p>Here is my case, I draw a table using dimensions provided in the page activation context. So I can't predict how many rows or columns I may have. Each header in the columns have a select field and so does each row at it's left most cell. Each select field should update the whole row or column, depending on which select field had it's value changed.</p> <p>Here is a portion of my page's tml file to elaborate more. The "???" are just to not that I need the select to update zones but I just don't know what to put here !</p> <pre><code>&lt;t:form&gt; &lt;div style="overflow: auto;"&gt; &lt;table class="contentpane skyTable" width="100%" cellspacing="0" cellpadding="0" border="0" align="center"&gt; &lt;tr&gt; &lt;td bgcolor="lightgray"/&gt; &lt;td t:type="loop" t:source="1 .. width" t:value="widthIndex"&gt; ${widthIndex} - &lt;t:select t:id="toNode" model="toProbesModel" zone="???"/&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr t:type="loop" t:source="1 .. height" t:value="heightIndex"&gt; &lt;td&gt;${heightIndex} - &lt;t:select t:id="fromNode" model="fromProbesModel" zone="???"/&gt;&lt;/td&gt; &lt;t:loop t:source="1 .. width" t:value="widthIndex"&gt; &lt;td row="${heightIndex}" col="${widthIndex}" from="" to="" style="background-color: #BDBDBD;"&gt; &lt;t:zone id="${widthIndex}-${heightIndex}"&gt; N/A &lt;/t:zone&gt; &lt;/td&gt; &lt;/t:loop&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/t:form&gt; </code></pre> <p>The whole idea is to add more info to the XHR request, this will most probably aid to fix my problem.</p> <p>If this is kinda not possible at the moment. May be someone can help me to request fragments of pages to load in these using prototype ajax calls rather that using tapestry's capabilities although I'd hate that !! I wanna be good using tapestry :)</p> <p>Also I need to modify the cells being updated "style" attribute to add an image as it's background and remote that attribute when a cell is fully updated. Just to show a loader gif.</p> <p>In addition, Assuming a column will be updated due to a select value is changed, each cell in this column should have a specific attribute in it, changed to the new value of the select field. And the same story with rows. Each cell about to update in a row, needs to have a specific attribute in it to be changed to the value of the select field. These attribute will be within the "td" element.</p> <p>To summer this up, I need to collect some parameters from the page at the client side and add the to the zone' activation context which is the same as the page's, but I can detect if it's an XHR request from there.</p> <p>I already have this working using servlets but I'd LOVE to use tapestry instead :)</p> <p>Thanks a lot.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload