cancel
Showing results for 
Search instead for 
Did you mean: 

Auto Navigate On Long WebDynpro Form To Message Area

mike_mcinerney
Participant
0 Kudos

I working with a lengthy, multi-view, interactive form developed in web dynpro.  The screen is long enough to invoke the browser’s scroll bars.  It has a main layout view (VW_LAYOUT) which contains View Containers for each of the other views.

From the top down, there are:

  • VW_MSG, which contains the Message Area
  • VW_BUT, which contains the set of pushbuttons defining currently available validations and actions
  • VW_01
  • VW_...
  • VW_...
  • VW_...
  • VW_...
  • VW_nn
  • VW_ATTACHMENTS, for attaching files

When VW_BUT’s check button, for example, is pressed, a message may appear in the message area.

For some reason, it has been requested to have the buttons appear on the bottom of the form as well, after the attachments section.  (btw, the FPM OIF Ship has long sailed on this, or I would have just kept the buttons and message area effectively frozen up top).

In my opinion, the quickest (albeit the ugliest) way to do this is to just copy the button view, say VW_BUT_SHADOW, and add a view container for it at the end of the layout. So I did, - two minutes work. The second set of buttons functions perfectly, and its pushbuttons’ attributes, mapped from a central context, work fine as well.

But now…  When VW_BUT_SHADOW issues validation messages, they are of course directed to the message area, but it is scrolled off the screen (all the way up top).

Is there a way I can have the form scroll back to the top when messages are placed in the message area?

Thanks…

…Mike

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Place all the UI elements including mesage area in a Transparent container. Then, if there are any messages,  use the method set_scroll_top( ) of transparent container to set the scrollTop position.  (you have to do it via coding and scrollTop property cannot be mapped using context attribute. )

hope this helps,

Regards,

Kiran

Answers (1)

Answers (1)

mike_mcinerney
Participant
0 Kudos

I wound up creating a component controller attribute for a user interface element above the message area, and navigating to it as needed from the calling views.

wd_this->lo_view->request_focus_on_view_elem( wd_comp_controller->gr_header ) .