Sorry you went through so much trouble! Feel free to shoot off an email to
the list if you ever run into something that starts taking more than a day
to do. Tacos is still undergoing lots of heavy development, so it's very
understandable if some of the features are less intuitive than would be
hoped.

jesse

On 10/20/05, Joel Charlesworth <[EMAIL PROTECTED]> wrote:
>
> Isn't it always the case that as soon as you ask for help, you solve your
> problem...not 2 minutes after posting this, I fixed it after 2 days of
> trying...
>
> The only change from my initial post was change the surrounding div to a
> <span "@Any" id="xyz"> around the thing I want to update, and use
> updateComponents="ognl:{'xyz'}" in the Refresh component.
>
> For anyone else who wants to do this, here is what works for me now :
>
> Html Template:
>
> <div id="scoreboard">
> <h5>Sales ScoreBoard</h5>
> <span jwcid="@Any" 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>
> </span>
>
> <script type="text/javascript">
> function refreshVehicleTable() {
> setTimeout("refreshVehicleTable()", 1000);
> <span jwcid="@tacos:Refresh" updateComponents="ognl:{'vehicles'}" />
> }
>
> setTimeout("refreshVehicleTable()", 1000);
> </script>
>
> </div>
>
> On 10/20/05, Joel Charlesworth <[EMAIL PROTECTED]> wrote:
> >
> > 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>
> <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]
> >
>
>
>
> --
> ===================
> Joel Charlesworth
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>

Reply via email to