0

Scrollbar in Listbox moves to last selected item

asked 一本道无码一级毛片一级b美女一级片互联网医院正崛起 上市药企收购医院或成"烫手山芋"

發布時間︰

一本道无码一级毛片 《音樂與音樂家》月刊十二月號上有篇文章叫做Liszt'sDaughterWhoRanWagner'sBayreuth[《瓦格納拜魯特音樂節主持人李斯特之女》],作者是現代巴赫專家Dr.AlbertSchweitzer[艾伯特施韋澤醫生]?,提到CosimaWagner[柯西馬瓦格納]指導的BayreuthFestival[拜魯特音樂節]有兩句話︰Atthemostmovingmomentstherewerelackimgthatspontaneityandthatnaturalnesswhichcomefromthefactthattheactorhaslethimselfbecarriedawaybyhisplayingandsosurpasshimself.Frequently,itseemedtome,perfectionwasobtainedonlyattheexpenseoflife.[在最感人的時刻,缺乏了自然而然的真情流露,這種真情的流露,是藝術家演出時興往神來,不由自主而達到的高峰。我認為一般藝術家好像往往得犧牲了生機,才能達到完滿。]其中兩點值得注意︰(一)藝術家演出時的“不由自主”原是犯忌的,然而興往神來之際也會達到前所未有的高峰,所謂surpasshimself=超越自己。(二)完滿原是最理想的,可不能犧牲了活潑潑的生命力去換取。大概這兩句話,你听了一定大有感觸。怎麼能在“不由自主”(carriedbyhimself)的時候超過自己而不是越出規矩,變成“野”、“海”、“狂”,是個大問題。怎麼能保持生機而達到完滿,又是個大問題。作者在此都著重在spontaneityandnaturalness[真情流露與自然而然]方面,我覺得與個人一般的修養有關,與能否保持童心和清新的感受力有關。一级b 從去年冬天起,黨中央頒布了關于農業工作十二條,今年春季又擴充為六十條,糾正過去人民公社中的歪風(所謂亂刮共產風),定出許多新的措施,提高農民的積極性,增加物質報酬,刺激生產。大半年以來農村情況大有改變,農民工作都有了勁,不再拖拉,磨洋工。據說六十條是中央派了四十人的調查團,分別深入各地,住在農民家中實地調查研究以後得出的結論。可見黨對人民生活的關心,及時大力扭轉偏差,在天災頻仍的關頭提出“大辦農業,大種糧食”的口號。我個人感覺︰人事方面,社會主義制度下最重要的關鍵仍然要消滅官僚主義;農業增產要達到理想指標必須機耕與化肥兩大問題基本解決以後才有可能。並且吾國人民的飲食習慣倘不逐漸改變,不用油脂和蛋白、肉類,來代替大量的澱粉,光靠各類增產還是有困難。吾國人口多,生育率高,消耗澱粉(米、麥、高粱及一切雜糧)的總量大得驚人,以絕大部分的可耕地種谷類所能供應人的熱力(即加洛里),遠不如少量面積種油脂作物所能供應人的熱量為多。在經濟核算上,在國民健康觀點上,油脂的價值遠過于谷類。我們工農階級的食物,油脂與澱粉質消耗的比例,正好和西歐工農在這兩類上的比例相反。結果我們的胃撐得很大,到相當年紀又容易下垂,所得營養卻少得可憐。但要改變大家幾千年來多吃谷類的習慣大不容易,至少也要一二代才能解決。同時增加油脂作物和畜牧生產也是件大事。以上僅僅是我個人的感想,社會上尚未听見有人提出。 要說exile[放逐],從古到今多少大人物都受過這苦難,但丁便是其中的一個;我輩區區小子又何足道哉!據說《神曲》是受了exile[放逐]的感應和刺激而寫的,我們倒是應當以此為榜樣,把exile[放逐]的痛苦升華到藝術中去。以上的話,我知道不可能消美女一级片 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