ggeorg / gwt-mosaic

Automatically exported from code.google.com/p/gwt-mosaic
1 stars 0 forks source link

Multi column listbox does not show data in its model #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,
I am using gwt mosaic version 2.0 in my new project.
I try to use multi column listbox.
I writed cell renderer for it. I added objects to listbox model.
And I am using DatePicker. When the value of DatePicker object changed,
I am updating listbox model,but ı can not seee new objects with listbox.
My code is below. Please help.

    gwtDatePickerCaptionPanel = new GwtDatePickerCaptionPanel(){
            @Override
            public void onValueChange(ValueChangeEvent<Date> event) {
                // TODO Auto-generated method stub
                super.onValueChange(event);
                Date selectedDay = event.getValue();
                Date startOfDay = GwtDate.setHour(selectedDay, "00:00");
                Date startOfNextday = GwtDate.add(startOfDay, 1L);
                System.out.println(selectedDay.toString());
                Set<EtkinlikDTO> etkList =
Global.getInstance().getCurrentUser().getEtkinlikDTOList();
                List<EtkinlikDTO> list = new ArrayList<EtkinlikDTO>();
                if(etkList!=null){
                    for (Iterator<EtkinlikDTO> iterator = etkList.iterator(); iterator
                            .hasNext();) {
                        EtkinlikDTO etkinlikDTO = iterator.next();
                        if(etkinlikDTO.getBaslamaZamani().after(startOfDay)  &&
                           etkinlikDTO.getBaslamaZamani().before(startOfNextday))
                            list.add(etkinlikDTO);

                    }
                }
                    setList(createAndSetTimeIntervals(list));//24 saat dilimi i�in 24
nesne olu�turu
                      //bu saat dilimlerinde herhangi birilerinde etkinlik varsa set eder
                      DefaultListModel<GwtTimeInterval> model =
(DefaultListModel<GwtTimeInterval>) listBox.getModel();
//                    for(GwtTimeInterval interval:getList())//buradaki liste zaman
dilimi listesi
//                          model.add(interval);
                      model.clear();
                      model.addAll(getList());

            }
        };

Original issue reported on code.google.com by abdulker...@gmail.com on 2 Jan 2010 at 4:30

GoogleCodeExporter commented 9 years ago

Original comment by georgopo...@gmail.com on 4 Jan 2010 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by georgopo...@gmail.com on 4 Jan 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Hi,

let me know if v0.4.0-rc2 is OK.

Thanks,
George.

Original comment by georgopo...@gmail.com on 7 Jan 2010 at 10:11

GoogleCodeExporter commented 9 years ago
Hi,
I am using gwt-mosaic-0.4.0-rc1

Original comment by abdulker...@gmail.com on 8 Jan 2010 at 5:22

GoogleCodeExporter commented 9 years ago
I expected the code that is below to update  the listbox,but It did not update. 
Also, I noticed if I write the code  in  a listbox event 
handler method such as double click, It works. 
 for(GwtTimeInterval interval:getList())//buradaki liste zaman
                    model.add(interval);
                      model.clear();
                      model.addAll(getList());

below code updates listbox.
      listBox.addDoubleClickHandler(new DoubleClickHandler() {
                        public void onDoubleClick(DoubleClickEvent event) {
//                        InfoPanel.show(InfoPanelType.HUMANIZED_MESSAGE, 
"DoubleClickListener",
//                            listBox.getItem(0).getEtkinlik().getAciklama());
                          listModel.clear();
                          listModel.addAll(getList());
                        }
                      });

Original comment by abdulker...@gmail.com on 8 Jan 2010 at 5:33

GoogleCodeExporter commented 9 years ago
I did some changes for ListBox in 0.4.0-rc2, can you please check if the 
problem is
solved? If not I will continue testing with 0.0.0-rc2.

Thanks,
George.

Original comment by georgopo...@gmail.com on 8 Jan 2010 at 5:33

GoogleCodeExporter commented 9 years ago
Hi,
The problem  still exists in 0.4.0-rc2.

Original comment by abdulker...@gmail.com on 8 Jan 2010 at 10:08

GoogleCodeExporter commented 9 years ago
Can you please test with 0.4.0-rc3 ?

Thanks,
George.

Original comment by georgopo...@gmail.com on 15 Feb 2010 at 5:26

GoogleCodeExporter commented 9 years ago
Hi,

I have also problems with the listbox. It works in 0.4.0-rc2 and GWT 2.0 - now 
I am
using GWT 2.02 and mosaic 0.4.0-rc4 and the listbox doen't appear in the page. 
There
are no (java) errors and when I use firebug to check the HTML all the data is 
there
but it is not visible in the browser.

I didn't change anything in the code for the listbox and did "only" an Update 
of GWT
and the mosiac pieces. 

One strange thin is that the GWT-Designer I use for the gui now can't switch to
design mode anymore and marks a problem in the line with the constructor.

String[] header = new String[] {"Pkey", "Name", "Klassifizierung",
"Land","PLZ","Ort","Strasse","Hausnummer","Vorwahl","Telefon"};

loklist = new ListBox<LokList>(header);

Before the update everything works fine. 

Do you have an idea what is going wrong there?

Thanks

Karsten

Original comment by kars...@porkypie.de on 22 Feb 2010 at 7:09

GoogleCodeExporter commented 9 years ago
Hi,

I now put the Listbox (that doesn't appear in the browser) into a Dialogbox and 
it
appears - strange.

Do you have an idea why it not appear without a Dialogbox? I didn't change 
anything
in the code.

Hope you can help me - the Listbox is a great Widget and I want to use it in 
several
parts of my app.

Thanks
Karsten

Original comment by kars...@porkypie.de on 6 May 2010 at 8:14

GoogleCodeExporter commented 9 years ago
Hi again,

some more information. The Listbox stay with some other widgets in a 
DisclosurePanel.
When the panel is open and the data is loaded the ListBox is visible with the
content- if the Panel is closed the data is in the HTML but the ListBox is not
visible. All other widgets in that panel are visible all the time.

Really strange..to avoid "problems" with the CSS I set all the styles to the 
basic
gwt-styles.

Hope you have an idea...

Karsten

Original comment by kars...@porkypie.de on 6 May 2010 at 11:30

GoogleCodeExporter commented 9 years ago
And again...

when I fill the ListBox when the disclosure panel is closed most of the width 
and
height values of the ListBox are set to "0" - that is the reason why it is not
visible in the browser - the question is why these values are set to "0"? That 
must
be done in the widget...

Original comment by kars...@porkypie.de on 6 May 2010 at 1:58

GoogleCodeExporter commented 9 years ago
Hi everybody !
This problem still persists. I am using gwt-mosaic-0.4.0-rc4 nad the listBox 
still does not appear. Any hints how to workaround it? 

Thanks for any ...

Original comment by jan.krys...@gmail.com on 15 Oct 2010 at 9:15