cancel
Showing results for 
Search instead for 
Did you mean: 

Keep data on view when navigating between views

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Johann,

Thank you for your answer.

I think you're right.

Best regards,

Nguyen

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

you can go for the following link.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a...

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.

Former Member
0 Kudos

Hi saurav mago,

Thank you for your information.

However I think you didn't catch my question. I asked for Web Dynpro for ABAP solution, not Java.

Regards,

Nguyen

Edited by: nguyen tang on Nov 13, 2008 3:32 AM