内容简介:有解决方案吗?翻译自:https://stackoverflow.com/questions/3004620/jsf-commandbutton-url-parameters
有解决方案吗?
h:commandButton不会触发GET请求,而是触发POST请求,因此您无法使用它.如果您已经使用JSF 2.0并且目标页面位于相同的上下文中,那么您可以使用h:按钮:
<h:button value="press here" outcome="otherViewId">
<f:param name="param1" value="value1" />
<f:param name="param2" value="value2" />
</h:button>
(此处不需要h:表格,如h:outputLink).这将创建一个按钮,该按钮转到otherViewId.jsf?param1 = value1& param2 = value2.
但是如果你还没有使用JSF 2.0,那么你最好的方法就是抓住CSS来设置链接样式.
<h:outputLink styleClass="button">
有类似的东西
a.button {
display: inline-block;
background: lightgray;
border: 2px outset lightgray;
cursor: default;
}
a.button:active {
border-style: inset;
}
翻译自:https://stackoverflow.com/questions/3004620/jsf-commandbutton-url-parameters
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- TypeScript 中的命名参数、可选参数、默认参数
- PXC状态参数与变量参数
- 更加灵活的参数校验,Spring-boot自定义参数校验注解
- AI新人必看 | 参数和超参数还分不清楚吗?
- 如何一条Mediainfo --Inform语句同时获取视频参数和音频参数多个Parameters
- es6 -- 默认参数Default,不定参数Rest,扩展运算符Spread详解
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Pro CSS and HTML Design Patterns
Michael Bowers / Apress / April 23, 2007 / $44.99
Design patterns have been used with great success in software programming. They improve productivity, creativity, and efficiency in web design and development, and they reduce code bloat and complexit......一起来看看 《Pro CSS and HTML Design Patterns》 这本书的介绍吧!