Regression : Cancel button of form doesn't work.
Generate Invoice(Manual) & Generate Shipment(Manual) - fixed can't select multiple, improve parameter panel layout.
This commit is contained in:
parent
a3b97de98f
commit
5dec4b17c0
|
@ -936,7 +936,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
Tabpanel panel = (Tabpanel) windowContainer.getSelectedTab().getLinkedPanel();
|
||||
Component component = panel.getFirstChild();
|
||||
Object att = component.getAttribute(WINDOWNO_ATTRIBUTE);
|
||||
if (att != null && (att instanceof Integer))
|
||||
|
||||
if ( windowContainer.closeActiveWindow() )
|
||||
{
|
||||
if (att != null && (att instanceof Integer))
|
||||
|
|
|
@ -27,10 +27,12 @@ import org.adempiere.webui.LayoutUtils;
|
|||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.DesktopTabpanel;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Tab;
|
||||
import org.adempiere.webui.component.Tabbox;
|
||||
import org.adempiere.webui.component.Tabpanels;
|
||||
|
@ -102,6 +104,8 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
south.appendChild(statusBar);
|
||||
LayoutUtils.addSclass("status-border", statusBar);
|
||||
south.setHeight("22px");
|
||||
|
||||
executeQuery();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
|
@ -117,7 +121,7 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
//
|
||||
private Tabbox tabbedPane = new Tabbox();
|
||||
private Borderlayout selPanel = new Borderlayout();
|
||||
private Panel selNorthPanel = new Panel();
|
||||
private Grid selNorthPanel = GridFactory.newGridLayout();
|
||||
private Label lWarehouse = new Label();
|
||||
private WTableDirEditor fWarehouse;
|
||||
private Label lBPartner = new Label();
|
||||
|
@ -171,12 +175,13 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
North north = new North();
|
||||
selPanel.appendChild(north);
|
||||
north.appendChild(selNorthPanel);
|
||||
selNorthPanel.appendChild(lWarehouse);
|
||||
selNorthPanel.appendChild(fWarehouse.getComponent());
|
||||
selNorthPanel.appendChild(new Space());
|
||||
selNorthPanel.appendChild(lBPartner);
|
||||
selNorthPanel.appendChild(fBPartner.getComponent());
|
||||
selNorthPanel.appendChild(new Space());
|
||||
Row row = selNorthPanel.newRows().newRow();
|
||||
row.appendChild(lWarehouse.rightAlign());
|
||||
row.appendChild(fWarehouse.getComponent());
|
||||
row.appendChild(new Space());
|
||||
row.appendChild(lBPartner.rightAlign());
|
||||
row.appendChild(fBPartner.getComponent());
|
||||
row.appendChild(new Space());
|
||||
|
||||
South south = new South();
|
||||
selPanel.appendChild(south);
|
||||
|
@ -207,8 +212,10 @@ public class WInOutGen extends ADForm implements EventListener, ValueChangeListe
|
|||
south.appendChild(confirmPanelGen);
|
||||
confirmPanelGen.addActionListener(this);
|
||||
|
||||
selNorthPanel.appendChild(lDocType);
|
||||
selNorthPanel.appendChild(cmbDocType);
|
||||
row = new Row();
|
||||
selNorthPanel.getRows().appendChild(row);
|
||||
row.appendChild(lDocType.rightAlign());
|
||||
row.appendChild(cmbDocType);
|
||||
} // jbInit
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,10 +31,12 @@ import org.adempiere.webui.LayoutUtils;
|
|||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.DesktopTabpanel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.GridFactory;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Listbox;
|
||||
import org.adempiere.webui.component.ListboxFactory;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Tab;
|
||||
import org.adempiere.webui.component.Tabbox;
|
||||
import org.adempiere.webui.component.Tabpanels;
|
||||
|
@ -138,7 +140,7 @@ public class WInvoiceGen extends ADForm
|
|||
//
|
||||
private Tabbox tabbedPane = new Tabbox();
|
||||
private Borderlayout selPanel = new Borderlayout();
|
||||
private Panel selNorthPanel = new Panel();
|
||||
private Grid selNorthPanel = GridFactory.newGridLayout();
|
||||
private Label lOrg = new Label();
|
||||
private WTableDirEditor fOrg;
|
||||
private Label lBPartner = new Label();
|
||||
|
@ -188,12 +190,12 @@ public class WInvoiceGen extends ADForm
|
|||
North north = new North();
|
||||
selPanel.appendChild(north);
|
||||
north.appendChild(selNorthPanel);
|
||||
selNorthPanel.appendChild(lOrg);
|
||||
selNorthPanel.appendChild(fOrg.getComponent());
|
||||
selNorthPanel.appendChild(new Space());
|
||||
selNorthPanel.appendChild(lBPartner);
|
||||
selNorthPanel.appendChild(fBPartner.getComponent());
|
||||
selNorthPanel.appendChild(new Space());
|
||||
Row row = selNorthPanel.newRows().newRow();
|
||||
row.appendChild(lOrg.rightAlign());
|
||||
row.appendChild(fOrg.getComponent());
|
||||
row.appendChild(lBPartner.rightAlign());
|
||||
row.appendChild(fBPartner.getComponent());
|
||||
row.appendChild(new Space());
|
||||
|
||||
South south = new South();
|
||||
selPanel.appendChild(south);
|
||||
|
@ -225,8 +227,10 @@ public class WInvoiceGen extends ADForm
|
|||
south.appendChild(confirmPanelGen);
|
||||
confirmPanelGen.addActionListener(this);
|
||||
|
||||
selNorthPanel.appendChild(lDocType);
|
||||
selNorthPanel.appendChild(cmbDocType);
|
||||
row = new Row();
|
||||
selNorthPanel.getRows().appendChild(row);
|
||||
row.appendChild(lDocType.rightAlign());
|
||||
row.appendChild(cmbDocType);
|
||||
} // jbInit
|
||||
|
||||
/**
|
||||
|
|
|
@ -244,14 +244,14 @@ public class ListModelTable extends ListModelList implements ListModelExt
|
|||
* Set the number of rows in the table and initialise new rows.
|
||||
* For each new row, an empty collection of the size specified by
|
||||
* {@link #setNoColumns(int)} is created.
|
||||
* Please note that the number of rows in a table cannot be decreased.
|
||||
* @param rowCount The number of rows to be contained in the table
|
||||
*/
|
||||
public void setNoRows(int rowCount)
|
||||
{
|
||||
List<Object> newRow = null;
|
||||
|
||||
if (rowCount >= getSize())
|
||||
int currentSize = getSize();
|
||||
if (rowCount >= currentSize)
|
||||
{
|
||||
boolean vector = (getInnerList() instanceof Vector) ? true : false;
|
||||
while (getSize() < rowCount)
|
||||
|
@ -275,7 +275,7 @@ public class ListModelTable extends ListModelList implements ListModelExt
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException("The ListModelTable cannot be shrunk");
|
||||
removeRange(rowCount, currentSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,12 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.event.SelectEvent;
|
||||
import org.zkoss.zul.Decimalbox;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listcell;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.ListitemRenderer;
|
||||
import org.zkoss.zul.ListitemRendererExt;
|
||||
import org.zkoss.zul.impl.NumberInputElement;
|
||||
|
||||
/**
|
||||
* Renderer for {@link org.adempiere.webui.component.ListItems}
|
||||
|
@ -61,7 +59,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
new ArrayList<TableValueChangeListener>();
|
||||
|
||||
/** A list containing the indices of the currently selected ListItems. */
|
||||
private Set m_selectedItems = new HashSet<ListItem>();
|
||||
private Set<ListItem> m_selectedItems = new HashSet<ListItem>();
|
||||
/** Array of table details. */
|
||||
private ArrayList<WTableColumn> m_tableColumns = new ArrayList<WTableColumn>();
|
||||
/** Array of {@link ListHeader}s for the list head. */
|
||||
|
@ -542,55 +540,11 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
int row = -1;
|
||||
Object value = null;
|
||||
TableValueChangeEvent vcEvent = null;
|
||||
Set newlyUnselectedItems = new HashSet<Listitem>();
|
||||
Set newlySelectedItems = new HashSet<Listitem>();
|
||||
WTableColumn tableColumn;
|
||||
|
||||
Component source = event.getTarget();
|
||||
|
||||
if (source instanceof WListbox)
|
||||
{
|
||||
if (event instanceof SelectEvent)
|
||||
{
|
||||
col = 0;
|
||||
tableColumn = m_tableColumns.get(col);
|
||||
|
||||
newlyUnselectedItems.addAll(m_selectedItems);
|
||||
newlyUnselectedItems.removeAll(((SelectEvent)event).getSelectedItems());
|
||||
|
||||
newlySelectedItems.addAll(((SelectEvent)event).getSelectedItems());
|
||||
newlySelectedItems.removeAll(m_selectedItems);
|
||||
|
||||
m_selectedItems.clear();
|
||||
m_selectedItems.addAll(((SelectEvent)event).getSelectedItems());
|
||||
|
||||
for (Object item : newlySelectedItems)
|
||||
{
|
||||
row =((ListItem)item).getIndex();
|
||||
value = Boolean.TRUE;
|
||||
vcEvent = new TableValueChangeEvent(source,
|
||||
tableColumn.getHeaderValue().toString(),
|
||||
row, col,
|
||||
value, value);
|
||||
fireTableValueChange(vcEvent);
|
||||
}
|
||||
|
||||
|
||||
for (Object item : newlyUnselectedItems)
|
||||
{
|
||||
row =((ListItem)item).getIndex();
|
||||
value = Boolean.FALSE;
|
||||
vcEvent = new TableValueChangeEvent(source,
|
||||
tableColumn.getHeaderValue().toString(),
|
||||
row, col,
|
||||
value, value);
|
||||
|
||||
fireTableValueChange(vcEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (isWithinListCell(source))
|
||||
if (isWithinListCell(source))
|
||||
{
|
||||
row = getRowPosition(source);
|
||||
col = getColumnPosition(source);
|
||||
|
|
Loading…
Reference in New Issue