Business operating System (VI)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.