toolbarActions.add(new ToolbarItem() {
private static final long serialVersionUID = 1L;
@Override
public Component getComponent(String componentId) {
return new LinkPanel(componentId,
new ResourceModel(MKEY_ACCEPT_TENDER)) {
private static final long serialVersionUID = 1L;
@Override
protected void onClick() {
if(getTenderType() == TenderType.NEED) {
needManager.acceptTender((Need) tender);
} else {
supplyManager.acceptTender((Supply) tender);
}
eventsDispatcher.publishEvent(new TenderChanged(
tender.getResource().getContract(), tender, TenderOperation.ACCEPTED));
goBack();
}
};
}
});
}
//'Decline' action
if(contractPermissionsInformant.isTenderDeclineEnabled(tender)) {
toolbarActions.add(new ToolbarItem() {
private static final long serialVersionUID = 1L;
@Override
public Component getComponent(String componentId) {
return new LinkPanel(componentId,
new ResourceModel(MKEY_DECLINE_TENDER)) {
private static final long serialVersionUID = 1L;
@Override
protected void onClick() {
if(getTenderType() == TenderType.NEED) {