0

Scrollbar in Listbox moves to last selected item

asked caoporn在线成人视频99草九九视频在线观看人人看超碰97科学家首次造出分子开关,有望自动调节任意细胞功能

發布時間︰

現在上哪兒去呢!可別回家去!千萬別上樓到那間空空蕩蕩的小屋里去, 千萬別裝了一腦子這些可惡的思想一個人呆著!最好再喝點什麼,喝點什麼 冷的、辣的,因為我嘴里又感覺到那股討厭的苦味了。也許我想嘔吐掉的就 是這些思想吧——快把這一切沖掉,用火燒掉,抹掉,削掉!啊,這種可惡 的感覺,真叫人不寒而栗!快進城去!妙極了——市政廳廣場上的那家咖啡 館還沒關門。掛了窗簾的玻璃窗後面還有燈光從縫隙中射出來。啊——現在 快喝點什麼,快喝點什麼! 五十五caoporn在线成人视频 我點燃了煙。就只坐一會兒,我用兩手托著我那昏昏沉沉的腦袋,想一 想,思索一下,把事情想清楚,想了一樁再想另一樁。從這兒想起吧—一我 訂了婚??人家給我訂的婚??呵是這只有??才算數??不,不要躲躲閃 閃??這是算數的,這是算數的??我吻了她的嘴,我是自覺自願地這樣吻 她的。不過,這樣做,只是為了寬慰她啊,因為我知道,她的病是永遠也不 會痊愈的??她剛才不是又像根木棍一樣地跌倒了嗎??這樣一個人我是根 本不能跟她結婚的,她不是一個真正的女人,她只是??可是他們下會放過 我,不,他們不會再把我放開,??這老人,這個精怪,這個精怪,這個長 著一張憂郁的老實人的臉︰戴了一副金絲邊眼鏡的精怪,他要拼命抓住我, 絕不讓我把他甩掉??他永遠抓住我的手臂,一個勁地抓住我的同情心,我 這該死的同情心,把我拽回來。明天他們就要在全城到處宣揚這件事情,把 它登報,這樣就沒有挽回的余地了??是不是最好現在就給家里人打個招 呼,免得媽媽、爸爸先從別人那里或者甚至于從報上得到這個消息?跟他們 解釋一下,我為什麼訂了婚,這是怎麼回事,婚事並不怎麼著急,這並不是 當真結婚,我完全出于同情心才訂這婚事的??唉,這該死的同情心,這該 死的同情心!就是在團里,大伙也不會理解這件事,伙伴當中沒有一個人會 理解。施泰因許貝對巴林凱的事都說了些什麼,“要賣身,至少得賣個好價 錢??”啊,天主啊,這幫人都會說些什麼啊——我自己也弄不明白,我怎 麼會跟??會跟這麼病弱的人訂婚的??要是黛西伯母知道這事,就更了不 得了。她這人看問題尖銳,眼楮里揉不得沙子,她是不懂開玩笑的。什麼貴 族稱號,府邸莊園,別想騙她,她馬上就去翻閱哥達貴族一覽表?,不出兩天, 她就會查出來,這個開克斯法爾伐從前就是菜默爾?卡尼茲,艾迪特是半個 猶太女人。對于黛西伯母,世界上最可怕的事情,莫過于在親戚當中出現了 猶太人??我母親還好對付,錢就會把她鎮住,開克斯法爾伐不是說過嗎, 有六七百萬家產??可是我根本不把他的錢放在眼里,我根本沒有想過真要 娶她為妻,哪怕把全世界的錢都給我,我也不干。??我不是只答應過,等 她的病治好以後,只有在那時候??可是叫我怎麼能把這事跟他們解釋清楚 呢??團里所有的人,本來就已經有點反對這個老人了,在這種事情上他們 都他媽的挑剔得要命??我已經知道他們要說︰團隊的榮譽??這點他們連 巴林凱也沒有原諒。他們冷嘲熱諷他說,巴林凱把自己賣了,賣身給這頭荷 蘭老母牛。等到他們一看見那副拐杖,那就更糟了??不,我最好還是不寫 信告訴家里,暫時誰也不讓知道,一個人也不許知道這事,我不能讓全食堂99草九九视频在线观看人人看 茨威格在《愛與同情》中給我們刻畫了一個被視為勇士的怯懦者的形象超碰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:

<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