Skip to content

Commit

Permalink
Create MODELS for products and repair
Browse files Browse the repository at this point in the history
  • Loading branch information
FairWindCo committed Oct 15, 2015
1 parent adc7c23 commit e767c59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void editor(@RequestParam String oper,User user,BindingResult result,Http
}
switch (oper){
case "add":
String pk=request.getParameter("person_id_primary_key");
String pk=request.getParameter("personIDkey");
if(pk!=null){
try {
Long pid=Long.getLong(pk);
Expand All @@ -148,7 +148,7 @@ public void editor(@RequestParam String oper,User user,BindingResult result,Http
usr.setEnabled(user.isEnabled());
usr.setPasswordHash(user.getPasswordHash());
usr.setUserName(user.getUserName());
String pkey=request.getParameter("person_id_primary_key");
String pkey=request.getParameter("personIDkey");
if(pkey!=null) {
try {
Long pid = Long.getLong(pkey);
Expand Down
9 changes: 7 additions & 2 deletions src/main/webapp/jsp/user_list.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@
datatype: 'json',
mtype: 'POST',
styleUI : 'Bootstrap',
colNames:['<c:message code="label.id"/>', '<c:message code="label.usertables.table.col_title.login"/>', '<c:message code="label.usertables.table.col_title.password"/>','<c:message code="label.user.enabled"/>', '<c:message code="label.version"/>','<c:message code="label.user.person_name"/>','<c:message code="label.user.person_name"/>'],
colNames:['<c:message code="label.id"/>', '<c:message code="label.usertables.table.col_title.login"/>', '<c:message code="label.usertables.table.col_title.password"/>','<c:message code="label.user.enabled"/>', '<c:message code="label.version"/>','<c:message code="label.user.person_name"/>','<c:message code="label.user.person_name"/>','<c:message code="label.user.person_name"/>'],
colModel:[
{name:'userID',index:'userID', width:55, editable:true, editoptions:{readonly:true, size:10}, hidden:true},
{name:'userName',index:'userName', width:100, editable:true, editrules:{required:true}, editoptions:{size:10}},
{name:'passwordHash',index:'passwordHash', width:100, editable:true, editrules:{required:true}, editoptions:{size:10},search:false},
{name:'enabled',index:'numberFormat', width:100, editable:true, editrules:{required:true}, editoptions:{size:10},search:false},
{name:'versionId',index:'versionID', width:100, editable:true, editrules:{readonly:true}, editoptions:{size:10,defaultValue:'0'}, hidden:true},
{name:'FIO',width:100, editable:false, search:false},
{name:'personIDkey',width:100, editable:true, search:false, hidden:true},
{name:'personID',width:100, editable:true, search:false, hidden:true, editrules:{edithidden:true},editable:true,editoptions:{
/**/
dataInit : function (elem) {
Expand All @@ -82,13 +83,17 @@
button_img:'${pageContext.request.contextPath}/resources/images/btn.png',
init_record: [value_elem],
sub_info: true,
bind_to:'personIDkey_setup',
/**/
sub_as: {
surname: 'surname',
middleName: 'middleName',
firstName:'firstName'
}/**/
});
}).bind('personIDkey_setup', function() {
$('#personIDkey').val($('#personID_primary_key').val());
}
);
}/**/
}},
],
Expand Down

0 comments on commit e767c59

Please sign in to comment.