Package org.richfaces.model

Examples of org.richfaces.model.ArrangeableState


        Assert.assertTrue(table.createExtendedDataModel() instanceof Arrangeable);
        MockArrangeableModel model = new MockArrangeableModel();
        table.setValue(model);
        table.setSortPriority(sortPriority);
        Assert.assertSame(model, table.createExtendedDataModel());
        ArrangeableState state = model.getState();
        List<FilterField> filterFields = state.getFilterFields();
        for (int i = 0; i < sortPriority.size(); i++) {
            Assert.assertEquals("id" + i, filterFields.get(i).getFilterExpression().getValue(elContext));
        }
        List<SortField> sortFields = state.getSortFields();
        for (int i = 0; i < sortPriority.size(); i++) {
            Assert.assertEquals(sortPriority.get(i), sortFields.get(i).getSortBy().getValue(elContext));
        }
        Assert.assertEquals(facesContext.getViewRoot().getLocale(), state.getLocale());
    }
View Full Code Here


    protected ExtendedDataModel<?> createExtendedDataModel() {
        ExtendedDataModel<?> dataModel = super.createExtendedDataModel();
        Arrangeable arrangeable = null;
        FacesContext context = getFacesContext();
        ArrangeableState state = createArrangeableState(context);
        if (dataModel instanceof Arrangeable) {
            arrangeable = (Arrangeable) dataModel;
        } else if (state != null) {
            ArrangeableModel arrangebleModel = new ArrangeableModel(dataModel, getVar(), getFilterVar());
            dataModel = arrangebleModel;
View Full Code Here

        }
        return dataModel;
    }

    private ArrangeableState createArrangeableState(FacesContext context) {
        ArrangeableState state = null;
        List<FilterField> filterFields = new LinkedList<FilterField>();
        Map<Object, SortField> sortFieldsMap = new LinkedHashMap<Object, SortField>();
        for (Iterator<UIComponent> iterator = columns(); iterator.hasNext();) {
            UIComponent component = iterator.next();
            if (component instanceof AbstractColumn && component.isRendered()) {
View Full Code Here

        Assert.assertTrue(table.createExtendedDataModel() instanceof Arrangeable);
        MockArrangeableModel model = new MockArrangeableModel();
        table.setValue(model);
        table.setSortPriority(sortPriority);
        Assert.assertSame(model, table.createExtendedDataModel());
        ArrangeableState state = model.getState();
        List<FilterField> filterFields = state.getFilterFields();
        for (int i = 0; i < sortPriority.size(); i++) {
            Assert.assertEquals("id" + i, filterFields.get(i).getFilterExpression().getValue(elContext));
        }
        List<SortField> sortFields = state.getSortFields();
        for (int i = 0; i < sortPriority.size(); i++) {
            Assert.assertEquals(sortPriority.get(i), sortFields.get(i).getSortBy().getValue(elContext));
        }
        Assert.assertEquals(facesContext.getViewRoot().getLocale(), state.getLocale());
    }
View Full Code Here

    protected ExtendedDataModel<?> createExtendedDataModel() {
        ExtendedDataModel<?> dataModel = super.createExtendedDataModel();
        Arrangeable arrangeable = null;
        FacesContext context = getFacesContext();
        ArrangeableState state = createArrangeableState(context);
        if (dataModel instanceof Arrangeable) {
            arrangeable = (Arrangeable) dataModel;
        } else if (state != null) {
            ArrangeableModel arrangebleModel = new ArrangeableModel(dataModel, getVar(), getFilterVar());
            dataModel = arrangebleModel;
View Full Code Here

        }
        return dataModel;
    }

    private ArrangeableState createArrangeableState(FacesContext context) {
        ArrangeableState state = null;
        List<FilterField> filterFields = new LinkedList<FilterField>();
        Map<Object, SortField> sortFieldsMap = new LinkedHashMap<Object, SortField>();
        for (Iterator<UIComponent> iterator = columns(); iterator.hasNext();) {
            UIComponent component = iterator.next();
            if (component instanceof AbstractColumn && component.isRendered()) {
View Full Code Here

TOP

Related Classes of org.richfaces.model.ArrangeableState

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.