Revision 3393
Added by barteau over 17 years ago
src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java | ||
---|---|---|
78 | 78 |
String result = null, action, message, serverResponse; |
79 | 79 |
String button, contentType, posted_ldapUserName, tmp; |
80 | 80 |
MultipartParser multipartParser; |
81 |
int fileIdx; |
|
81 | 82 |
|
82 | 83 |
if (clientViewBean == null) |
83 | 84 |
clientViewBean = (ClientView) clientSession.getAttribute(ClientView.CLIENT_VIEW_BEAN); |
... | ... | |
85 | 86 |
if (clientViewBean != null) { |
86 | 87 |
action = clientViewBean.getAction(); |
87 | 88 |
contentType = request.getContentType(); |
88 |
if (contentType != null && contentType.contains("multipart/form-data")) |
|
89 |
action = "Upload"; |
|
89 |
|
|
90 |
//*** BEGIN: manual bind params to bean (if we arrived here via the ClientViewHelper.jspx). |
|
91 |
if (action == null || action.equals("")) { |
|
92 |
if (contentType != null && contentType.contains("multipart/form-data")) { |
|
93 |
action = "Upload"; |
|
94 |
} else { |
|
95 |
action = request.getParameter("action"); |
|
96 |
clientViewBean.setAction(action); |
|
97 |
if (action != null && action.equals("Delete")) { |
|
98 |
clientViewBean.setDocId(request.getParameter("docid")); |
|
99 |
} |
|
100 |
} |
|
101 |
} |
|
102 |
//*** END: manual bind params to bean. |
|
103 |
|
|
90 | 104 |
try { |
91 | 105 |
if (action.equals("Login")) { |
92 | 106 |
//posted_ldapUserName = String.format(LDAP_TEMPLATE, clientViewBean.getUsername(), clientViewBean.getOrganization()); |
... | ... | |
115 | 129 |
} |
116 | 130 |
|
117 | 131 |
} else if (action.equals("Delete")) { |
132 |
|
|
133 |
//*** Refresh the select list. |
|
134 |
// message = handleDocIdSelect(); |
|
135 |
// clientViewBean.setMessage(ClientView.SELECT_MESSAGE, message); |
|
118 | 136 |
ClientFgdcHelper.clientDeleteRequest(clientViewBean, this); |
119 |
//*** Refresh the select list. |
|
120 |
message = handleDocIdSelect(); |
|
137 |
message = (String) clientSession.getAttribute("updateFeedback"); |
|
121 | 138 |
clientViewBean.setMessage(ClientView.SELECT_MESSAGE, message); |
122 |
|
|
123 | 139 |
} else if (action.equals("Upload")) { |
124 | 140 |
message = ""; |
125 | 141 |
//*** Only process request if a file upload. |
Also available in: Unified diff
Modifications to the clientRequest method to handle calls for 'Delete' actions.