Project

General

Profile

« Previous | Next » 

Revision be1478a2

Added by Alexander Oppermann almost 9 years ago

Fixed problem for toolbar and new authentification object. Added getter method to CdmVaadinAuthentication, in order to get the principal object with user name and roles.

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java
52 52
    private static final long serialVersionUID = 1L;
53 53
    @AutoGenerated
54 54
	private AbsoluteLayout mainLayout;
55
    private HorizontalToolbar toolbar;
55 56
	@AutoGenerated
56 57
	private Table table;
57 58

  
......
65 66

  
66 67
	List<String> columnList;
67 68
	ArrayList<String> headerList;
68
	private HorizontalToolbar toolbar;
69 69

  
70 70
	/**
71 71
	 * The constructor should first build the main layout, set the
......
288 288
	        public Object generateCell(Table source, Object itemId, Object columnId) {
289 289
	            Property containerProperty = source.getContainerProperty(itemId, columnId);
290 290
	            Object item = itemId;
291
	            final Object value = containerProperty.getValue();
291
	            Object value = null;
292
	            if(containerProperty != null){
293
	                value = containerProperty.getValue();
294
	            }
292 295
	            Container containerDataSource = source.getContainerDataSource();
293 296
	            final UUID uuid = UUID.fromString(table.getItem(itemId).getItemProperty("uuid").getValue().toString());
294 297
	            final ComboBox box = new ComboBox("Occurrence Status: ", listener.getPresenceAbsenceContainer());
295 298
	            final String area = columnId.toString();
296 299
	            box.setImmediate(true);
300
	            final Object value1 = value;
297 301
	            box.addValueChangeListener(new ValueChangeListener() {
298 302
	                @Override
299 303
	                public void valueChange(ValueChangeEvent event) {
300 304
	                    Taxon taxon = (Taxon)listener.getTaxonService().load(uuid);
301
	                    if(value==null){
305

  
306
	                    if(value1==null){
302 307
	                        listener.createDistributionField(taxon, box.getValue(), area);
303 308
	                        Notification.show("Create Status", Notification.Type.TRAY_NOTIFICATION);
304 309
	                    }else{
......
315 320
	                private static final long serialVersionUID = 1L;
316 321
	                @Override
317 322
	                public String getMinimizedValueAsHTML() {
318
	                    return refreshValue(box, value);
323
	                    return refreshValue(box, value1);
319 324
	                }
320 325
	                @Override
321 326
	                public Component getPopupComponent() {
322 327
	                    //FIXME: find a better solution
323
	                    box.setValue(compareObjectToPAT(value));
328
	                    box.setValue(compareObjectToPAT(value1));
324 329
	                    box.setBuffered(true);
325 330
	                    return box;
326 331
	                }

Also available in: Unified diff