//Feedback panel
add(new GeneralFeedbackPanel(CKEY_MESSAGES_PANEL));
//Add tender header
User user = tender.getUser();
Resource resource = tender.getResource();
Integer resourceID = resource.getId();
DictionaryItem uomItem = resourceReader.getUnitOfMeasure(resource);
String amountClause = tender.getAmount() + (uomItem == null ? "" : " " + localizationReader.getString(uomItem));
IModel<String> headerModel = null;
if(tender instanceof Supply) {
headerModel = new StringResourceModel(MKEY_TENDER_SUPPLY_HEADER,
new Model<PipedMap<String, Object>>(new PipedMap<String, Object>().
putObject(TKEY_USERNAME, user.getDisplayName()).
putObject(TKEY_RESOURCEID, resourceID).
putObject(TKEY_HOURS, ((Supply)tender).getHours()).
putObject(TKEY_AMOUNT, amountClause).
putObject(TKEY_REPUTATION, reputationReader.getUserReputation(user))));
} else {
headerModel = new StringResourceModel(MKEY_TENDER_CONSUME_HEADER,
new Model<PipedMap<String, Object>>(new PipedMap<String, Object>().
putObject(TKEY_USERNAME, user.getDisplayName()).
putObject(TKEY_RESOURCEID, resourceID).
putObject(TKEY_AMOUNT, amountClause).
putObject(TKEY_REPUTATION, reputationReader.getUserReputation(user))));
}
Label headerLabel = new Label(CKEY_TENDER_HEADER, headerModel);