1.界面配置文件中按钮中添加 <property name="showUpComponent" ref="listView" />
<bean id="qualifiedAction" class="nc.ui.pu.cgfd.action.QualifiedSupplierCatalogAction">
<!-- <property name="interceptor" ref="showCardInterceptor" /> -->
<property name="showUpComponent" ref="listView" />
<property name="model" ref="manageAppModel" />
<property name="editor" ref="billFormEditor" />
</bean>
2.在按钮的action
package nc.ui.pu.cgfd.action;
import java.awt.event.ActionEvent;
import nc.ui.pubapp.uif2app.model.BillManageModel;
import nc.ui.pubapp.uif2app.view.ShowUpableBillForm;
import nc.ui.pubapp.uif2app.view.ShowUpableBillListView;
import nc.ui.uif2.NCAction;
/**
* 合格供应商目录按钮
* @author ChenSiyi
*
*/
@SuppressWarnings("serial")
public class QualifiedSupplierCatalogAction extends NCAction {
public QualifiedSupplierCatalogAction() {
super();
this.setCode("cgfd_QualifiedSupplierCatalogAction");
this.setBtnName("合格供应商目录");
}
@Override
public void doAction(ActionEvent e) throws Exception {
//获得选中表头行的行标
//int row = this.getShowUpComponent().getBillListPanel().getHeadTable().getSelectedRow();
//作用相同
//this.getShowUpComponent().getBillListPanel().getBillHeadModel().getSelectRowVO(row,vo.class);
//this.getShowUpComponent().getBillListPanel().getHeadBillModel().getBodyValueRowVO(row, vo.class.getName());
//获得选中表体行的行标
int row = this.getShowUpComponent().getBillListPanel().getBodyTable().getSelectedRow();
Object name = showUpComponent.getBillListPanel().getBodyBillModel().getValueAt(row, 8);
SupplierDetailUIDialog picDlg = new SupplierDetailUIDialog(editor,"1001B210000000009INT");
picDlg.show();
}
private ShowUpableBillListView showUpComponent;
public ShowUpableBillListView getShowUpComponent() {
return showUpComponent;
}
public void setShowUpComponent(ShowUpableBillListView showUpComponent) {
this.showUpComponent = showUpComponent;
}