});
}
HorizontalPanel created = new HorizontalPanel();
created.add(new SmallLabel(constants.AfterColon()));
final DateField createdAfter = new DateField(constants.AfterColon(), DATE_PICKER_FORMAT);
created.add(createdAfter);
created.add(new SmallLabel(" ")); //NON-NLS
created.add(new SmallLabel(constants.BeforeColon()));
final DateField createdBefore = new DateField(constants.Before(), DATE_PICKER_FORMAT);
created.add(createdBefore);
fm.addAttribute(constants.DateCreated1(), created);
HorizontalPanel lastMod = new HorizontalPanel();
lastMod.add(new SmallLabel(constants.AfterColon()));
final DateField lastModAfter = new DateField(constants.AfterColon(), DATE_PICKER_FORMAT);
lastMod.add(lastModAfter);
lastMod.add(new SmallLabel(" ")); //NON-NLS
lastMod.add(new SmallLabel(constants.BeforeColon()));
final DateField lastModBefore = new DateField(constants.BeforeColon(), DATE_PICKER_FORMAT);
lastMod.add(lastModBefore);
fm.addAttribute(constants.LastModified1(), lastMod);
final SimplePanel resultsP = new SimplePanel();
Button search = new Button(constants.Search());
fm.addAttribute("", search);
search.addClickListener(new ClickListener() {
public void onClick(Widget w) {
resultsP.clear();
AssetItemGrid grid = new AssetItemGrid(openItem, "searchresults", new AssetItemGridDataLoader() { //NON-NLS
public void loadData(int startRow, int numberOfRows,
GenericCallback cb) {
MetaDataQuery[] mdq = new MetaDataQuery[atts.size()];
int i = 0;
for (Iterator iterator = atts.keySet().iterator(); iterator
.hasNext();) {
String name = (String) iterator.next();
mdq[i] = (MetaDataQuery) atts.get(name);
i++;
}
RepositoryServiceFactory.getService().queryMetaData(mdq, createdAfter.getValue(), createdBefore.getValue(),
lastModAfter.getValue(), lastModBefore.getValue(), false, startRow, numberOfRows, cb);
}
});
resultsP.add(grid);
}
});