Package info.jtrac.domain.ExcelFile

Examples of info.jtrac.domain.ExcelFile.Column


        public List getObjectList() {
            return excelFile.getColumns();
        }
       
        protected void populateItem(Item item) {           
            final Column column = (Column) item.getModelObject();
            if(column.getColumnHeading() != null) {
                item.add(CLASS_SELECTED);
            }
            Label label = new Label("cell", new PropertyModel(column, "label"));
            label.setRenderBodyOnly(true);           
            item.add(label);           
View Full Code Here


       
        final SimpleAttributeModifier CLASS_SELECTED = new SimpleAttributeModifier("class", "selected");
       
        ListView listView = new ListView("cells", rowCells) {
            protected void populateItem(ListItem item) {
                Column column = excelFile.getColumns().get(item.getIndex());
                item.add(new Label("heading", column.getLabel()));
                final Cell cell = (Cell) item.getModelObject();
                TextArea textArea = new TextArea("value");
                textArea.setModel(new IModel() {
                    public Object getObject() {
                        return cell.getValue();
                    }
                    public void setObject(Object o) {
                        cell.setValue(o);
                    }
                    public void detach() {
                    }                   
                });
                textArea.setLabel(new Model(column.getLabel()));
                textArea.add(new ErrorHighlighter());
                Object value = cell.getValue();
                if (value != null) {
                    if (value instanceof Date) {
                        textArea.setType(Date.class);
                    } else if (value instanceof Double) {
                        textArea.setType(Double.class);
                    }
                }
                item.add(textArea);
                if (column.getColumnHeading() != null) {
                    item.add(CLASS_SELECTED);
                    textArea.setEnabled(false);
                }
            }
        };
View Full Code Here

TOP

Related Classes of info.jtrac.domain.ExcelFile.Column

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.