on 11-12-2008 5:26 AM
Hi all,
I have 2 views:
- The first one has a FileUpload UI Element and a Button (Display).
- The second has a Table and a Button (Back).
The scenario is:
- When I choose a file via FileUpload and push the Display button, I will be navigated to the second view.
- The content of the file will be shown on the Table.
- After that, I push the Back button and navigate back to the first one.
What I want is the file I have chosen would exist in the FileUpload element.
Can you tell me how?
Best regards,
Nguyen
Hi Nguyen,
although where is an attribute fileName in UI fileUpload it is NOT POSSIBLE to initialize fileName with values - it is always set to blank. After selection you can find the filename in this attribute (if bind to a context). But as I said you cannot use it for preallocation.
That is a documented limitation of the fileUpload UI:
http://help.sap.com/saphelp_nw70/helpdata/EN/b3/be7941601b1d09e10000000a155106/frameset.htm
Regards
Johann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nguyen ,
If you want the file name selected to be exist in the fileupload element,
then
1. you just have bind to 'fileName' property to context attribute.
2. Do mapping of the node containing the above attribute on the next view.
So the value which has been set to the context node's element will be retained and you will able to see the entered value even after navigation also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SIDH SAP,
Thank you for your information.
In fact my application has a ComponentController's context, and every context in views is mapped to this context. After navigating back to view 1, the FileUpload element is always cleared.
I think Johann is right, this is a limitation of the element.
Best regards,
Nguyen
Hi,
you can go for the following link.
This gives a step by step approach for both uploading and downloading. If you go thru the link you will be definetly able to solve your problem and get the file in the required UI Element.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.