Hello,

I'm racking my brain over trying to get the tacos4-alpha-4 Refresh component
to refresh a table custom component I have developed. Using javascript's
setTimeout() function I want this to happen every 'x' seconds.

I'm finding that tapestry is refreshing underlying data, but the resultant
html displayed doesn't reflect those changes.

Here is my component's html template:
--------------------------------------
<div id="scoreboard">
<h5>Sales ScoreBoard</h5>
<div id="vehicles">
<table id="vehicleTable" border="1" class="listObject" cellspacing="0"
cellpadding="2">
<tr><th>Year</th><th>Make</th><th>Model</th><th>Max Bid</th><th></th></tr>
<tr class="odd" jwcid="vehicle">
<td>
<span jwcid="year">[Year]</span>
</td>
<td>
<span jwcid="make">[Make]</span>
</td>
<td>
<span jwcid="model">[Model]</span>
</td>
<td>
$<span jwcid="maxBid">[Max Bid]</span>
</td>
<td>
<a href="" jwcid="viewVehicleLink">View</a>
</td>
</tr>
</table>
</div>

<script type="text/javascript">
function refreshVehicleTable() {
setTimeout("refreshVehicleTable()", 1000);
<span jwcid="@tacos:Refresh" updateBlocks="ognl:{'vehicles'}"
updateComponents="ognl:{'vehicles'}" />
}

setTimeout("refreshVehicleTable()", 1000);
</script>

</div>
-----------------------------------

Here is my jwc:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>

<component-specification class="com.abl.web.components.ScoreBoard">

<bean name="evenOdd" class="org.apache.tapestry.bean.EvenOdd">
<set name="even" value="false"/>
</bean>

<property name="currentVehicle"/>
<component id="vehicle" type="For">
<binding name="source" value="vehicles"/>
<binding name="element" value="literal:tr"/>
<binding name="value" value="currentVehicle"/>
<binding name="class" value="beans.evenOdd.next"/>
</component>

<component id="year" type="Insert">
<binding name="value" value="currentVehicle.year"/>
</component>

<component id="make" type="Insert">
<binding name="value" value="currentVehicle.make"/>
</component>

<component id="model" type="Insert">
<binding name="value" value="currentVehicle.model"/>
</component>

<component id="maxBid" type="Insert">
<binding name="value" value="currentVehicle.arena.maxBid"/>
</component>

<component id="viewVehicleLink" type="DirectLink">
<binding name="listener" value="listener:onViewVehicle"/>
<binding name="parameters"
value="currentVehicle.arena.id<http://currentVehicle.arena.id>
"/>
</component>

</component-specification>
-----------------


In this example, the "source" of the For component is being updated every
second, but the html doesn't show the changes. I have tried setting
updateComponents and updateBlocks on the Refresh component to the id of the
surrounding div, as well as the table (which I understand IE has problems
with, hence the div).

Thank you for any assistance you can provide.

JRC

--
===================
Joel Charlesworth
[EMAIL PROTECTED]

Reply via email to