Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于验证错误,我的命令链接/按钮没有被调用。但是,即使我有那个错误,我还是希望我的操作被调用,因为我必须在 session.xml 中设置一些值。
我怎样才能做到这一点?
看起来你想添加immediate="true"到你的h:commandLink. 单击链接时,这将跳过验证。
immediate="true"
h:commandLink
有关更多信息,请参阅此链接或 BalusC 的演练。
请注意,调用操作时您的模型不会更新,因此您将无法访问用户输入的任何值。