我是JSF的新手所以我不知道我面临的行为是否正常.
我有这个代码:
<p:selectBooleanCheckbox id="locationChoice1" value="#{login.locationChoice1}">
<p:ajax listener="#{login.chooseLocationType1}" update="locationChoice1 locationChoice2 positionChoice" />
<p:ajax listener="#{login.retrieveGalaxies}" update="test" />
</p:selectBooleanCheckbox>
Run Code Online (Sandbox Code Playgroud)
我的login.retrieveGalaxies
函数调用sleep(8000)
函数来模拟延迟.我期待我的组件locationChoice1
,locationChoice2
并positionChoice
在1或2秒内更新,我的test
组件将在8秒内更新,但所有都在8秒内更新.
这是正确的行为吗?
我尝试使用async
参数,但它没有改变结果.