minor fixes
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133958 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
41915d6745
commit
001bf95ec2
|
@ -13,10 +13,6 @@ public class ResourceCellLeft extends AbstractCell<ResourceElementBean>{
|
||||||
public void render(com.google.gwt.cell.client.Cell.Context context,
|
public void render(com.google.gwt.cell.client.Cell.Context context,
|
||||||
ResourceElementBean value, SafeHtmlBuilder sb) {
|
ResourceElementBean value, SafeHtmlBuilder sb) {
|
||||||
|
|
||||||
// Do not render an object if
|
|
||||||
// - is null;
|
|
||||||
// - has been moved to the other side;
|
|
||||||
// - the parent folder is not null;
|
|
||||||
if (value == null || value.isMovedToRight()) {
|
if (value == null || value.isMovedToRight()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ import com.google.gwt.view.client.SelectionChangeEvent;
|
||||||
/**
|
/**
|
||||||
* The twin column panels for selection of the files to attach to the catalague product.
|
* The twin column panels for selection of the files to attach to the catalague product.
|
||||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class TwinColumnSelectionMainPanel extends Composite{
|
public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
|
|
||||||
|
@ -322,15 +321,16 @@ public class TwinColumnSelectionMainPanel extends Composite{
|
||||||
Iterator<ResourceElementBean> iterator = setSelected.iterator();
|
Iterator<ResourceElementBean> iterator = setSelected.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
ResourceElementBean resourceElementBean = (ResourceElementBean) iterator.next();
|
ResourceElementBean resourceElementBean = (ResourceElementBean) iterator.next();
|
||||||
resourceElementBean.setMovedToRight(false);
|
int index = dataProviderLeft.getList().indexOf(resourceElementBean);
|
||||||
|
if(index != -1){
|
||||||
|
resourceElementBean.setMovedToRight(false);
|
||||||
|
dataProviderLeft.getList().set(index, resourceElementBean); // replace
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh providers
|
// refresh providers
|
||||||
dataProviderLeft.flush();
|
|
||||||
dataProviderRight.flush();
|
dataProviderRight.flush();
|
||||||
dataProviderLeft.refresh();
|
|
||||||
dataProviderRight.refresh();
|
dataProviderRight.refresh();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue