0

Scrollbar in Listbox moves to last selected item

asked 2018韩国高清伦理影片成人影片免费观看成人影片12位大咖论道未来 美的置业智慧生态发布会即将上映

發布時間︰

“嗯——前天一早我收到一份電報。‘尊敬的朋友,請火速前來,全家 恭候,心急如焚,謹致信賴感激之忱。您的開克斯法爾伐。’‘火速’‘如 焚’,這兩個夸張已極的詞,我看了就不怎麼喜歡。為什麼突然間這樣迫不 及待?我不是幾天前才跟艾迪特作過檢查嗎。再說︰為什麼打個電報來表示 他的信任,又為什麼特別感激一番?我並沒有把這事當作燃眉之急,隨手把 電報擱在一邊,反正這老頭三天兩頭常干這號瘋事。可是昨天早上我心里一 震。艾迪特給我來了封快信,其長無比,瘋瘋癲癲、喜極而狂的神氣躍然紙 上。她說,她從一開始就知道,世界上只有我能夠救她,她簡直無法跟我細 說,現在終于熬到頭了,她是多麼高興。她寫信給我,只是為了向我保證, 我可以完全對她放心。我安排的一切治療方案,哪怕是最最艱難的,她也信 心十足地照辦。但是只希望我能盡快開始這新的治療方法,最好馬上開始, 她現在就急得不行。再說一遍︰我什麼要求都可以向她提出,只求我趕快開 始。如此雲雲,雲雲。 子壞水的陌生老頭,看見他躺在地上,淚流滿面,睜開眼楮,向那富有同情 心的青年乞求幫助,然後看見他騎在年輕人肩上。這個妖精一頭自發,紛披 在兩邊,戴著一副金絲邊眼鏡。我像閃電一樣飛快地把開克斯法爾代的臉安 在故事里的那個老頭身上,這完全出自本能,平時只有做夢才能這樣迅速地 把各種圖像和許多人的臉孔拉在一起,互相替代,而我自己一下子變成了那 頭不幸的坐騎,被他鞭打,往前驅趕。可不是,我清清楚楚地感到我的脖子 給夾得死緊,簡直氣都透不出來。手里的書掉落地上,我躺在床上,渾身冰 冷,只听見我的心髒敲擊著肋骨,冬冬直響,宛如打在硬本上。就是在睡夢 中,這凶惡的獵手還驅趕著我東奔西跑,我不知道跑向哪里。等我第二天早 上醒來,頭發濕漉漉的,我感到精疲力竭,疲憊不堪,仿佛經過了長途跋涉。 上午我和伙伴們一起騎馬出操,我按照條例,認真細致、頭腦清醒地值 勤服役,可這都無濟于事;下午我剛走出城外,沿著那無法回避的道路向府 邪走去,我又感到肩膀上那陰森森的重負。因為我預感到,我現在開始承擔 的責任,已經變成一種嶄新的、艱難得無法估量的責任,我的良心惴惴不安。 那天夜里在花園里的椅子上我對老人說,他的女兒有希望在最近獲得痊愈, 我這些言過其實的話只不過是出于同情心。我沒說實話,這是無意識的,甚 至是違背我的意志的,但這決不是有意識的蒙騙,決不是粗暴的欺騙。從現 在起則相反,我已經知道,很快把病治好是辦不到的,我就得冷靜地、硬著 頭皮裝假,處心積慮、持續不斷地裝假,我就得裝出叫人看不透的表情,用 一種堅信不疑的腔調撒謊,活像一個狡猾透頂的罪犯,幾周之前,幾個月之 前就已經把他的行動和他的辯護的每一個細枝末節都精心設計、考慮周詳。 我生平第一次開始懂得,這個世界上最惡劣的壞事並不是由邪惡和殘暴所造2018韩国高清伦理影片 康多爾頓住了。他顯然在等我表示贊同。可是我不敢和他的目光交鋒, 昨天的種種景象,隨著心髒的狂跳,此刻從我眼前飛快地一掠而過。我們如 何興高采烈地在充滿夏日風光的田野里驅車前進,那患病的姑娘因為在陽光 下沐浴,內心喜悅,因而容光煥發。她如何溫柔地撫摩那些小馬駒,如何像 個女王一樣參加了喜慶的典禮,老人的淚水如何一而再、再而三地奪眶而出, 流進他那笑得連連抽動的嘴巴。現在要猛然一擊把這一切全都毀掉!這個搖 身一變、煥然一新的姑娘又得再變回去!好不容易從絕望的境地脫身出來的 姑娘,說一句話,又把她推進萬劫不復的焦慮煩躁的地獄中去!不行,我知 道,我永遠也不可能伸出手去干這樣的事情。于是我畏畏縮縮他說︰成人影片免费观看 艾迪特在車里坐在我的對面,我有點為她擔心。她全身還一直在瑟瑟直 抖;似乎有什麼激烈的心事使她感到壓抑。她突然猛不丁地一下子哭出聲來。 然而這是一種高興的啜泣。她哭的時候笑起來,笑的時候哭起來。那個詭譎 異常的吉卜賽女人,毫無疑問,預言她不久就要恢復健康,說不定還向她預 言了什麼別的。 成人影片 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:

<zk>
<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"
        use="com.otr.sufd.zkossforms.table.SetDocColumnsView"
        closable="true" border="normal" title="Customize columns" ctrlKeys="" height="400px" width="300px">
    <borderlayout width="100%" height="100%">
        <center>
            <listbox id="table" checkmark="true" vflex="true" fixedLayout="true" multiple="true" width="100%">
                <listhead>
                    <listheader align="left">Column title</listheader>
                </listhead>
            </listbox>
        </center>

        <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"/>
            </toolbar>
        </south>
    </borderlayout>
</window>

</zk>

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

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

    final ListModelList tableModel = new ListModelList(columns);
    tableModel.setMultiple(true);
    table.setModel(tableModel);
    table.renderAll();
    for (int i = 0; i < columns.size(); i++) {
        final HeaderElement column = columns.get(i);
        if (column != null) {
            final Listitem listitem = table.getItemAtIndex(i);
            listitem.setLabel(column.getLabel());
            final String columnId = column.getId();
            listitem.setValue(columnId);
            listitem.setSelected(!hiddenIds.contains(columnId));
        }
    }
}
@Override
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);
    okButton.setFocus(true);
}

And then I show the dialog window by this code:

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

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

Clients.scrollIntoView(table.getItemAtIndex(0))

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

Comments

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

0

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

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
0

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

Follow
1 follower

RSS

Stats

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

Seen: 12 times

Last updated: Aug 01

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