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.
每次刷新页面时都会调用 pagevalidate() 方法,并且我在页面上做了一些操作。我正在寻找一种仅在第一次加载页面时调用的方法,并且在随后的页面刷新/执行某些操作时,将不会调用该方法。Tapestry 4中有这样的方法吗?
您可以尝试在会话对象中设置一个标志,并将您只希望第一次调用的代码包装在通过检查该标志输入的 if 块中。