Java 如何使用dojo.event.topic.publish在resquest中传递参数
我将在DojoAjax调用生成的http请求中发送参数:Java 如何使用dojo.event.topic.publish在resquest中传递参数,java,ajax,struts2,dojo,Java,Ajax,Struts2,Dojo,我将在DojoAjax调用生成的http请求中发送参数:Dojo.event.topic.publish 实际上,当我截获http请求时,我有: <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sx" uri="/struts-dojo-tags"%> <script language="javascript"> function refreshQuestions(eleme
Dojo.event.topic.publish
实际上,当我截获http请求时,我有:
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<script language="javascript">
function refreshQuestions(element) {
var td = element.parentNode;
document.getElementsByName('codeScoringFamille').value = td.getAttribute('id');
dojo.event.topic.publish("/listQuestionTopic", "0", "1");
}
</script>
<table class="scoreBoard" width="100%">
<tr class="titre">
<td class="familletitre" width="30%" height="32"><s:property
value="getText('resultat.sous_famille.question.label')" /></td>
<s:if test="%{currentUser.collaborateur.displayWeight}">
<td class="familletitre" width="30%" height="32"><s:property
value="getText('question.weight.label')" /></td>
</s:if>
</tr>
<s:if test="%{resultatsSousFamilleItem.size != 0}">
<s:iterator value="resultatsSousFamilleItem" status="rowstatus">
<s:if test="#rowstatus.odd == true">
<s:set name="trClass" value="%{'even'}"></s:set>
</s:if>
<s:else>
<s:set name="trClass" value="%{'odd'}"></s:set>
</s:else>
<tr class="<s:property value="#trClass"/>">
<td id="<s:property value="%{idResultatScoring}" />_<s:property value="%{idFamille}" />_<s:property value="%{idResultatScoring}" />"
class="famille_<s:property value="#trClass"/>"><s:a href=""
cssClass="scoreBoard" onclick="refreshQuestions(this)">
<s:property value="%{getText(codeTraduction)}" />
</s:a></td>
<s:if test="%{currentUser.collaborateur.displayWeight}">
<td class="famille_<s:property value="#trClass"/>"><s:property
value="%{weight}" /></td>
</s:if>
</tr>
</s:iterator>
</s:if>
</table>
<sx:div id="listQuestion" href="displayQuestion.do" formId="idFormQuestion"
listenTopics="/listQuestionTopic" theme="ajax" preload="false">
<s:param name="codeScoringFamille" value="codeScoringFamille"></s:param>
</sx:div>
http://:8080/myApplication/myAction.do?dojo.preventCache=1396444095140
http://:8080/myApplication/myAction.do?dojo.preventCache=1396444095140¶m=myParam
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<script language="javascript">
function refreshQuestions(element) {
var td = element.parentNode;
document.getElementsByName('codeScoringFamille').value = td.getAttribute('id');
dojo.event.topic.publish("/listQuestionTopic", "0", "1");
}
</script>
<table class="scoreBoard" width="100%">
<tr class="titre">
<td class="familletitre" width="30%" height="32"><s:property
value="getText('resultat.sous_famille.question.label')" /></td>
<s:if test="%{currentUser.collaborateur.displayWeight}">
<td class="familletitre" width="30%" height="32"><s:property
value="getText('question.weight.label')" /></td>
</s:if>
</tr>
<s:if test="%{resultatsSousFamilleItem.size != 0}">
<s:iterator value="resultatsSousFamilleItem" status="rowstatus">
<s:if test="#rowstatus.odd == true">
<s:set name="trClass" value="%{'even'}"></s:set>
</s:if>
<s:else>
<s:set name="trClass" value="%{'odd'}"></s:set>
</s:else>
<tr class="<s:property value="#trClass"/>">
<td id="<s:property value="%{idResultatScoring}" />_<s:property value="%{idFamille}" />_<s:property value="%{idResultatScoring}" />"
class="famille_<s:property value="#trClass"/>"><s:a href=""
cssClass="scoreBoard" onclick="refreshQuestions(this)">
<s:property value="%{getText(codeTraduction)}" />
</s:a></td>
<s:if test="%{currentUser.collaborateur.displayWeight}">
<td class="famille_<s:property value="#trClass"/>"><s:property
value="%{weight}" /></td>
</s:if>
</tr>
</s:iterator>
</s:if>
</table>
<sx:div id="listQuestion" href="displayQuestion.do" formId="idFormQuestion"
listenTopics="/listQuestionTopic" theme="ajax" preload="false">
<s:param name="codeScoringFamille" value="codeScoringFamille"></s:param>
</sx:div>
功能问题(要素){
var td=element.parentNode;
document.getElementsByName('codeScoringFamille')。value=td.getAttribute('id');
dojo.event.topic.publish(“/listQuestionTopic”、“0”、“1”);
}
在href属性中?