on 04-03-2006 11:36 AM
Hi all,
I'm experiencing a strange problem with the FileUpload control:
--> I have a default view '<i>UploadView</i>'.
--> <i>UploadView</i> its context has one binary value attribute '<i>data</i>'
--> <i>UploadView</i> contains a FileUpload control. The data property of that control has been bound to the context attr '<i>data</i>'
--> <i>UploadView</i> contains a button. An eventhandler is set for the button. In the eventhandler <i>wdFirePlugToResultView()</i> is called. <i>ResultView</i> is another view connected with <i>UploadView</i>.
When I execute the application & I put put a url in the FileUpload Control & I click on the button, the only thing I see is the <i>UploadView</i> being refreshed?? So no <i>ResultView</i> is shown?
Why is that?
Thanks in advance,
Jeroen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeroen,
are you sure, the strange behaviour is because of the Upload-UI-element?
Does the navigation work without the Upload-element on the UploadView?
kr, achim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
to my knowledge the upload-element works like this:
you browse to a file and press the upload button, then the the file is uploaded & the input-filed is empty again.
so, how is it possible that there's an URL entered in the input-field in your case? do you enter it manually afterwards?
maybe this works:
you empty the context-element bound to the "fileName"-property before you navigate to the next view manually in your code.
kr, achim
Achim,
What do you mean by "the upload button"? The FileUpload-element has only a browse button. The button I'm referring to is an ordinary button I've put in the view. So what I'm doing is:
1. Start app
2. Fill in a (local) URL in the (empty) field of the FileUpload-element (either manually or by using the browse button)
3. Click on my 'ordinary' button: the upload seems to start (I don't know why: I've never explicitly coded that), but when it's done, instead of executing the event-handler associated with my button (= going to another view), the view with the FileUpload-element is shown again (with an empty URL field)
What exactly is supposed to trigger the upload?
The strange behaviour I'm referring to is that
1. The upload seems to start although I've never explicitly coded that
2. the event handler of my button isn't executed when I click on it (except when I disable the FileUpload element or when I leave its URL field empty)
Hope I'm clear...
you're right. I've added a regular button to "upload" the file, too.
anyway, try to empty the context element that is bound to the "fileName"-Property before you fire the plug to the next view like:
wdContext.current<yourNode>Element.set<PropertyName>("");
where do you want to use the "data" of the upload? in your view with the upload-element or in the next view?
kr, achim
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.