1
我有簡單的頁面,我使用嘗試和測試從擴展庫的@EncodeUrl功能:爲什麼@EncodeURL顯示不起作用?
<xp:panel id="encodeurl">
<xp:inputText value="#{viewScope.encodeurl}" />
<xp:br />
<xp:text value="#{javascript:var x = @EncodeUrl(viewScope.encodeurl); print(x); return x; }"
escape="true" />
<xp:button value="submit" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="encodeurl">
</xp:eventHandler>
</xp:button>
</xp:panel>
使用表單編碼
http://127.0.0.2/BlogTesting.nsf/ExtLibURLFormulas.xsp?my_Parameter=spaces和$ ymbol $
不編碼做,因爲我所期望的as exampled elsewhere,即:
http://127.0.0.2/BlogTesting.nsf/ExtLibURLFormulas.xsp?my_Parameter=spaces+and+%24ymbol%24
相反,我得到的是相同的字符串後面,無論是在控制檯和屏幕。我在股票9.0安裝和9.0.1FP7擴展庫的v17上都試過了。
我錯過了什麼嗎?
謝謝克努特,你有一個例子的輸出或函數應該使用?我試圖修改Domino 9應用程序開發人員升級考試 –
我從未使用@EncodeUrl。所以,不幸的是,我沒有一個好例子。這個函數在所有三本XPage書籍中都沒有提及過...... –