On 06.10.2006 19:34, Steven D. Majewski wrote:
I started with trying the upload: pseudo protocol, and I'm combining
that with using flowscript, because I need to add a bunch of
conditional processing todecide whether to accept the upload file
( and where to put it. )
I'm also using flowscript. And I present the result of the pipeline to
the user as well before it gets finally stored in database, so it is a
quite similar use case. I only do not publish documents. The data of the
uploaded file gets put into a form.
function displayimport(form, requestData) {
var objectType = requestData.getObjectType();
form.showForm("internal-display-import-" + objectType);
if (form.submitId == 'cancel') {
// back to list view
cocoon.sendPage('display-list-' + objectType);
} else {
// transform uploaded file into DOM
var pipelineUtil =
cocoon.createObject(Packages.org.apache.cocoon.components.flow.util.PipelineUtil);
var doc = pipelineUtil.processToDOM("internal-import-" +
objectType, null);
cocoon.disposeObject(pipelineUtil);
// prepare the request to display the DOM data
var requestData = getRequestData();
requestData.setResultObject(doc);
requestData.setObjectType("legalcase-import");
requestData.setViewType("list");
setRequestData(requestData);
displayRequestData();
}
}
(Sorry, my JavaScript code is not object-oriented, what makes it a bit
ugly. The code is three years old, so forgive me please ;) )
displayRequestData() finally shows a form containing the data of the
file. The actual uploaded file is no longer needed and I don't care for it.
The pipeline snippet I posted in my last mail was the one matching on
"internal-import-*".
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]