使用 jboss portletbridge 链接到 jsf portlet 中不同页面的语法
我试图使用 jboss portletbridge 找出 jsf/richfaces portlet 中的语法,以便在将某些值设置为操作或侦听器的一部分后将用户带到下一页。
JBoss 文档中的示例适用于 ah:outputlink (使用 h:outputink 链接到 Portlet/JSF 页面 - http://docs.jboss.org/portletbridge/docs/2.1.0.CR1/en-US/xhtml/chap-JBoss_Portlet_Bridge_Reference_Guide-Developing_Portlets_with_the_Bridge.html)转到其他页面这对我有用,但我有一个情况,我有一个表,每一行都有一个链接到下一页,这需要设置一些值以便下一页可以使用此信息。
我已经在 Web 应用程序中使用 commandlink 多次执行此操作,但是当我尝试使用命令链接时,它在 portlet 中无法用于此目的。以下是我对 commandlink 的尝试:
< h:commandLink action="#{bean.viewDetails}" value ="View details.">
<f:param name="javax.portlet.faces.ViewLink" value="true" />
</h:commandLink>
action 方法返回下一页的位置,但该链接不会像 outputlink 那样将我带到下一页。
使该功能发挥作用的方法是什么?是否有任何选项可以将值设置为输出链接或命令链接参数的一部分,以便链接将我带到下一页或其他选项?
I am trying to figure out the syntax in a jsf/richfaces portlet using jboss portletbridge to have a link to take the user to the next page after setting some values as part of an action or a listener.
The example in JBoss documentation is for a h:outputlink (Linking to Portlet/JSF Pages Using h:outputink - http://docs.jboss.org/portletbridge/docs/2.1.0.CR1/en-US/xhtml/chap-JBoss_Portlet_Bridge_Reference_Guide-Developing_Portlets_with_the_Bridge.html) to go to a different page which works for me, but I have a case where I have a table with each row having a link to got to the next page and this would need some values set on the managed bean so that the next page can use this information.
I have done this numerous times in a web app using commandlink, but when I try a command link it does not work for this purpose in a portlet. Here is what I have tried with commandlink:
< h:commandLink action="#{bean.viewDetails}" value ="View details.">
<f:param name="javax.portlet.faces.ViewLink" value="true" />
</h:commandLink>
the action method returns the location of the next page, but the link is not taking me to the next page like the outputlink does.
What would be the way to get this functionality working? any option to set values as part of outputlink or parameters for command link so that the link takes me to the next page or other options?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许你应该尝试类似的事情
May be you should try something like
尝试这样的
这个链接提供了一个很好的有效编码示例
Try Something like this
This link provide a good coding example that works