Skip to Content
avatar image
Former Member

View update on DropDownByIndex selection


I have a view composed as follows:

- One DropDownByIndex linked to a context attribute SERIAL.code listing a series of serial numbers

The dropdown does

- One TextEdit linked to the calculated context attribute SERIAL.description reporting the extended description of the serial number

- One FileUpload component linked to a context attribute FILE.resource

I have this problem:

When the user selects a different SERIAL.code from the dropdown, the textedit with the description DOES NOT change its content by showing the corresponding SERIAL.description

If I attach an empty onSelect event handler to the DropDownByIndex, then the view is correctly updated and the TextEdit shows the description of the selected element but if the user inputted a file in the FileUpload, then the FileUpload input field is emptied!

(The Resource object of the FileUpload is still holding the resource loaded by the user -- ie. the context attribute IS NOT null -- but the input field becomes blank and so it seems that the file hasn't been loaded properly).

Can someone help me?

Thank you,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 24, 2011 at 12:52 PM


    If the dropdown is not bound to an event handler, server round trip will not happen on change of selection and hence the calculated attribute is not updated. Once the event hanler is bound to the dropdown, on change of the selection, server round trip happens and hence the Text edit is updated.

    It is the default behaviour of the Fileupload UI, that it will loose only the file path displayed in the UI whenever an event occurs.

    As a workaround, you can fetch the file name from the resource in the event handler of the dropdown and display it as selected file name and this has to be done in all the event handlers in the view(If required). Also it is not possible to determine the local file path of the file and repopulate the same as explained in the below threads.


    In the above mentioned link it is mentioned that getting the complete path of the uploaded file from FileUpload UI is not possible (check the comment of Mr.Valery Silaev).

    [Initialize the filepath in FileUpload ?;

    In the above mentioned sdn forum link it is explained why is it not possible to initialize the file path into File upload UI.


    Vishweshwara P.K.M.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you Vishweshwara for your reply.

      I see. I don't think that that's good behaviour, but if there is nothing else to do...