java - can we get id="CodeTxt" using @RequestParam("custCode") -
jsp:
<form:input mandatory="true" id="codetxt" path="custcode" cssclass="txtfield controlwidth" readonly="false"jsvalidation="checkalphanumeric" /> controller class:
public @responsebody jsonresult fetchcustomerlist(@modelattribute("customer")customer customer,@requestparam("custcode") string customercode
do fetch our parameters name or id if yes how fetching values @requestparam("custcode").are mapping our parameter path="custcode"?? did jsonresult has done thing behind screen?? code snippet , running properly.
when send form request server, form data available key / value pairs, key name of form field (html attribute name="custcode" generated when use: path="custcode"). id attribute not relevant in case , cannot reference form field id instead of name attribute.
if need retrieve value of id can store additional hidden field value example:
<input type="hidden" name="custcodefieldid" value="codetxt" /> and retrieve value of id using additional @requestparam("custcodefieldid") string custcodefieldid
Comments
Post a Comment