use of org.entirej.framework.core.EJMessage in project rap by entirej.
the class EJRWTBarChartRecordBlockRenderer method askToDeleteRecord.
@Override
public void askToDeleteRecord(final EJDataRecord recordToDelete, String msg) {
if (msg == null) {
msg = "Are you sure you want to delete the current record?";
}
EJMessage message = new EJMessage(msg);
EJQuestion question = new EJQuestion(new EJForm(_block.getForm()), "DELETE_RECORD", "Delete", message, "Yes", "No") {
@Override
public void setAnswer(EJQuestionButton answerButton) {
super.setAnswer(answerButton);
if (EJQuestionButton.ONE == answerButton) {
_block.getBlock().deleteRecord(recordToDelete);
}
_block.setRendererFocus(true);
}
};
_block.getForm().getMessenger().askQuestion(question);
}
use of org.entirej.framework.core.EJMessage in project rap by entirej.
the class EJRWTHtmlTableBlockRenderer method askToDeleteRecord.
public void askToDeleteRecord(final EJDataRecord recordToDelete, String msg) {
if (msg == null) {
msg = "Are you sure you want to delete the current record?";
}
EJMessage message = new EJMessage(msg);
EJQuestion question = new EJQuestion(new EJForm(_block.getForm()), "DELETE_RECORD", "Delete", message, "Yes", "No") {
@Override
public void setAnswer(EJQuestionButton answerButton) {
super.setAnswer(answerButton);
if (EJQuestionButton.ONE == answerButton) {
_block.getBlock().deleteRecord(recordToDelete);
}
_block.setRendererFocus(true);
}
};
_block.getForm().getMessenger().askQuestion(question);
}
use of org.entirej.framework.core.EJMessage in project rap by entirej.
the class EJRWTHtmlTableBlockRenderer method enterUpdate.
public void enterUpdate(EJDataRecord recordToUpdate) {
if (_block.getUpdateScreenRenderer() == null) {
EJMessage message = new EJMessage("Please define an Update Screen Renderer for this form before an update operation can be performed.");
_block.getForm().getMessenger().handleMessage(message);
} else {
_block.getUpdateScreenRenderer().open(recordToUpdate);
}
}
use of org.entirej.framework.core.EJMessage in project rap by entirej.
the class EJRWTListRecordBlockRenderer method askToDeleteRecord.
public void askToDeleteRecord(final EJDataRecord recordToDelete, String msg) {
if (msg == null) {
msg = "Are you sure you want to delete the current record?";
}
EJMessage message = new EJMessage(msg);
EJQuestion question = new EJQuestion(new EJForm(_block.getForm()), "DELETE_RECORD", "Delete", message, "Yes", "No") {
@Override
public void setAnswer(EJQuestionButton answerButton) {
super.setAnswer(answerButton);
if (EJQuestionButton.ONE == answerButton) {
_block.getBlock().deleteRecord(recordToDelete);
}
_block.setRendererFocus(true);
}
};
_block.getForm().getMessenger().askQuestion(question);
}
use of org.entirej.framework.core.EJMessage in project rap by entirej.
the class EJRWTListRecordBlockRenderer method enterInsert.
public void enterInsert(EJDataRecord record) {
if (_block.getInsertScreenRenderer() == null) {
EJMessage message = new EJMessage("Please define an Insert Screen Renderer for this form before an insert operation can be performed.");
_block.getForm().getMessenger().handleMessage(message);
} else {
_block.getInsertScreenRenderer().open(record);
}
}
Aggregations