아리아 템플릿 양식 http://ariatemplates.com/을 제출하려고하는데 제출이 스프링 MVC 컨트롤러/서블릿에 수행됩니다.아리아 템플릿 - 양식 제출 문제
양식을 제출할 권리가 있지만 컨트롤러에서 날짜 선택기, 텍스트 상자 등의 아리아 요소 값을 가져올 수 없습니다. Request.getParameter
은 (는) 사용하지 않습니다.
도움이 될 것입니다.
여기 내 샘플 tpl 파일, js 파일 및 스프링 컨트롤러가 있습니다.
TPL 파일
{Template {
$classpath:'view.Turnover',
$hasScript : true
}}
{macro main()}
<form action="test.do" method="POST" id="turnoverform">
<div style="float:left;padding-top: 3em;padding-bottom: 3em;padding-right: 3em;">
{@aria:Div {
sclass : "basic",
width : 740,
height : 300
}}
<p style="font-family:Arial,Helvetica,sans-serif;font-size: medium;">Create Turnover Report</p>
<hr />
{@aria:DatePicker {
label: " begin date:",
labelWidth:190,
width:330,
helptext:"Type date or select",
}/}
{@aria:DatePicker {
margins:"x x x 20",
label: "end date:",
labelWidth:190,
helptext:"Type date or select",
width:330,
}/}
<br/>
<br/>
<br/>
{@aria:TextField {
label : "User id",
labelPos : "left",
helptext : "ID",
width : 250,
block : true,
labelWidth : 80,
bind : {
"value" : {
inside : data,
to : 'value' }
}
}/}
<br />
{/@aria:Div}
<br />
{@aria:IconButton {
icon: "std:confirm",
label:"Create",
width : 300,
tooltip : "Click on this to create a Report",
block: true,
onclick : {
fn : buttonClick
}
} /}
</div>
</form>
{/macro}
{/Template}
자바 스크립트 파일 :
Aria.tplScriptDefinition({
$classpath : "view.TurnoverScript",
$prototype : {
/**
* Callback for the click event on the first button.
* @param {aria.DomEvent} evt Click event
*/
buttonClick : function (evt) {
aria.core.IO.asyncFormSubmit({
formId : "turnoverform",
callback : {
fn : this.onSuccess,
onerror : this.onError,
scope : this
}
});
},
onSuccess : function (evt, args) {
alert("The Template has been created");
//this.$json.setValue(["view:Dialog"], "dialogOpen", true);
},
onError : function (evt, args) {
alert("The Template has not been created due to some Error");
}
}
});
코드 샘플을 게시 할 수 있습니까? 제출 방법은 무엇입니까? [this] (http://ariatemplates.com/usermanual/Form_Submissions)가 도움이됩니까? – dgn
@scenario 이미 이걸 살펴보고 따라 갔지만 문제는 해결되지 않았습니다. 참조 용 샘플 코드 첨부 –