本文整理汇总了Java中org.ajax4jsf.model.DataVisitor类的典型用法代码示例。如果您正苦于以下问题:Java DataVisitor类的具体用法?Java DataVisitor怎么用?Java DataVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataVisitor类属于org.ajax4jsf.model包,在下文中一共展示了DataVisitor类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext ctx, DataVisitor dv, Range range,
Object argument) {
SequenceRange sr = (SequenceRange) range;
if (!CACHE_ENABLED
|| (cachedList == null || !equalRanges(cachedRange, sr))) {
cachedList = getDataList(sr.getFirstRow(), sr.getRows(),
arrangeable.getFilterFields(), arrangeable.getSortFields(), argument);
cachedRange = sr;
}
for (T t : cachedList) {
if (getKey(t) == null) {
/*
* the 2nd param is used to build the client id of the table
* row, i.e. mytable:234:inputname, so don't let it be null.
*/
throw new IllegalStateException("found null key");
}
dv.process(ctx, getKey(t), argument);
}
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:26,代码来源:RichLazyDataModel.java
示例2: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) {
SequenceRange seqRange = (SequenceRange) range;
if (offset != seqRange.getFirstRow() || limit != seqRange.getRows()) {
offset = seqRange.getFirstRow();
limit = seqRange.getRows();
if (identifiers != null) {
objects = browser.getDigitalObjects(identifiers, offset / limit, limit, identifierFilter, nameFilter);
} else {
objects = browser.getDigitalObjects(offset / limit, limit, identifierFilter, nameFilter);
}
}
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
visitor.process(context, i, argument);
}
}
}
开发者ID:psnc-dl,项目名称:darceo,代码行数:21,代码来源:ObjectDataModel.java
示例3: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
wrappedKeys.clear();
wrappedData.clear();
ExtraArgumentsDTO extraArgumentsDTO = getExtraArgumentsDTO(range);
List<B> resultadoPaginado = jazzDataProvider.actionPesquisarCached(extraArgumentsDTO);
int indexOf = 0;
for (B tipoReq : resultadoPaginado) {
//wrappedKeys.add(tipoReq.getPK());
//wrappedData.put(tipoReq.getPK(), tipoReq);
//visitor.process(context, tipoReq.getPK(), argument);
wrappedKeys.add(indexOf);
wrappedData.put(indexOf, tipoReq);
visitor.process(context, indexOf, argument);
indexOf++;
}
}
开发者ID:darciopacifico,项目名称:omr,代码行数:24,代码来源:JazzDataModel.java
示例4: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) {
wrappedKeys.clear();
wrappedData.clear();
ExtraArgumentsDTO extraArgumentsDTO = getExtraArgumentsDTO(range);
List<B> resultadoPaginado = jazzDataProvider.actionPesquisarCached(extraArgumentsDTO);
int indexOf = 0;
for (B tipoReq : resultadoPaginado) {
//wrappedKeys.add(tipoReq.getPK());
//wrappedData.put(tipoReq.getPK(), tipoReq);
//visitor.process(context, tipoReq.getPK(), argument);
wrappedKeys.add(indexOf);
wrappedData.put(indexOf, tipoReq);
visitor.process(context, indexOf, argument);
indexOf++;
}
}
开发者ID:darciopacifico,项目名称:omr,代码行数:24,代码来源:JazzDataModel.java
示例5: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
public void walk(FacesContext facesContext, DataVisitor dataVisitor, Range range, Object o)
{
int firstRow = ((SequenceRange) range).getFirstRow();
int numberOfRows = ((SequenceRange) range).getRows();
if (dataProvider.getFirstResult() == null || dataProvider.getFirstResult() != firstRow) {
dataProvider.setFirstResult(firstRow >= 0 ? firstRow : null);
}
if (dataProvider.getMaxResults() == null || dataProvider.getMaxResults() != numberOfRows) {
dataProvider.setMaxResults(numberOfRows >= 0 ? numberOfRows : null);
}
/**
* Getter is not used here cause it could loop over result list, which we do not want to do twice
*/
rowKeyMap.clear();
indexToKey.clear();
keyToIndex.clear();
int i = 0;
for (T item : dataProvider.getResultList()) {
Object id = getId(item);
final Object key = useIndex ? i : id;
rowKeyMap.put(key, item);
indexToKey.put(i, key);
keyToIndex.put(key, i);
dataVisitor.process(facesContext, key, o);
i++;
}
}
开发者ID:Inspiredsoft,项目名称:parco,代码行数:28,代码来源:EntityQueryDataModel.java
示例6: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
wrappedKeys.clear();
wrappedData.clear();
ExtraArgumentsDTO extraArgumentsDTO = getExtraArgumentsDTO(range);
List<B> resultadoPaginado = jazzDataProvider.actionPesquisar(extraArgumentsDTO);
for (B tipoReq : resultadoPaginado) {
wrappedKeys.add(tipoReq.getPK());
wrappedData.put(tipoReq.getPK(), tipoReq);
visitor.process(context, tipoReq.getPK(), argument);
}
}
开发者ID:darciopacifico,项目名称:omr,代码行数:16,代码来源:JazzDataModel.java
示例7: walk
import org.ajax4jsf.model.DataVisitor; //导入依赖的package包/类
@Override
public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument)
{
retrieveRowCount();
SequenceRange sequenceRange = (SequenceRange) range;
setWrappedData(loadData(sequenceRange.getFirstRow(), sequenceRange.getRows()));
for (int row = 0; row < getWrappedData().size(); ++row)
{
visitor.process(context, row, argument);
}
}
开发者ID:jithub2005,项目名称:RemInD,代码行数:15,代码来源:EntityListDataModelBase.java
注:本文中的org.ajax4jsf.model.DataVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论