Issue Details (XML | Word | Printable)

Key: UBA-7616
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Marcel Rüedi
Reporter: Daniel Grob
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ULCBase

NullPointerException in table binding when adding a bean with indexed properties

Created: 20/Nov/08 03:32 PM   Updated: 09/Jan/09 12:20 PM
Component/s: applicationframework
Affects Version/s: None
Fix Version/s: UltraLightClient '08 Update 2


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Daniel Grob added a comment - 20/Nov/08 03:33 PM
The following snippet reproduces the issue:
import com.ulcjava.applicationframework.application.binding.table.ObservableCollections;
import com.ulcjava.applicationframework.application.binding.table.TableBinding;
import com.ulcjava.base.application.ULCTable;
import com.ulcjava.testframework.development.AbstractSimpleDevelopmentTestCase;

import java.util.ArrayList;
import java.util.List;

public class PRxxxxTest extends AbstractSimpleDevelopmentTestCase {
    
    private List<SnippetBean> fBeans;

    public void start() {
        fBeans = ObservableCollections.createObservableList(new ArrayList<SnippetBean>());
        
        TableBinding<SnippetBean> tableBinding = TableBinding.createTableBindingFromBeanList(fBeans, new ULCTable(), SnippetBean.class);
        tableBinding.addColumnBinding("name");
    }
    
    public void testSnippet() {
        fBeans.add(new SnippetBean());
    }
    
    public static class SnippetBean {
        public String getIndexedProperty(int index) {
            return "indexed property";
        }
        
        public String getProperty() {
            return "property";
        }
    }
    
}