Hi fellas, 

I am looking to update a loop triggered by a change event from a select
component.  

sniipet from tml

<table>
            <tbody >
            <tr t:type = "loop" t:source = "objects" t:value = "object" id =
"loopy">
                <td>
                    ${object.name}
                </td>
            </tr>
            </tbody>
        </table>

and from javascript

function onCompleteSelectChange(response) {

    var selectElement = $("loopy");

    for (var index = 0; index < response.values.length; index++) {

        selectElement.update(response.values[index].label);

    }

    Tapestry.ElementEffect.highlight($("loopy"));

}


Using the chenelikit onEvent to trigger this but im new to javascript and
having some difficulty getting this right.  If I have more than one value in
the response only the last one gets displayed in the update.

How is everyone else handling such a situation -  how do I go about
converting the response which is a JSONObject into something which can be
used as the source for the loop and then update the loop - that should
update the whole loop instead of just the last value but not sure how to.

(using Tapestry 5.1.0.3)

Appreciate any help

..kace
-- 
View this message in context: 
http://www.nabble.com/loop-and-ajax-tp23407011p23407011.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to