当前位置: 首页>>代码示例>>Java>>正文


Java ISortStateLocator类代码示例

本文整理汇总了Java中org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator的典型用法代码示例。如果您正苦于以下问题:Java ISortStateLocator类的具体用法?Java ISortStateLocator怎么用?Java ISortStateLocator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISortStateLocator类属于org.apache.wicket.extensions.markup.html.repeater.data.sort包,在下文中一共展示了ISortStateLocator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: IconOrderByBorder

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public IconOrderByBorder(final DataTable<?, ?> dataTable, final String id, final S property,
        final ISortStateLocator<S> stateLocator) {
    super(id);
    this.property = property;
    this.stateLocator = stateLocator;
    final AjaxFallbackOrderByBorder<S> orderByBorder = new AjaxFallbackOrderByBorder<S>("orderByBorder", property,
            stateLocator) {
        @Override
        protected void onAjaxClick(final AjaxRequestTarget target) {
            target.add(dataTable);
        }
    };
    addToBorder(orderByBorder);
    this.icon = new Icon("icon", (IconType) null);
    orderByBorder.add(icon);
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:17,代码来源:IconOrderByBorder.java

示例2: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected WebMarkupContainer newSortableHeader(String borderId, final String sortBy,
        final String groupBy,
        final ISortStateLocator stateLocator) {
    return new AjaxFallbackOrderByBorder(borderId, sortBy, stateLocator, getAjaxCallDecorator()) {
        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
            target.add(getTable());
        }

        @Override
        protected void onSortChanged() {
            super.onSortChanged();
            getTable().setCurrentPage(0);

            // reset group
            if (stateLocator instanceof IGroupStateLocator) {
                IGroupStateLocator locator = (IGroupStateLocator) stateLocator;
                if (isGroupedBy(locator.getGroupParam(), groupBy)) {
                    boolean ascending = locator.getGroupParam().isAscending();
                    locator.setGroupParam(new SortParam(groupBy, !ascending));
                    locator.getSortState().setPropertySortOrder("", SortOrder.NONE);
                }
            }
        }
    };
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:27,代码来源:AjaxGroupableHeadersToolbar.java

示例3: newGroupByLink

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
private Component newGroupByLink(String id, final ISortStateLocator stateLocator, final String groupProperty) {
    return new AjaxLink(id) {
        @Override
        public void onClick(AjaxRequestTarget target) {
            if (stateLocator instanceof IGroupStateLocator) {
                IGroupStateLocator groupStateLocator = (IGroupStateLocator) stateLocator;
                switchGroupState(groupStateLocator, groupProperty);
                target.add(getTable());
            }
        }

        @Override
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            tag.put("title", "Group By");
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new CancelDefaultDecorator();
        }
    };
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:24,代码来源:AjaxGroupableHeadersToolbar.java

示例4: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected WebMarkupContainer newSortableHeader(final String borderId, final String property,
        final ISortStateLocator locator) {
    return new AjaxFallbackOrderByBorder(borderId, property, locator, getAjaxCallListener()) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onAjaxClick(final AjaxRequestTarget target) {
            target.add(getTable());
        }

        @Override
        protected void onSortChanged() {
            super.onSortChanged();
            getTable().setCurrentPage(0);
        }
    };
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:18,代码来源:DMDAjaxHeadersToolbar.java

示例5: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, final String property, final ISortStateLocator locator) {
    return new AjaxFallbackOrderByBorder(headerId, property, locator) {

        @Override
        protected void onSortChanged() {
            getTable().setCurrentPage(0);
        }
        
        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
        	target.add(getTable());
        }

        @Override
        public void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            ISortState sortState = locator.getSortState();
            SortOrder dir = sortState.getPropertySortOrder(property);
            String cssClass;
            if (dir == SortOrder.ASCENDING) {
                cssClass = "sortable asc";
            } else if (dir == SortOrder.DESCENDING) {
                cssClass = "sortable desc";
            } else {
                cssClass = "sortable";
            }

            if (!Strings.isEmpty(cssClass)) {
                tag.append("class", cssClass, " ");
            }
        }
    };
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:35,代码来源:TableHeadersToolbar.java

示例6: newOrderByLink

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected OrderByLink newOrderByLink(String id, Object property, ISortStateLocator stateLocator) {
    return new OrderByLink(id, property, stateLocator) {

        @Override
        protected void onSortChanged() {
            BasicOrderByBorder.this.onSortChanged();
        }
    };
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:BasicOrderByBorder.java

示例7: newHeadersToolbar

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected AbstractToolbar newHeadersToolbar() {
    return new AjaxFallbackHeadersToolbar<String>(this, (ISortableDataProvider<Object, String>) getDataProvider()) {
        @Override
        protected WebMarkupContainer newSortableHeader(final String headerId, final String property,
                final ISortStateLocator<String> locator) {
            return ModelDataTable.this.newSortableHeader(getTable(), headerId, property, locator);
        }

    };
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:11,代码来源:ModelDataTable.java

示例8: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, final String property, final ISortStateLocator locator) {
    return new AjaxFallbackOrderByBorder(headerId, property, locator) {

        @Override
        protected void onSortChanged() {
            getTable().setCurrentPage(0);
        }

        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
        	target.add(getTable());
        }

        @Override
        public void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            ISortState sortState = locator.getSortState();
            SortOrder dir = sortState.getPropertySortOrder(property);
            String cssClass;
            if (dir == SortOrder.ASCENDING) {
                cssClass = "sortable asc";
            } else if (dir == SortOrder.DESCENDING) {
                cssClass = "sortable desc";
            } else {
                cssClass = "sortable";
            }

            if (!Strings.isEmpty(cssClass)) {
                tag.append("class", cssClass, " ");
            }
        }
    };
}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:35,代码来源:TableHeadersToolbar.java

示例9: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, Object property, ISortStateLocator locator) {
    return new BasicOrderByBorder(headerId, property, locator) {

        @Override
        protected void onSortChanged() {
            getTable().setCurrentPage(0);
        }
    };
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:11,代码来源:TableHeadersToolbar.java

示例10: newOrderByLink

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected OrderByLink newOrderByLink(String id, Object property, ISortStateLocator stateLocator) {
    return new OrderByLink(id, property, stateLocator, new OrderByLink.VoidCssProvider()) {

        @Override
        protected void onSortChanged() {
            BasicOrderByBorder.this.onSortChanged();
        }
    };
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:11,代码来源:BasicOrderByBorder.java

示例11: newSortableHeader

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, S property, ISortStateLocator<S> locator) {
    return new OrderByBorder<S>(headerId, property, locator, new OrderByLink.CssProvider<S>("", "", "")) {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onSortChanged() {
            getTable().setCurrentPage(0);
        }
    };
}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:12,代码来源:HeadersToolbar.java

示例12: DataPanel

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public DataPanel(String id, int rowsPerPage) {
    super(id);
    List<IColumn> columns = getColumns();
    
    SortableListModel<T> sortableListModel = getSortableListModel();
    
    SortableDataProvider dataProvider = new SortableListDataProvider(sortableListModel);
    dataTable = new DataTable("dataTable", columns.toArray(new IColumn[0]), dataProvider, rowsPerPage);
    add(dataTable);
    dataTable.setOutputMarkupId(true);
    dataTable.setVersioned(false);
    dataTable.addTopToolbar(new AjaxFallbackHeadersToolbar(dataTable, dataProvider) {
        @Override
        protected WebMarkupContainer newSortableHeader(String borderId,
                String property, ISortStateLocator locator) {
            WebMarkupContainer sortableHeader = super.newSortableHeader(borderId, property, locator);
            sortableHeader.add(new SimpleAttributeModifier("scope", "col"));
            return sortableHeader;
        }
    });
    dataTable.addBottomToolbar(new AjaxNavigationToolbar(dataTable) {
        @Override
        protected PagingNavigator newPagingNavigator(String navigatorId,
                DataTable table) {
            return new AutoHidePagingNavigator(navigatorId, table);
        }
    });
    dataTable.addBottomToolbar(new NoRecordsToolbar(dataTable));
    dataTable.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:31,代码来源:DataPanel.java

示例13: DataViewOrderByLink

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
/**
 * @param id
 * @param property
 * @param stateLocator
 * @param cssProvider
 */
public DataViewOrderByLink(String id, String property, DataView dataView,
        ICssProvider cssProvider) {
    super(id, property, (ISortStateLocator) dataView.getDataProvider(),
            cssProvider);
    this.dataView = dataView;
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:13,代码来源:DataViewOrderByLink.java

示例14: TableHeadersToolbar

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public TableHeadersToolbar(DataTable<T, String> table, ISortStateLocator stateLocator) {
    super(table, stateLocator);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:4,代码来源:TableHeadersToolbar.java

示例15: BasicOrderByBorder

import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected BasicOrderByBorder(String id, Object property, ISortStateLocator stateLocator) {
    super(id, property, stateLocator);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:4,代码来源:BasicOrderByBorder.java


注:本文中的org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。