0

Scrollbar in Listbox moves to last selected item

asked 免费三级现频在线观看伦理片在线手机伦理片秀色在线观看时隔一周再度非法集会 莫斯科警方拘留至少600人

發布時間︰

“我的天,封?開克斯法爾優先生,”我不勝驚訝他說道,“您怎麼跑 這兒來了?您不是已經上床睡覺了嗎?” —我想,更多的話我也沒有說過。好,昨天早上,回信來了,跟艾迪特那封 熱情奔放的信恰好是同一個郵班。乍一看來,教授的消息是積極的。維埃諾 的的確確在那個病人和另外幾個病人身上取得了驚人的成功。然而,可惜的 是,他的方法對于我們這個病例並不適用,使人難堪的就在這里。他的病人 之所以能夠治好,是因為他們患的都是脊椎結核,——這些專業方面的細節 我也就不跟您嘮叨了——踫到這種病例,只要改變一下受壓的位置,病人身 上的運動性神經立刻可以完全恢復功能。而我們這個病例是中樞神經系統受 損,維埃諾教授的全套辦法,穿著馬甲靜臥啦,同時進行日光浴啦,再做一 套特殊的體操啦,從一開頭就不能予以考慮,遺憾!真是遺憾!他的方法在 我們這個病例身上,完全無法使用,要這可憐的姑娘把這些復雜煩人的治療 方法從頭到尾去做上一遍,說不定就等于毫無用處地把她折磨一通。事情就 是這樣,這就是我應該讓您知道的事。現在您明白了事情的真實情況如何, 您讓這可憐的姑娘空抱希望,滿心以為過不了幾十月,她又可以生龍活虎地 跳跳蹦蹦,翩翩起舞。這是多麼輕率!誰也別想從我嘴里听到這樣荒謬愚蠢 的一番活。可您魯莽性急地答應把天上的月亮和星星摘下來,現在大家都抓 住您不放,這是有道理的。歸根到底,把這事情搞亂的是您,就您一人。” 我覺得我的手指頭漸漸發僵。從我在桌上看到那份電報的那一瞬起,我 像已下意識地預感到這一切了。盡管如此,現在康多爾以無情的就事論事的 態度把情況給我一講清楚,我覺得,就像有人用把鈍斧子朝我頭上劈了一下。 我本能地感到需要抵抗。我不願讓他把全部責任都推在我身上。可是最後從 我嘴里逼出來的幾句話,听上去竟像一個在于壞事被人當場抓住的小學生在免费三级现频在线观看 我還想趕快把毯子蓋在他的腳上,免得他著涼,可是就在這短促的一瞬 間,發生了使人吃驚的事情,他突然一把抓住我的雙手,緊緊地抓住我左右 兩手的手腕,我還沒來得及掙脫,他已經把我的雙手拉到他的嘴邊,吻了我 的右手,再吻左手,再吻一次我的右手和左手。伦理片在线手机伦理片 底問他什麼。對這件事情的記憶已經淹沒在一片沉重的黑暗之中,就像天上 的月亮為疾馳飛奔的烏雲所吞噬。可是我一直感到那個不明確的思想還在我 腦子里跳動,就像一種騷動不寧地刺人的疼痛,不斷可以使人感到。 番安慰給了他力量,使他振作起來。他已經不像剛才那樣走起路來搖搖晃晃。 他跟我一起,腳步凌亂,急急忙忙地趕到那停著等他的汽車旁邊。司機幫他 坐進車里。這時我才感到一塊石頭落地。我知道他已安全上車。我已經安慰 過他。現在他終于可以回去睡覺了,這個心靈受到強烈震撼的老人,他會睡 得香甜安寧,滿懷幸福。秀色在线观看 “這件事情成了他生活中的轉折點。從這天起,這個商業方面的苦行憎 身上發生了一點變化。他從小侍奉的一個神明——金錢——對他來說業已死 去。現在他在世界上還剩一個神,這就是他的女兒。他雇用了好些家庭女教 師和用人,把府邪加以翻修。他過去如此節儉,這時覺得任何奢侈都嫌不足。 女兒才十來歲,他就帶著她到尼斯、巴黎、維也納去,對她寵愛嬌慣,達到 最最荒誕不經的程度。他過去攫取金錢時狂熱已極,現在他同樣狂熱地把錢 大把大把地扔出去,仿佛根本不把錢財當回事。您剛才說他高貴、典雅,也 許並不是完全沒有道理,因為多年來他的確漸漸養成了一種對賺錢和蝕本異 乎尋常的滿不在乎的態度。他用幾百萬巨款也無法買回他妻子的生命,從此 以後,他學會了輕視金錢。 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