Scrollbar in Listbox moves to last selected item

asked 青娱乐在线极品盛宴青娱乐极品视觉盛宴mp4日本免费av毛片在线看_岛国爱情动作片_岛国片在线播放97多家上市药企产品入围新版医保目录市场格局或将重写


我勸你千萬不要為了技巧而煩惱,主要是常常靜下心來,細細思考,發掘自己的毛病,尋找毛病的根源,然後想法對癥下藥,或者向別的師友討教。煩惱只有打擾你的學習,反而把你的技巧拉下來。共產黨員常常強調︰“克服困難”,要克服困難,先得鎮定!只有多用頭腦才能解決問題。同時也切勿操之過急,假如經常能有些少許進步,就不要灰心,不管進步得多麼少。而主要還在于內心的修養,性情的修養︰我始終認為手的緊張和整個身心有關系,不能機械的把“手”孤立起來。練琴的時間必須正常化,不能少,也不能多;多了整個的人疲倦之極,只會有壞結果。要練琴時間正常,必須日常生活科學化,計劃化,紀律化!假定有事出門,回來的時間必須預先肯定,在外面也切勿難為情,被人家隨便多留,才能不打亂事先定好的日程。青娱乐在线极品盛宴 青娱乐极品视觉盛宴mp4 你為了俄國鋼琴家?,興奮得一晚睡不著覺;我們也常常為了些特殊的事而睡不著覺。神經銳敏的血統,都是一樣的;所以我常常勸你盡量節制。那鋼琴家是和你同一種氣質的,有些話只能加增你的偏向。比如說每次練琴都要讓整個人的感情激動。我承認在某些romantic[浪漫底克]性格,這是無可避免的;但“無可避免”並不一定就是藝術方面的理想;相反,有時反而是一個大累!為了藝術的修養,在heart[感情]過多的人還需要盡量自制。中國哲學的理想,佛教的理想,都是要能控制感情,而不是讓感情控制。假如你能掀動听眾的感情,使他們如醉如狂,哭笑無常,而你自己屹如泰山,像調度千軍萬馬的大將軍一樣不動聲色,那才是你最大的成功,才是到了藝術與人生的最高境界。你該記得貝多芬的故事,有一回他彈完了琴,看見听的人都流著淚,他哈哈大笑道︰“嘿!你們都是傻子。”藝術是火,藝術家是不哭的。這當然不能一蹴即成,尤其是你,但不能不把這境界作為你終生努力的目標。羅曼羅蘭心目中的大藝術家,也是這一派。 你為了俄國鋼琴家?,興奮得一晚睡不著覺;我們也常常為了些特殊的事而睡不著覺。神經銳敏的血統,都是一樣的;所以我常常勸你盡量節制。那鋼琴家是和你同一種氣質的,有些話只能加增你的偏向。比如說每次練琴都要讓整個人的感情激動。我承認在某些romantic[浪漫底克]性格,這是無可避免的;但“無可避免”並不一定就是藝術方面的理想;相反,有時反而是一個大累!為了藝術的修養,在heart[感情]過多的人還需要盡量自制。中國哲學的理想,佛教的理想,都是要能控制感情,而不是讓感情控制。假如你能掀動听眾的感情,使他們如醉如狂,哭笑無常,而你自己屹如泰山,像調度千軍萬馬的大將軍一樣不動聲色,那才是你最大的成功,才是到了藝術與人生的最高境界。你該記得貝多芬的故事,有一回他彈完了琴,看見听的人都流著淚,他哈哈大笑道︰“嘿!你們都是傻子。”藝術是火,藝術家是不哭的。這當然不能一蹴即成,尤其是你,但不能不把這境界作為你終生努力的目標。羅曼羅蘭心目中的大藝術家,也是這一派。日本免费av毛片在线看_岛国爱情动作片_岛国片在线播放97 一九五六年三月二十六日夜 2019-07-29 16:02:29 +0800

anvibb gravatar image anvibb
3 1

Hi, guys! I have some trouble with scrollbar in the Listbox component - when I set the model to it and selecting several listitems, the scrollbar moves down to the last selected item, but I need to keep it on top. We've used simple zul as a view:

<window xmlns="http: //www.zkoss.org/2005/zul" xmlns:xsi="http: //www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http: //www.zkoss.org/2005/zul http: //www.zkoss.org/2005/zul/zul.xsd"
        closable="true" border="normal" title="Customize columns" ctrlKeys="" height="400px" width="300px">
    <borderlayout width="100%" height="100%">
            <listbox id="table" checkmark="true" vflex="true" fixedLayout="true" multiple="true" width="100%">
                    <listheader align="left">Column title</listheader>

        <south size="36" autoscroll="true">
            <toolbar align="end">
                <button label="OK" id="okButton" height="24px" width="75px" mold="os"/>
                <button label="Reset" id="resetButton" height="24px" width="75px"/>
                <button label="Cancel" id="cancelButton" height="24px" width="75px" mold="os"/>


In SetDocColumnsView I filled Listbox by model and make some AfterCompose actions:

public void configureView(List<? extends HeaderElement> columns, Set<String> hiddenIds) {

    final ListModelList tableModel = new ListModelList(columns);
    for (int i = 0; i < columns.size(); i++) {
        final HeaderElement column = columns.get(i);
        if (column != null) {
            final Listitem listitem = table.getItemAtIndex(i);
            final String columnId = column.getId();
public void afterCompose() {
    table = (Listbox) getFellow("table");
    final Button okButton = (Button) getFellow("okButton");
    //adds some listeners to buttons
    addForward(Events.ON_OK, okButton, Events.ON_CLICK);
    addForward(Events.ON_CANCEL, cancelButton, Events.ON_CLICK);

And then I show the dialog window by this code:

final SetDocColumnsView dialog = UIUtils.loadComponent(SetDocColumnsView.getUrl());
dialog.configureView(columnList, hiddenIds);

I've tried to use some advice given in other threads, such as:


or call JS function inside my configureView method:

Clients.evalJavaScript("zk.Widget.$('" + dialog.table.getUuid() + "')._scrollToIndex(0);")

or keep all listitems what I need to select in a different Set and post to setSelectedItems method of Listbox, but everything is without success. Also, I've tried to debug a JS function _doScroll in Listbox.js but I don't figure out from where it has been called :(

I will be very appreciated if someone can help me with this problem.

Best regards, Roman

delete flag offensive retag edit


if your example is simple, please paste it into http://zkfiddle.org/ so that anyone can have a look directly, this increases your chances of getting a response quickly

cor3000 ( 2019-07-29 18:30:05 +0800 )edit

Yeah, I made simple zkfiddle example - http://zkfiddle.org/sample/1a44bo/1-scrollbar-in-listbox-moves-to-last-selected-item which reproduces the problem

anvibb ( 2019-07-30 21:16:58 +0800 )edit

4 Answers


answered 2019-08-01 09:12:39 +0800

hawk gravatar image hawk
2415 1 5
http://hawkphoenix.blogsp... ZK Team

Thanks for the zkfiddle example. Remove renderAll() can solve scrolling position issue. Listbox by default will render necessary Listitem for visible range, you don't need to call renderAll() which will enforce rendering all Listitems which is unnecessary for most cases. Please refer to http://zkfiddle.org/sample/1a44bo/2-scrollbar-in-listbox-moves-to-last-selected-item#source-2

link publish delete flag offensive edit
link publish delete flag offensive edit

answered 2019-07-31 21:05:33 +0800

anvibb gravatar image anvibb
3 1

updated 2019-08-01 09:01:48 +0800

hawk gravatar image hawk
2415 1 5
http://hawkphoenix.blogsp... ZK Team

Thank you for the response, hawk!

I tried to change the selection of items as you advised, but it doesn't solve my problem - when I select several items via ListModeList.setSelection, the scrollbar moves down to the last item. I made an example of that behavior in zkfiddle - http://zkfiddle.org/sample/1a44bo/1-scrollbar-in-listbox-moves-to-last-selected-item

link publish delete flag offensive edit

answered 2019-08-01 17:45:43 +0800

anvibb gravatar image anvibb
3 1

Removing renderAll() is helped!

Thank you so much!

link publish delete flag offensive 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

1 follower



Asked: 2019-07-29 16:02:29 +0800

Seen: 12 times

Last updated: Aug 01

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