Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-directcontrolservlet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
017e74f9
authored
2014-10-23 17:27:55 -0500
by
Ean Schuessler
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Copy passed parameters into the service call #4278
1 parent
cb76eeec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
017e74f
...
...
@@ -143,6 +143,15 @@ public class DirectControlServlet extends HttpServlet {
context
.
put
(
key
,
items
.
get
(
key
));
}
}
else
if
(
"text/csv"
.
equals
(
contentType
))
{
// Directly copy request parameters into context.
for
(
Enumeration
<
String
>
params
=
request
.
getParameterNames
();
params
.
hasMoreElements
();)
{
String
param
=
params
.
nextElement
();
Object
[]
values
=
request
.
getParameterValues
(
param
);
if
(!
"sessionId"
.
equals
(
param
)
&&
!
"_method"
.
equals
(
param
))
{
context
.
put
(
param
,
values
.
length
==
1
?
values
[
0
]
:
values
);
}
}
Iterable
<
CSVRecord
>
records
=
CSVFormat
.
EXCEL
.
parse
(
request
.
getReader
());
List
data
=
new
ArrayList
();
for
(
CSVRecord
record
:
records
)
{
...
...
Please
register
or
sign in
to post a comment