protected void addArticle() {
this.addArticle(tblPositions.getRootNode());
}
protected void addArticle(final DefaultMutableTreeNode parentNode) {
final FmJbsBaseObjectList fmArticleList = new FmJbsBaseObjectList(JbsL10N.getString("Article.selectArticle"));
fmArticleList.setPnList(new PnArticleList());
fmArticleList.showForm();
fmArticleList.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals(JbsDialogWindowOKCancel.ACTION_OK)) {
TrPosition parentPosition = null;
if ((parentNode != null) && (parentNode instanceof TrPositionTreeNode)) {
parentPosition = ((TrPositionTreeNode) parentNode).getPosition();
}
Article selectedArticle = (Article) fmArticleList.getSelectedJbsObject();
if (selectedArticle != null) {
if (logger.isDebugEnabled()) {
logger.debug("Article selected: " + selectedArticle.getId());
}