我可以使用而不是<h:commandButton value="Reset" class="link" type="reset" />
此代码重置表单值?
<h:commandLink value="Reset" class="link" type="reset" style="margin: 20px;">
<f:ajax execute="@form" render="@form"/>
</h:commandLink>
答案 0 :(得分:0)
h:commandLink
与h:commandButton
的行为不同type="reset"
,因为h:commandLink
属性type
定义了此超链接指定的资源的内容类型(例如{ {1}})。
使用此代码:
text/ html, image/gif
输入值将被提交。这不是你想要的。