我有 2 个编辑框,1 个是可编辑的,另一个只是打印 sessionScope 的名称,两个字段都在一个相邻的 2 个单元格中,见下面的代码,inputText1 是可编辑的文本字段,inputText2 是不可编辑的文本,打印 #{sessionScope.Tmp1_ABC}
<xp:td>
<xp:inputText id="inputText1"
loaded="true">
<xp:this.value><![CDATA[${javascript:var fieldName = "Tmp_" + @ReplaceSubstring(varcollection," ","");
return '#{sessionScope.' + @ReplaceSubstring(fieldName,@List(" ",")","("),"") + '}';}]]></xp:this.value>
<xp:eventHandler
event="onchange" submit="true" refreshMode="partial"
refreshId="panel_1" />
</xp:inputText>
</xp:td>
<xp:td>
<xp:inputText id="inputText2"
loaded="true">
<xp:this.value><![CDATA[#{javascript:var fieldName = "Tmp1_" + @ReplaceSubstring(varcollection," ","");
return '#{sessionScope.' + @ReplaceSubstring(fieldName,@List(" ",")","("),"") + '}';}]]></xp:this.value>
<xp:eventHandler
event="onchange" submit="true" refreshMode="partial"
refreshId="panel_1" />
</xp:inputText>
</xp:td>