I. Operations related to partitioning 1. Save
(1) Entity class
(2) Front page
<Divstyle= "overflow:auto;padding:5px;"Border= "false"> <form> <Tableclass= "Table-edit"width= "80%"Align= "Center"> <TRclass= "title"> <TDcolspan= "2">Partition information</TD> </TR> <TR> <TD>Select Area</TD> <TD> <inputclass= "Easyui-combobox"name= "Region.id"data-options= "mode: ' Remote ', Valuefield: ' id ', TextField: ' Name ',
URL: ' ${pagecontext.request.contextpath}/regionaction_listajax.action ' "
/> </TD> </TR> <TR> <TD>Key words</TD> <TD><inputtype= "text"name= "Addresskey"class= "Easyui-validatebox"Required= "true"/></TD> </TR> <TR> <TD>Start number</TD> <TD><inputtype= "text"name= "Startnum"class= "Easyui-validatebox"Required= "true"/></TD> </TR> <TR> <TD>Termination number</TD> <TD><inputtype= "text"name= "Endnum"class= "Easyui-validatebox"Required= "true"/></TD> </TR> <TR> <TD>Odd</TD> <TD> <Selectclass= "Easyui-combobox"name= "single"style= "width:150px;"> <optionvalue= "0">Odd</option> <optionvalue= "1">Number</option> <optionvalue= "2">Shuang Hao</option> </Select> </TD> </TR> <TR> <TD>Location information</TD> <TD><inputtype= "text"name= "position"class= "Easyui-validatebox"Required= "true"style= "width:250px;"/></TD> </TR> </Table> </form> </Div>
(3) Action
Public String Save () {Subareaservice.save (model); return "List";}
2. Paging Query
(1) Front page
//Defining Columns varcolumns =[[{field:' ID ', checkbox:true,}, {field:' Showid ', Title:' Pickup number ', Width:120, align:' Center ', Formatter:function(Data,row, index) {returnrow.id; }},{Field:' Province ', Title:Province, Width:120, align:' Center ', Formatter:function(Data,row, index) {returnrow.region.province; }}, {field:' City ', Title:City, Width:120, align:' Center ', Formatter:function(Data,row, index) {returnrow.region.city; }}, {field:' District ', Title:Area, Width:120, align:' Center ', Formatter:function(Data,row, index) {returnrow.region.district; }}, {field:' Addresskey ', Title:' Keywords ', Width:120, align:' Center '}, {field:' Startnum ', Title:' Start number ', Width:100, align:' Center '}, {field:' Endnum ', Title:' Termination number ', Width:100, align:' Center '}, {field:' Single ', Title:Odd, Width:100, align:' Center '}, {field:' Position ', Title:Location, Width:200, align:' Center ' } ] ];
(2) Action
It is important to note that hibernate defaults to lazy loading, so the region property is a proxy object, but cannot be serialized, so it will be an error. This is the time to turn off lazy loading to display properly.
Business operating System (VI)