cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling in WD (Java)

Former Member
0 Kudos

Hello,

on some pages my sites are too long, to get ready without manually scrolling.

Often, a site is so long, a user submits a button on end of the site. The success message on the top at the site is only seen, if the user scrolly on top.

Any suggestions to do scroll automatically on top, after click on button?

best regards

Mathias

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai ,

Create a message UI element put it on the top of the view .

Create a group and put remaining UI elements on that.

make the height of the group is 500. and scroollable is true.

now if you want to submit the button the you will use the scroll bar of group .the message area is always visible.

regards,

Former Member
0 Kudos

Mathias,

You may use IWDMessageArea UI component.

Just place it near your button, make it invisible initially (via context binding of "visible" property to context attribute with type Visibility), and after submit make it visible. So user will see button and message at same place (at bottom)

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hello Valery,

that`s couldn`t be done. Because is is a design specification to do my messages on the top of the page. So I`m going on to find a automatic scroll solution.

regards

Mathias

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Put all the UI under the group and set the scrolling property to auto.

If possible set the height and width also for the group.

Regards,

Vijai.

Former Member
0 Kudos

Mathias,

Then do the following:

1. Create boolean context attribute IsScrollTop

2. In action handler set it to true (it will be false by default)

3. In wdDoModifyView add the following:


if (wdContext.currentContextElement().getIsScrollTop()) {
  wdContext.currentContextElement().setIsScrollTop(false);
  final IWDUIElement topControl = (IWDUIElement)view
    .getElement("id-of-element-at-top-of-view");
  topControl.requestFocus();
}

Valery Silaev

SaM Solutions

http://www.sam-solutions.net