this.treeNode2.setAction(getApplication().createMethodBinding("#{Page1.buttonaction}", null)); public void buttonaction(){ String s = this.getSelectedTreeNode(tree1).getId(); this.staticText1.setText(s); }