2014-05-03 51 views
0

這是我使用Java Server Faces所做的registration.xhtml頁面。我想要做的是重置條目面板。爲此,我簡單地標記了一個按鈕重置,並將頁面地址放在操作字段中,以便重新加載頁面以便清除該字段。我想知道是否有更正確的方法來做到這一點......謝謝。 (我的知識的缺乏沒有侮辱請,我是一個完整的新手)在Java Server Faces中重置panelgrid的更正確方法

  <h:form> 
      <h:commandButton value="Register" action="someotherpage.xhtml"/> 
      <h:commandButton value="RESET" action="registration.xhtml"/> 
      </h:form> 
     </h:panelGrid>   
    </h:body>  
</html> 

回答

0

如果你不需要執行任何種類的背部特殊的代碼,你可以使用下面的按鈕清除表單:

<h:commandButton type="reset" value="RESET" /> 
相關問題