0

Scrollbar in Listbox moves to last selected item

asked 一级a做爰片黄色一级全祼一级黄碟刘晓春:上海国际金融中心的建设要考虑两个着力点

發布時間︰

你干得真棒??七百萬,那全家都能沾點光,”他們大家七嘴八舌他說個不 停,臉上堆著獰笑。“棒啊,真棒,”貝拉姨媽咂吧著嘴說道,“這樣弗朗 茨也還撈得著上大學。是門好親事!”“除此之外,听說還是個貴族之家呢,” 我哥哥用大禮帽遮著嘴,顫著聲音嚷道。可是黛西伯母已經扯起她那白鸚一 樣的高嗓門插起嘴來。“嘿,貴族門第這事還得仔細查一查,”現在我媽走 近幾步,怯生生地細聲細氣他說道︰“你倒是把她給我們介紹一下呀,你的 那位‘未婚妻小姐’?”??介紹???這可是最糟不過的事了,他們大家 都會看見那副拐杖,看見我因為我那愚蠢的同情心給自己惹來了多大的麻 煩??我可得要提防著點??再說——我又怎麼能介紹她呢,我們不是在弗 洛里阿尼胡同四樓上康多爾的家里嗎??這個瘸腿姑娘一輩子也爬不上這八 十級樓梯啊??不過他們大家為什麼現在都扭過頭去,仿佛隔壁房間里出了 什麼事似的???就是我自己也感到背後有穿堂風??在我們背後準是有人 把房門打開了。是不是未了又有什麼人來了???是的,我听見有什麼東西 過來了??從樓梯口傳來呻吟聲,重物壓著樓梯的咯吱咯吱聲??有什麼東 西氣喘吁吁地,掙扎著爬上樓來了??篤、篤、篤、篤,??我的天啊,別 是她真的上樓來了!??她拄著雙拐,可要把我的臉都丟盡了??當著這幫 幸災樂禍的親友,我可真要羞慚得鑽到地縫里去了??然而這真可怕,這的 確是她,只可能是她??篤、篤、篤、篤,我是熟悉這聲音的,??篤、篤、 篤、篤,聲音越來越近??她馬上就要到樓上來了??最好我把這房門插 上??可這時我哥哥已經把大禮帽摘下,向我背後篤、篤的聲音鞠了一躬?? 他究竟在向誰鞠躬啊,為什麼彎腰彎得這麼低??陡然間他們都放聲大笑起 來,笑得窗玻璃都叮叮直響。“原來這樣,原來這樣,原來這——樣,原來 這——樣!哈哈??哈哈??七百萬家產原來是這——副模樣,七百萬家 產??啊哈哈??啊哈哈??把這雙拐也添上當陪嫁吧,啊哈哈,啊哈 哈??” 可是在我把手指竭力捏緊的一剎那,我突然感覺到有什麼硬邦邦的異物 夾在于指中間。是一小時前艾迪特滿臉通紅戴在我手指上的那枚戒指!我贊 同地接受下來的那枚訂婚戒指!我已經沒有足夠的力氣把這閃閃發亮的證明 我撒謊的物證從手指上取下來。我只是像個賊似的用一個怯懦的動作,趕快 把寶石往里面一轉,然後再伸出手去和伙伴們告別。一级a做爰片 茨威格在本書里采用的是他十分擅長的心理分析的方法和本世紀初奧地 利作家阿爾圖爾?施尼茨勒開始采用、後來為喬伊斯、沃爾夫加以發展的“內 心獨白”(即“意識流”)的手法。如果說,心理分析是對靈魂的剖析,那 麼內心獨白便是靈魂的自我披露。施尼茨勒說過︰人的靈魂是一片廣袤的土 地。心理分析派的小說家就致力于人們靈魂的發掘和刻畫。在這類小說里, 沒有傳統小說中必不可少的那個全知全能的敘述者把人物的內心世界、感情 起伏和事件背景全部告訴讀者,而是由書中的主人公現身說法自我交待,或 者以主人公內心獨白的方式向讀者敞開心扉,讓讀者瞥見人物靈魂深處最幽 微、最隱秘的角落,感覺到靈魂最精微的震顫。《愛與同情》這部長篇小說 的特點和茨威格中篇小說中的名篇《一個陌生女人的來信》、《象棋的故事》、黄色一级全祼 把他送走。驚慌之中,他只希望,艾迪特一點也沒听見藥劑師的那些粗魯不 堪的猜疑。然而不幸的是,辦公室的窗戶侗開,這些話越過天井清晰可聞地 一直傳入客廳的窗口,而艾迪恃就坐在那里。大概她當時立刻就下定了計劃 已久的決心。可是她還是善于作假;她再一次叫人把新衣服拿來給她看,和 伊羅娜一起揚聲大笑,對父親態度親切,七問八問,問了好多瑣碎的小事, 什麼這個、那個有沒有準備好,裝進箱子。可是暗地里,她悄悄地委托約瑟 夫給軍營里打個電話,問我什麼時候回來,有沒有留下句話。軍營里值勤的 傳令兵如實地告訴他,我是因公調離,時間未定,沒有給任何人留下什麼消 息。這番話起了決定作用。她為心靈的焦的所折磨,一天也不願等,一小時 也不願等。我使她極端失望,使她受到致命的打擊,她再也不願繼續信任我, 我的軟弱竟不幸地使她堅強起來。 經在院子里集合。我剛好來得及走到隨軍神甫旁邊,師長已經出來。他的步一级黄碟 “那麼——現在就談到這兒吧。明天早上,五點半。” 我立正。他向我走來。 “偏偏是你干出了這種蠢事!我真不舍得把你送到斯察斯勞去交給那幫 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