0
想,我已經隱藏字段映射與命令豆次年春天形式如何將默認值傳遞給Spring輸入/隱藏元素?
<form:form id="mainForm" name="mainForm"
method="post" action="Temp.htm" commandName="tempBean">
<form:hidden path="stringValue" />
</form:form>
- TempBean
。如果我需要傳遞一個動態的默認值給這個隱藏字段並依賴於其他一些操作?
HTML背景:
<c:set var="someVariable" value="${someValue}"/>
<input type="hidden"
id="stringValue"
name="stringValue"
value="${someVariable}"/>
像<form:input>
和<form:hidden>
的標籤沒有value
屬性。那麼,在這種情況下如何將默認值傳遞給命令對象呢?
我使用Spring 3.2.0。