0

Scrollbar in Listbox moves to last selected item

asked 2018午夜福利伦理午夜泡泡视频伦理片92伦理午夜南都电源总经理醉驾后信披或被拘 7亿对赌能否完成?

發布時間︰

子壞水的陌生老頭,看見他躺在地上,淚流滿面,睜開眼楮,向那富有同情 心的青年乞求幫助,然後看見他騎在年輕人肩上。這個妖精一頭自發,紛披 在兩邊,戴著一副金絲邊眼鏡。我像閃電一樣飛快地把開克斯法爾代的臉安 在故事里的那個老頭身上,這完全出自本能,平時只有做夢才能這樣迅速地 把各種圖像和許多人的臉孔拉在一起,互相替代,而我自己一下子變成了那 頭不幸的坐騎,被他鞭打,往前驅趕。可不是,我清清楚楚地感到我的脖子 給夾得死緊,簡直氣都透不出來。手里的書掉落地上,我躺在床上,渾身冰 冷,只听見我的心髒敲擊著肋骨,冬冬直響,宛如打在硬本上。就是在睡夢 中,這凶惡的獵手還驅趕著我東奔西跑,我不知道跑向哪里。等我第二天早 上醒來,頭發濕漉漉的,我感到精疲力竭,疲憊不堪,仿佛經過了長途跋涉。 上午我和伙伴們一起騎馬出操,我按照條例,認真細致、頭腦清醒地值 勤服役,可這都無濟于事;下午我剛走出城外,沿著那無法回避的道路向府 邪走去,我又感到肩膀上那陰森森的重負。因為我預感到,我現在開始承擔 的責任,已經變成一種嶄新的、艱難得無法估量的責任,我的良心惴惴不安。 那天夜里在花園里的椅子上我對老人說,他的女兒有希望在最近獲得痊愈, 我這些言過其實的話只不過是出于同情心。我沒說實話,這是無意識的,甚 至是違背我的意志的,但這決不是有意識的蒙騙,決不是粗暴的欺騙。從現 在起則相反,我已經知道,很快把病治好是辦不到的,我就得冷靜地、硬著 頭皮裝假,處心積慮、持續不斷地裝假,我就得裝出叫人看不透的表情,用 一種堅信不疑的腔調撒謊,活像一個狡猾透頂的罪犯,幾周之前,幾個月之 前就已經把他的行動和他的辯護的每一個細枝末節都精心設計、考慮周詳。 我生平第一次開始懂得,這個世界上最惡劣的壞事並不是由邪惡和殘暴所造2018午夜福利 限,我不相信,醫生現在就能確定日期??再說??康多爾大夫只是這麼泛 泛地談了一下這種方法??他說,這種方法听人說會收到非常出色的療效, 但是,它是否完全可靠??我的意思是,這只能根據具體情況具體進行試驗 了??反正得等待,等到他??”伦理午夜泡泡视频 听得出里面夾著一股真誠感到遺憾的聲調。 “‘是的,’她說道,垂下了頭。在這聲‘是的’里面並不包含任何快 他的兩條短腿向車站跑去。我覺得,他有點平足。伦理片92伦理午夜 可是,快樂的心情,使人胸懷歡暢,在這麼一個陽光明媚的六月大,邁 動兩條年輕有力的腿爬上這曲曲彎彎的樓梯,透過四壁的窗戶,依次望見東 南西北,看到伸向無邊無際的遙遠地方的夏日田野風光,也是一種賞心悅目 的樂事。最後只剩下十一二步樓梯就到露台了,忽然有件出乎意料的事情使 我站住腳步。因為說也奇怪,在昏黑的樓梯間里忽然傳來一縷舞曲的旋律, 輕柔悠揚,如真如幻,小提琴奏出主旋律,大提琴伴奏,飄蕩在琴聲之上的, 是微弱的女聲動人心弦的花腔。我不勝驚訝。從什麼地方飄來這陣音樂!近 在咫尺,同時又遠在大邊,悠揚婉轉,恰似天國仙樂,同時又是塵世之音, 是喜歌劇中的一支流行曲,仿佛是從天上飄落人間。莫非是在附近什麼地方 的一家酒店里,也許有個樂隊在演奏,微風把這即將消逝的旋律最後最輕柔 的震顫吹送過來?可是過一會兒我就听出,這支輕悠的管弦樂隊是從露台上 把樂聲送來的,它不是別的,只不過是一台普通的留聲機。我心中暗忖,我 這人真傻,今天到處感到萬物著魔,到處期待奇跡發生,怎麼可能把整個管 弦樂隊安排在這麼狹窄的塔頂露台上!可是我剛走了幾步,心里又變得惶惑 不安︰在上面奏樂的,毫無疑問是留聲機,然而——那唱歌的聲音,這嗓音 听起來是那樣的自由和逼真,不可能來自一只軋軋作響的小匣子。這是兩個 真正的女孩子的歌聲,唱得天真、歡快、熱情奔放!我停住腳步,豎起耳朵, 更加仔細地傾听。那豐滿的女高音是伊羅娜的聲音,音色優美,音量飽滿, 豐腴柔軟,就和她的胳臂一樣;可是和她一起唱的另外一個嗓音又屬于誰呢? 這聲音我不熟悉。顯然,艾迪特請了一個女朋友,一位非常年輕活潑、動人 心弦的姑娘。我實在好奇極了,急于見一見這只啁啾的小燕子,它如此出人 意料地棲息在我們的塔樓上。因此,當我剛一踏上露台,發現只有兩個姑娘 坐在一起,艾迪特和伊羅娜,而在那兒用一種嶄新的嗓子,無拘無束,銀絲 一樣發出輕柔婉轉、悠揚動听的歌聲、笑聲的就是艾迪特,我的驚愕就更加 大得難以估量。我之所以如此驚訝,因為一夜之間發生這樣的變化,我覺得, 不管怎麼樣,總不大自然。只有一個身體健康、心里踏實的人因為幸福到了 極點,才會這樣無優無慮地放聲歌唱;而這個孩子,這個患病的姑娘卻不可 能是已經恢復健康的啊,除非在昨天夜晚和今天早晨之間的確發生了奇跡。 我暗自驚訝,究竟是什麼使她這樣陶醉,究竟是什麼使她這樣目眩神迷,以 至于這種幸福在望、確有把握的心情一下子從喉嚨里,從心靈里飛了出來? 我最初體驗到的感情,我很難解釋;其實是心里感到很不舒服,就像無意中 撞見姑娘們赤身露體,一絲不掛。因為,要麼是這個患病的姑娘到現在為止 一直在迷惑人,把她真正的本性瞞著我,要不然就是一夜之間有個新人在她 身上脫穎而出——可是為什麼會這樣,怎麼會這樣的呢? 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