RepeatControl 按钮 CSJS 不工作
RepeatControl Button CSJS not working
点击无结果。
这是我的 xpage 的代码重复控件:
<xp:repeat
id="repeat2"
rows="5"
var="viewEntryEscalation">
<xp:this.value><![CDATA[#{javascript:
var viewEscalation : NotesView = database.getView("(subEscalation)");
var viewEntryCollectionEscalation : NotesViewEntryCollection = viewEscalation.getAllEntriesByKey(currentDocument.getDocument().getParentDocumentUNID());
return viewEntryCollectionEscalation}]]>
</xp:this.value>
<xp:button
style="margin-right:10.0px"
id="Button"
disableTheme="true">
<xp:this.value><![CDATA[#{javascript:
translateString('Level')+" "+ viewEntryEscalation.getDocument().getItemValueString("Level")
}]]></xp:this.value>
<xp:this.disabled><![CDATA[#{javascript:
viewEntryEscalation.getDocument().getItemValueString("Level")==currentDocument.getItemValueString("Level")
}]]></xp:this.disabled>
<xp:eventHandler
event="onclick"
submit="false"
id="eventHandler14">
<xp:this.script><![CDATA[
XSP.openDialog('#{id:dialogReason}', '', { "FieldName" : "Level" , "DataValue" : viewEntryEscalation.getDocument().getItemValueString("Level") });
]]></xp:this.script>
</xp:eventHandler>
</xp:button>
</xp:repeat>
我如何运行 重复控制中的这个 CSJS 按钮代码?
XSP.openDialog(...
在客户端执行,但您的第三个参数肯定包含服务器端代码。
在代码发送到客户端之前执行服务器端代码 #{javascript: ...}
:
XSP.openDialog('#{id:dialogReason}',
'',
{ "FieldName" : "Level" ,
"DataValue" :
'#{javascript: viewEntryEscalation.getDocument().getItemValueString("Level")}'
});
点击无结果。
这是我的 xpage 的代码重复控件:
<xp:repeat
id="repeat2"
rows="5"
var="viewEntryEscalation">
<xp:this.value><![CDATA[#{javascript:
var viewEscalation : NotesView = database.getView("(subEscalation)");
var viewEntryCollectionEscalation : NotesViewEntryCollection = viewEscalation.getAllEntriesByKey(currentDocument.getDocument().getParentDocumentUNID());
return viewEntryCollectionEscalation}]]>
</xp:this.value>
<xp:button
style="margin-right:10.0px"
id="Button"
disableTheme="true">
<xp:this.value><![CDATA[#{javascript:
translateString('Level')+" "+ viewEntryEscalation.getDocument().getItemValueString("Level")
}]]></xp:this.value>
<xp:this.disabled><![CDATA[#{javascript:
viewEntryEscalation.getDocument().getItemValueString("Level")==currentDocument.getItemValueString("Level")
}]]></xp:this.disabled>
<xp:eventHandler
event="onclick"
submit="false"
id="eventHandler14">
<xp:this.script><![CDATA[
XSP.openDialog('#{id:dialogReason}', '', { "FieldName" : "Level" , "DataValue" : viewEntryEscalation.getDocument().getItemValueString("Level") });
]]></xp:this.script>
</xp:eventHandler>
</xp:button>
</xp:repeat>
我如何运行 重复控制中的这个 CSJS 按钮代码?
XSP.openDialog(...
在客户端执行,但您的第三个参数肯定包含服务器端代码。
在代码发送到客户端之前执行服务器端代码 #{javascript: ...}
:
XSP.openDialog('#{id:dialogReason}',
'',
{ "FieldName" : "Level" ,
"DataValue" :
'#{javascript: viewEntryEscalation.getDocument().getItemValueString("Level")}'
});