Escolar Documentos
Profissional Documentos
Cultura Documentos
1 Introduction ................................
................................................................................................
.........................................................................................2
2 Creating A Simple Application................................
................................................................................................
................................................................2
2.1 Creating the Beans ................................
................................................................................................
.......................................................................2
2.2 Adding annotations ................................
................................................................................................
......................................................................2
2.3 Generating CRUD pages ................................
................................................................................................
...............................................................3
3 Appendix A: Source Code for the Employee Bean ................................................................
...................................................................4
package com.otdefault.bean;
import org.opentides.bean.BaseCriteria;
import org.opentides.bean.Base
org.opentides.bean.BaseSortableEntity;
2) Define the fields of your bean and create getters and setters for each one.
:
:
import javax.persistence.ManyToOne;
import org.hightides.annotations.DropDown;
import org.hightides.annotations.RadioButton;
import org.hightides.annotations.TextField;
:
:
@Dao
@Page
@Service
@Controller
@SuppressWarnings
@SuppressWarnings("serial")
public class Employee extends BaseSortableEntity
Entity implements BaseCriteria{
BaseCriteria
@TextField
private String employeeId;
@TextField (re
(requiredField=true, label="First
"First Name")
Name"
private
te String fname;
@TextField (r
(requiredField=true, label="Last Name")
Name"
private String lname;
@ManyToOne
@RadioButton (options={"male", "female"})
private String gender;
@ManyToOne
@DropDown (category=
(category="SYSTEMCODES_STATUS")
private String civilStatus;
:
:
import org.opentides.bean.BaseCriteria;
import org.opentides.bean.Base
org.opentides.bean.BaseSortableEntity;
import javax.persistence.ManyToOne;
import org.hightides.annotations.DropDown;
import org.hightides.annotations.RadioButton;
import org.hightides.annotations.TextField;
@Dao
@Page
@Service
@Controller
"serial")
@SuppressWarnings("serial
public class Employee extends BaseSortableEntity
Entity implements BaseCriteria{
BaseCriteria
@TextField
private String employeeId
employeeId;
@TextField (requiredField=
quiredField=true, label="First
"First Name")
Name"
private String fname
fname;
@TextField (requiredField=
equiredField=true, label="Last Name")
Name"
private String lname
lname;
@ManyToOne
@RadioButton (options={
(options={"male", "female"})
private String gender
gender;
@ManyToOne
@DropDown (category=
(category="SYSTEMCODES_STATUS")
private String civilStatus
civilStatus;
/**
* @return the employeeId
*/
public String getEmployeeId() {
return employeeId
employeeId;
}
/**
* @param employeeId the employeeId to set
*/
public void setEmployeeId(String employeeId) {
employeeId = employeeId;
this.employeeId
}
/**
* @return the fname
*/
public String getFname() {
return fname;
;
}
/**
* @param fname the fname to set
*/
public void setFname(String fname) {
this.fname = fname;
}
/**
* @return the lname
*/
public String getLname() {
return lname;
}