I actually tried this example:
$(document).ready( function() { $.subscribe('handleJsonResult', function(event,data) { $('#result100').html(""); var list = $('#countryList'); $.each(event.originalEvent.data, function(index, value) { list.append(' <s:url id="jsonurl" action="CountriesList"/>
<sj:a id="ajaxjsonlink"
href="%{jsonurl}"
dataType="json"
onSuccessTopics="handleJsonResult"
button="true"
buttonIcon="ui-icon-gear"/>
and am able to see the JSON result successfully, but the same JSON data cannot be seen in the select tag...
The versions used are: struts2-jquery-plugin-2.2.2 struts2-spring-plugin-2.1.6 struts2-core-2.1.6 jsonplugin-0.34
Here are the tags in the jsp:
<sj:select
href="%{countryurl}"
id="selectedCountry"
name="selectedCountry"
dataType="json"
list="country"
listKey="id"
listValue="name"
emptyOption="true"
headerKey="-1"
headerValue="Please Select a Country"
/>
I can see the json values in Firebug when the action gets invoked, but nothing inside the select component! What is wrong with the above? syntax, version? thanks V