javascriptpolarion

update Widget in Polarion


Hi I have a table widget in Polarion. If a button is clicked the query of the table should be changed and the widget updated. I tried to change the query in the html, but i was not able to refresh the widget after that:

<button id ="target">Test</button>
<script>
$( "#target" ).click(function() {
    $(".queryClass").html('${esc.h}if(!${esc.d}pageContext.taskIds.equals("")) id:(${esc.d}pageContext.TaskList) AND NOT status: "closed" ${esc.h}else NOT*.* ${esc.h}end');   
});

</script>

Is it possible to update the parameters of a widgt with a button click?


Solution

  • Not really. See the widgets are generated on server side and transmitted to the browser. They do some asynchrous request to load their data after loading the page, but you cannot trigger this as you cannot change the content of widget itself.

    You can however use a classic wikipage and get data via normal javascript via a servlet.