【发布时间】:2013-06-25 03:44:14
【问题描述】:
Primefaces 命令链接和 jsf 命令链接有什么区别?
当我简单地将 p:commandLink 更改为 h:commandLink 时,
<p:commandLink action="#{actionBean.action(var)}"
value="#{valueBean.getValue(var.attribute)}"
styleClass="#{var.type}" />
Eclipse 在action="#{actionBean.action(var)}" and value="#{valueBean.getValue(var.attribute)}" 提示错误
方法必须有签名“String method(), String method(String), String method(String, String), String 方法(字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串, 字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串, 字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串 方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串),字符串 方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串),字符串方法(字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串, 字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串,字符串)”但有签名“字符串 方法(布尔值)"
actionBean.action(var) 像“index”一样返回一个要重定向的页面;
即使 Eclipse 提示错误,h:commandLink 版本在运行时也能完美运行。真的很困惑。非常感谢。
【问题讨论】:
-
<h:commandButton>是一个原生 JSF 组件,它将呈现一个简单的<input type="submit">,而<p:commandButton>是一个 PrimeFaces 组件,它为这个按钮添加了 ajax 功能。当然,这是一个粗略的解释,也许您想要更详细的技术。 -
是的,无论如何谢谢你
-
如果这是您的目的,那么请编辑显示您的原因的问题,否则它可能会因为不做进一步的修改而被关闭,而不仅仅是希望其他人为您做。
-
嗯,我还在研究这个话题,只是想看看有没有人做过..
-
你为什么要搜索这个?你的动机是什么?只是为了满足你的好奇心?
标签: jsf primefaces