PDA

View Full Version : ListView problem when you select an item



kosaco
5 Apr 2011, 4:16 AM
Hi!

I have the next problem with a ListView object:

http://www.freeimagehosting.net/uploads/1573a41b23.png

http://www.freeimagehosting.net/uploads/d072af1352.png

And my source code:



pendientesView = new ListView<BaseModel>() {
protected BaseModel prepareData(BaseModel model) {
Integer id_imagen = model.get("ID");
model.set("SRC_URL", constants.URL_THUMB() + id_imagen);
return model;
};
};
pendientesView.setId("pendientesView");
pendientesView.setTemplate(getTemplateWithDescartar());
pendientesView.setStore(pendientesStore);
pendientesView.setBorders(false);
pendientesView.setItemSelector("div.thumb-wrap");
pendientesView.getSelectionModel().setSelectionMode(SelectionMode.MULTI);

ContentPanel pendientesListViewPanel = new ContentPanel();
pendientesListViewPanel.setHeading(constants.pendientesProc());
pendientesListViewPanel.getHeader().addStyleName("actual-listview-header");
pendientesListViewPanel.setId("images-view");
pendientesListViewPanel.setBorders(false);
pendientesListViewPanel.setScrollMode(Scroll.AUTOY);
pendientesListViewPanel.add(pendientesView);


private native String getTemplateWithDescartar() /*-{
return ['<tpl for=".">',
'<div class="thumb-wrap" id="{NO_IMAGEN}">',
'<div class="descartar" id="descartar_{NO_IMAGEN}" onClick="invokeNativeEvent(\'descartarButton\',\'BUTTON\',\'click\')"></div>',
'<div class="thumb">',
'<img src="{SRC_URL}" title="{NO_IMAGEN}"/>',
'</div>',
'<span class="x-editable">{NO_IMAGEN}</span>',
'</div>',
'</tpl>',
'<div class="x-clear"></div>'].join("");
}-*/;



And I use the next css:



#images-view .x-panel-body {
-moz-font-feature-settings: normal;
-moz-font-language-override: normal;
-x-system-font: none;
background-attachment: scroll;
background-clip: border-box;
background-color: white;
background-image: none;
background-origin: padding-box;
background-position: 0 0;
background-repeat: repeat;
background-size: auto auto;
font-family: Arial,Helvetica,sans-serif;
font-size: 11px;
font-size-adjust: none;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: normal;
}

#images-view .thumb {
background-attachment: scroll;
background-clip: border-box;
background-color: #DDDDDD;
background-image: none;
background-origin: padding-box;
background-position: 0 0;
background-repeat: repeat;
background-size: auto auto;
padding-bottom: 3px;
padding-left: 3px;
padding-right: 3px;
padding-top: 3px;
}

#images-view .thumb img {
height: 60px;
width: 80px;
}

#images-view .thumb-wrap {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-bottom-color: white;
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color-ltr-source: physical;
border-left-color-rtl-source: physical;
border-left-color-value: white;
border-left-style-ltr-source: physical;
border-left-style-rtl-source: physical;
border-left-style-value: solid;
border-left-width-ltr-source: physical;
border-left-width-rtl-source: physical;
border-left-width-value: 1px;
border-right-color-ltr-source: physical;
border-right-color-rtl-source: physical;
border-right-color-value: white;
border-right-style-ltr-source: physical;
border-right-style-rtl-source: physical;
border-right-style-value: solid;
border-right-width-ltr-source: physical;
border-right-width-rtl-source: physical;
border-right-width-value: 1px;
border-top-color: white;
border-top-style: solid;
border-top-width: 1px;
float: left;
margin-bottom: 4px;
margin-left: 4px;
margin-right: 0;
margin-top: 4px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
}

.x-theme-access #images-view .thumb-wrap {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-bottom-color: #232D38;
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color-ltr-source: physical;
border-left-color-rtl-source: physical;
border-left-color-value: #232D38;
border-left-style-ltr-source: physical;
border-left-style-rtl-source: physical;
border-left-style-value: solid;
border-left-width-ltr-source: physical;
border-left-width-rtl-source: physical;
border-left-width-value: 1px;
border-right-color-ltr-source: physical;
border-right-color-rtl-source: physical;
border-right-color-value: #232D38;
border-right-style-ltr-source: physical;
border-right-style-rtl-source: physical;
border-right-style-value: solid;
border-right-width-ltr-source: physical;
border-right-width-rtl-source: physical;
border-right-width-value: 1px;
border-top-color: #232D38;
border-top-style: solid;
border-top-width: 1px;
}

#images-view .thumb-wrap span {
display: block;
overflow-x: hidden;
overflow-y: hidden;
text-align: center;
}

#images-view .x-view-item-over {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-attachment: scroll;
background-clip: border-box;
background-color: #EFEFEF;
background-image: url(../images/default/grid/row-over.gif);
background-origin: padding-box;
background-position: left top;
background-repeat: repeat-x;
background-size: auto auto;
border-bottom-color: #DDDDDD;
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color-ltr-source: physical;
border-left-color-rtl-source: physical;
border-left-color-value: #DDDDDD;
border-left-style-ltr-source: physical;
border-left-style-rtl-source: physical;
border-left-style-value: solid;
border-left-width-ltr-source: physical;
border-left-width-rtl-source: physical;
border-left-width-value: 1px;
border-right-color-ltr-source: physical;
border-right-color-rtl-source: physical;
border-right-color-value: #DDDDDD;
border-right-style-ltr-source: physical;
border-right-style-rtl-source: physical;
border-right-style-value: solid;
border-right-width-ltr-source: physical;
border-right-width-rtl-source: physical;
border-right-width-value: 1px;
border-top-color: #DDDDDD;
border-top-style: solid;
border-top-width: 1px;
padding-bottom: 4px;
padding-left: 4px;
padding-right: 4px;
padding-top: 4px;
}

#images-view .x-view-item-sel {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-attachment: scroll;
background-clip: border-box;
background-color: #EFF5FB;
background-image: none;
background-origin: padding-box;
background-position: right bottom;
background-repeat: no-repeat;
background-size: auto auto;
border-bottom-color: #99BBE8;
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color-ltr-source: physical;
border-left-color-rtl-source: physical;
border-left-color-value: #99BBE8;
border-left-style-ltr-source: physical;
border-left-style-rtl-source: physical;
border-left-style-value: solid;
border-left-width-ltr-source: physical;
border-left-width-rtl-source: physical;
border-left-width-value: 1px;
border-right-color-ltr-source: physical;
border-right-color-rtl-source: physical;
border-right-color-value: #99BBE8;
border-right-style-ltr-source: physical;
border-right-style-rtl-source: physical;
border-right-style-value: solid;
border-right-width-ltr-source: physical;
border-right-width-rtl-source: physical;
border-right-width-value: 1px;
border-top-color: #99BBE8;
border-top-style: solid;
border-top-width: 1px;
padding-bottom: 4px;
padding-left: 4px;
padding-right: 4px;
padding-top: 4px;
}

#images-view .x-view-item-sel .thumb {
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: none;
background-origin: padding-box;
background-position: 0 0;
background-repeat: repeat;
background-size: auto auto;
}

#images-view .loading-indicator {
background-image: url('../images/default/grid/loading.gif');
background-position: left center;
background-repeat: no-repeat;
font-size: 11px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
padding-left: 20px;
}


Could be a ListView bug?

Regards!