0

How to get the position of a component?

asked 2014-09-03 13:02:54 +0800

salbader gravatar image salbader
15 5

Hello, i want to get the position of a component. How to do this? I cant find any method. Reason. I use the Method scrollIntoView like see below. But i want to use the methode like this scrollIntoView(x, y) . I thought i could get x and y from component. But i can t find a solution. please help.

public static void scrollIntoViewOnWrongValueException(final WrongValueException e) {
    if (e.getComponent() != null) {
        Component component = e.getComponent();
        Clients.scrollIntoView(component);
    }
}
delete flag offensive retag edit

Comments

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-04 05:39:24 +0800

vincentjian gravatar image vincentjian
2245 6

updated 2014-09-04 05:52:11 +0800

You can try find position by jquery with Clients.evalJavascript() API and then fire an event to server with position information. Refer to the zkfiddle sample

link publish delete flag offensive edit

Comments

thanks thats a good idea.

salbader ( 2014-09-04 07:21:02 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-09-03 13:02:54 +0800

Seen: 28 times

Last updated: Sep 04 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More