Skip to content

Commit

Permalink
adempiere#114 Change "Create From" UI for Form like Dialog in window …
Browse files Browse the repository at this point in the history
…without "hardcode"
  • Loading branch information
e-Evolution committed Jan 22, 2016
1 parent a7dc9aa commit 9a15257
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 24 deletions.
42 changes: 22 additions & 20 deletions client/src/org/compiere/apps/form/FormFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Trace;




/**
* Form Framework
*
Expand Down Expand Up @@ -100,13 +100,15 @@ public void windowOpened(java.awt.event.WindowEvent evt)
}
});
m_MainContent = frame;
m_WindowNo = Env.createWindowNo (m_MainContent);
} else {
CDialog dialog = new CDialog(owner, true);
dialog.setModalityType(ModalityType.DOCUMENT_MODAL);
m_MainContent = dialog;
m_WindowNo = p_ParentWindowNo;
}

m_WindowNo = Env.createWindowNo (m_MainContent);

try
{
jbInit();
Expand Down Expand Up @@ -136,8 +138,8 @@ public FormFrame(GraphicsConfiguration gc) {
this(0);
}

private ProcessInfo m_pi;

private ProcessInfo m_pi;

/** WindowNo */
private int m_WindowNo;
/** The GlassPane */
Expand Down Expand Up @@ -462,21 +464,21 @@ private void formWindowOpened(java.awt.event.WindowEvent evt)
}
} // formWindowOpened

// Add window and tab no called from

public void setProcessInfo(ProcessInfo pi)
{
m_pi = pi;

}

public ProcessInfo getProcessInfo()
{
return m_pi;
}

// End

// Add window and tab no called from

public void setProcessInfo(ProcessInfo pi)
{
m_pi = pi;

}

public ProcessInfo getProcessInfo()
{
return m_pi;
}

// End

/**
* Start Batch
* @param process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public WCreateFromInvoiceUI() {
private static final long serialVersionUID = -6022139819209111460L;

public void setProcessInfo(ProcessInfo pi) {
p_WindowNo = getWindowNo();
p_WindowNo = pi.getWindowNo();
try {
// Valid for launched from a window
if(pi != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public WCreateFromRMAUI() {
private static final long serialVersionUID = -3454354880167040226L;

public void setProcessInfo(ProcessInfo pi) {
p_WindowNo = getWindowNo();
p_WindowNo = pi.getWindowNo();
try {
// Valid for launched from a window
if(pi != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public WCreateFromShipmentUI() {
private static final long serialVersionUID = -3454354880167040226L;

public void setProcessInfo(ProcessInfo pi) {
p_WindowNo = getWindowNo();
p_WindowNo = pi.getWindowNo();
try {
// Valid for launched from a window
if(pi != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public WCreateFromStatementUI() {
private static final long serialVersionUID = -6022139819209111460L;

public void setProcessInfo(ProcessInfo pi) {
p_WindowNo = getWindowNo();
p_WindowNo = pi.getWindowNo();
try {
// Valid for launched from a window
if(pi != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,7 @@ else if (col.equals("Posted") && MRole.getDefault().isShowAcct())
if (title == null || title.length() == 0)
title = wButton.getDisplay();
ProcessInfo pi = new ProcessInfo (title, wButton.getProcess_ID(), table_ID, record_ID);
pi.setWindowNo(curWindowNo);
pi.setAD_User_ID (Env.getAD_User_ID(ctx));
pi.setAD_Client_ID (Env.getAD_Client_ID(ctx));
ADForm form = ADForm.openForm(adFormID);
Expand Down

0 comments on commit 9a15257

Please sign in to comment.