Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gechengyang
nouiWithSpringMVC
Commits
11a7bb74
Commit
11a7bb74
authored
Dec 13, 2018
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成查询、修改、初始化、CHECK验证
parent
b490e3f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
37 deletions
+16
-37
AbstractCommonController.java
...resentation/noui/controller/AbstractCommonController.java
+12
-33
noUiMapping_pxiadd.properties
src/main/resources/noUiMapping_pxiadd.properties
+1
-1
HttpTest.java
.../java/org/sss/presentation/noui/api/servlet/HttpTest.java
+3
-3
No files found.
src/main/java/org/sss/presentation/noui/controller/AbstractCommonController.java
View file @
11a7bb74
...
...
@@ -55,18 +55,10 @@ public class AbstractCommonController {
NoUiPresentationUtil
.
hanleInput
(
context
,
noUiRequest
,
alias
);
if
(
eventType
.
equals
(
ON_CLICK
))
{
String
aliasActionUrl
=
alias
.
getAliasActionUrl
();
String
actionUrl
=
alias
.
getRel
().
get
(
aliasActionUrl
);
IBaseObject
dataField
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
actionUrl
);
if
(
null
==
dataField
)
throw
new
NoUiException
(
"onClickUrl :"
+
actionUrl
+
"is not exsit"
);
IBaseObject
dataField
=
baseObject
(
context
,
noUiRequest
,
alias
);
((
IDatafield
<?>)
dataField
).
invokeEventRules
(
context
,
EventType
.
ON_CLICK
,
null
);
}
else
if
(
eventType
.
equals
(
ON_CHANGE
))
{
String
aliasActionUrl
=
alias
.
getAliasActionUrl
();
String
actionUrl
=
alias
.
getRel
().
get
(
aliasActionUrl
);
IBaseObject
dataField
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
actionUrl
);
if
(
null
==
dataField
)
throw
new
NoUiException
(
"onClickUrl :"
+
actionUrl
+
"is not exsit"
);
IBaseObject
dataField
=
baseObject
(
context
,
noUiRequest
,
alias
);
((
IDatafield
<?>)
dataField
).
invokeEventRules
(
context
,
EventType
.
ON_CHANGE
,
null
);
}
else
if
(
eventType
.
equals
(
ON_CHECK
))
{
for
(
String
aliasKey
:
noUiRequest
.
getDataMap
().
keySet
())
{
...
...
@@ -81,28 +73,6 @@ public class AbstractCommonController {
}
}
// 不为初始化事件
/***
* if (eventType != null && (!eventType.equals(INIT))) { String
* aliasActionUrl = alias.getAliasActionUrl(); String actionUrl =
* alias.getRel().get(aliasActionUrl); IBaseObject dataField =
* context.getSession().getBaseObject(context.getRoot(), actionUrl);
* if (null == dataField) throw new NoUiException("onClickUrl :" +
* actionUrl + "is not exsit"); else { if (dataField instanceof
* IDatafield) if (eventType.equals(ON_CLICK)) { ((IDatafield<?>)
* dataField).invokeEventRules(context, EventType.ON_CLICK, null); }
* else if (eventType.equals(ON_CHANGE)) { ((IDatafield<?>)
* dataField).invokeEventRules(context, EventType.ON_CHANGE, null);
* } else if (eventType.equals(ON_CHECK)) { for (String aliasKey :
* noUiRequest.getDataMap().keySet()) { if
* (aliasKey.startsWith(Constants.MAPPING_PRE)) { continue; } String
* realPath = alias.getRelPath(aliasKey); IBaseObject
* currentDataField = (IDatafield<?>)
* context.getSession().getBaseObject(context.getRoot(), realPath);
* if (currentDataField instanceof IDatafield<?>) { ((IDatafield<?>)
* currentDataField).invokeCheckRules(context); } } } } }
***/
// 保存新的RedisLoginInfo
byte
[]
sysmodBytes
=
NoUiPresentationUtil
.
sysmodToBytes
(
context
);
redisLoginInfo
.
setSysmod
(
sysmodBytes
);
...
...
@@ -117,7 +87,16 @@ public class AbstractCommonController {
return
ResultUtil
.
result
(
ErrorCodes
.
ERROR
,
"提交处理异常"
,
null
);
}
private
Map
<
String
,
Object
>
handleReturnData
(
String
eventType
,
NoUiContext
context
,
NoUiRequest
request
,
Alias
alias
)
{
private
IBaseObject
baseObject
(
NoUiContext
context
,
NoUiRequest
noUiRequest
,
Alias
alias
)
{
String
aliasActionUrl
=
alias
.
getAliasActionUrl
();
String
actionUrl
=
alias
.
getRel
().
get
(
aliasActionUrl
);
IBaseObject
baseObject
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
actionUrl
);
if
(
null
==
baseObject
)
throw
new
NoUiException
(
"onClickUrl :"
+
actionUrl
+
" is not exsit"
);
return
baseObject
;
}
private
Map
<
String
,
Object
>
handleReturnData
(
String
eventType
,
NoUiContext
context
,
NoUiRequest
noUiRequest
,
Alias
alias
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
// 初始化事件
...
...
src/main/resources/noUiMapping_pxiadd.properties
View file @
11a7bb74
_save
=
\\
pxip
\\
sav
_save
=
\\
pxip
\\
sav
1
nam
=
\\
pxigrp
\\
rec
\\
nam
sex
=
\\
pxigrp
\\
rec
\\
sex
univer
=
\\
pxigrp
\\
rec
\\
univer
...
...
src/test/java/org/sss/presentation/noui/api/servlet/HttpTest.java
View file @
11a7bb74
...
...
@@ -21,9 +21,9 @@ public class HttpTest {
String
token
=
(
String
)
map2
.
get
(
"token"
);
pxiadd
(
token
,
userId
,
terminalType
);
pxisel
(
token
,
userId
,
terminalType
);
pxiame
(
token
,
userId
,
terminalType
);
check
(
token
,
userId
,
terminalType
);
//
pxisel(token, userId, terminalType);
//
pxiame(token, userId, terminalType);
//
check(token, userId, terminalType);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment