2014-02-20 35 views
0

在我的JSP頁面中我有:支柱複選框:取消選擇並提交

<nested:checkbox property="product.hasEmployee" /> 

此複選框被默認選中,當我取消選中它,然後 我提交頁面,我覺得選擇!

我該如何解決這個問題?

+0

你怎麼把它「默認選擇」?這是在你的「Form」對象還是在「Controller」中?有更多的代碼可以幫助你。 –

回答

0

在服務器端執行此代碼:

if (request.getParameter("product.hasEmployee") == null) { 
    product.setHasEmployee(false); 
} 
相關問題