cancel
Showing results for 
Search instead for 
Did you mean: 

scroll to top of the page on getting an error message in web dynpro abap

Former Member
0 Kudos

I have a view in <b>web dynpro abap</b> which has a lot of stuff on it and hence a vertical scroll bar. When a user is at the bottom of the page and a validation error occurs which is displayed using the web dynpro message manager, the same is not visible to the user and leaves him wondering why nothing happens.

<b>When an error message is displayed, is it somehow programmatically possible to automatically scroll to the top of the page to where the error message is displayed?</b>

Any input on this would be highly appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Cindy,

Thanks for you inputs. But this solution will not work for me as I do not have a context associated with my message area. I need to scroll to the message area whenever any error message is displayed.

Any inputs in this regard are welcome.

Thanks,

Pratibha.

Former Member
0 Kudos

Pratibha,

Are there any other input fields at the top of the view that are bound to a context attribute? It could be something as simple as a label. You could even put a label above the page message area that only is set to visible (bind the visibility property to a context attribute) when there is a message and then use that UI element to set the focus to scroll to the top of the page. I have not tried it with a label element, so you might need to use a text view element instead.

Hope this helps.

-Cindy

Former Member
0 Kudos

You could try setting the focus to an element at the top of the page (or to the page message area). That should make that section visible in the browser.

Check this forum post on setting focus for a UI element:

-Cindy