我用maven建立了一个JSF2.0项目.一切正常,行动处理:-(
这是我的.xhtml页面:
<h:form>
<h:commandButton
id="submit"
value="Absenden"
action="#(projectController.saveProject)">
</h:commandButton>
</h:form>
Run Code Online (Sandbox Code Playgroud)
在这里我的托管bean:
@ManagedBean
@SessionScoped
public class ProjectController {
public String saveProject(){
System.out.println("test");
return("/newProject.xhtml");
}
...
Run Code Online (Sandbox Code Playgroud)
当我尝试按下按钮时没有任何反应.没有错误消息......没有.但数据绑定工作!只有actions/actionlisteners不起作用
也许有人对我有答案:-)干杯
你的行为拼错了.使用大括号,然后它应该工作:
action="#{projectController.saveProject}">
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
742 次 |
| 最近记录: |