2014-06-06 1 views
0

간단한 응용 프로그램을 만들었지 만 단추를 누를 때 문제가 발생했습니다. 어떻게해야합니까? 어떻게하면 단추를 재생중인 다른 페이지로 리디렉션 할 수 있습니까?

내가 버튼을 새로운 형태로 새로운 값을 반환 & 3 개 값을 할 스칼라 파일 &입니다

@(solutionForm: Form[Socrates]) 
@import helper._ 
@main(title = "form 1") { 

    @form(action = routes.Application.solve, args = 'id -> "solutionform") { 

    @inputText(field = solutionForm("a"),args = '_label -> " a =" 
    )@inputText(field = solutionForm("b"),args = '_label -> "b =" 
    )@inputText(field = solutionForm("c"),args = '_label -> "c =" 
    ) } 
    <input type="submit" > 
} 

새로운 형식은 다음과 같습니다

@(man : String) 
@main("solution") { 
    <h3>the solution for the previous equation is @man </h3> 
} 

답변

0

버튼해야 작업 할 양식 태그 안에 있어야합니다.

@form() { 
    <input type="submit"> 
} 
+0

OOOOOOOOOOOOh 올바른 예는 – user3703199

+0

plz입니다. s = form.data(). get ("b"); b = Integer.valueOf (s); [NumberFormatException : null] – user3703199

관련 문제