如果我們沒有做任何控制,運行效果就是下面這樣,這顯然不能然用戶滿意:

其實只要在方法和Jsp頁面修改一下就可以了:
首先,將 immediate="true" :

其次,在值變函數中添加:
FacesContext context = FacesContext.getCurrentInstance();
...
context.renderResponse();
就可以了。

從制造到創造
軟件工程師成長之路 |
其次,在值變函數中添加:
FacesContext context = FacesContext.getCurrentInstance();
...
context.renderResponse();
就可以了。
| |||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
---|---|---|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 | |||
12 | 13 | 14 | 15 | 16 | 17 | 18 | |||
19 | 20 | 21 | 22 | 23 | 24 | 25 | |||
26 | 27 | 28 | 29 | 30 | 31 | 1 | |||
2 | 3 | 4 | 5 | 6 | 7 | 8 |