리눅스에서 프레임워크 예제 실습하는데 자바 질문입니다.
영어젬병이라 그런지 무슨 말인지 모르게써요
A Form object encapsulates an HTML form definition, including validation constraints. Let’s create a form for our Task class. Add this to your Application controller:
static Form taskForm = Form.form(Task.class); 이거를 Application.java에 넣었더니 에러가 나고 클래스 만들다보면
엄청 꼬여서 다 삭제하길 몇번쨉니다.
The type of taskForm is then Form since it is a form generating a simple Task.
You also need to import play.data.* and models.*. //임퐅 할 필요가 있데서 넣어줘도 문제네요..
We can add a constraint to the Task type using JSR-303 annotations. Let’s make the label field required:
이 아래 소스도 어디다가 넣으라는건지..
package models;import java.util.*;import play.data.validation.Constraints.*;public class Task { public Long id; @Required public String label;
이게 어떻게 하라는건지 이해가 안가네요..ㅠㅠ
첨부 | 파일 크기 |
---|---|
![]() | 297.87 KB |
댓글 달기