<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main" />
</head>
<body>
<div class="nav">
<span class="menuButton"><g:link class="create" action="index">Save</g:link></span>
<span class="menuButton"><g:link class="create" action="index">Cancel</g:link></span>
<span class="menuButton"><g:link class="create" action="excelExport">Export To Excel</g:link></span>
</div>
<div class="body">
<div class="message">Parsed Data:</div>
<g:hasErrors bean="${savedCrInstance}">
<div class="errors">
<g:renderErrors bean="${savedCrInstance}" as="list" />
</div>
</g:hasErrors>
<g:form method="post" >
<input type="hidden" name="id" value="${savedCrInstance?.id}" />
<input type="hidden" name="version" value="${savedCrInstance?.version}" />
<g:render template="company" model="['savedCrInstance':savedCrInstance,'customerInquiriesVal':customerInquiriesVal,'balanceStmtInfo':balanceStmtInfo,'incomeStmtInfo':incomeStmtInfo,'listofMeasures':listofMeasures]"/>
</g:form>
</div>
</body>
</html>
上述GSP向用戶顯示解析的數據(從PDF)。用戶可以選擇保存,取消並將解析的數據導出到Excel。如何在grails中將模型從視圖傳遞到控制器
點擊Excel導出,我想將savedCrInstance
模型(我從控制器獲得)傳遞到另一個控制器,在那裏我將導出數據到excel,如here所示。