DeleteSelection16.png is different from DeleteSelection24.png.
Included tab hide fieldgroup or field that come after it. Included tab needs to be refresh after parent tab save event.
This commit is contained in:
parent
dd256d74e8
commit
dceeb9d84a
|
@ -499,14 +499,14 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
try {
|
||||
updateInfo();
|
||||
} catch (Error ex) {
|
||||
logger.log(Level.SEVERE, "UpdateInfo Thread error="+ex.getLocalizedMessage(), ex);
|
||||
logger.log(Level.WARNING, "UpdateInfo Thread error="+ex.getLocalizedMessage(), ex);
|
||||
break;
|
||||
} finally {
|
||||
// release full control of desktop
|
||||
Executions.deactivate(desktop);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
logger.log(Level.SEVERE, "UpdateInfo Thread error="+e.getLocalizedMessage(), e);
|
||||
logger.log(Level.WARNING, "UpdateInfo Thread error="+e.getLocalizedMessage(), e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -866,5 +866,8 @@ public class ADSortTab extends Panel implements IADTabpanel
|
|||
return Env.getContext(Env.getCtx(), m_WindowNo, variableName);
|
||||
}
|
||||
|
||||
public void afterSave(boolean onSaveEvent) {
|
||||
}
|
||||
|
||||
} //ADSortTab
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ import org.zkoss.zkex.zul.Center;
|
|||
import org.zkoss.zkex.zul.West;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Group;
|
||||
import org.zkoss.zul.Groupfoot;
|
||||
import org.zkoss.zul.Separator;
|
||||
import org.zkoss.zul.SimpleTreeNode;
|
||||
import org.zkoss.zul.Space;
|
||||
|
@ -132,11 +133,14 @@ DataStatusListener, IADTabpanel
|
|||
private GridTabDataBinder dataBinder;
|
||||
|
||||
private Map<Integer, Group> includedTab = new HashMap<Integer, Group>();
|
||||
private Map<Integer, Groupfoot> includedTabFooter = new HashMap<Integer, Groupfoot>();
|
||||
|
||||
private List<EmbeddedPanel> includedPanel = new ArrayList<EmbeddedPanel>();
|
||||
|
||||
private boolean active = false;
|
||||
|
||||
private Group currentGroup;
|
||||
|
||||
public ADTabpanel()
|
||||
{
|
||||
init();
|
||||
|
@ -260,15 +264,22 @@ DataStatusListener, IADTabpanel
|
|||
rows.appendChild(row);
|
||||
if (rowList != null)
|
||||
rowList.add(row);
|
||||
row = new Row();
|
||||
} else if (row.getChildren().size() > 0)
|
||||
{
|
||||
rows.appendChild(row);
|
||||
if (rowList != null)
|
||||
rowList.add(row);
|
||||
row = new Row();
|
||||
rowList.add(row);
|
||||
}
|
||||
|
||||
//end current field group
|
||||
if (currentGroup != null) {
|
||||
row = new Groupfoot();
|
||||
rows.appendChild(row);
|
||||
currentGroup = null;
|
||||
currentFieldGroup = null;
|
||||
}
|
||||
|
||||
row = new Row();
|
||||
row.setSpans("5");
|
||||
row.appendChild(new Separator());
|
||||
rows.appendChild(row);
|
||||
|
@ -276,7 +287,11 @@ DataStatusListener, IADTabpanel
|
|||
row = new Group();
|
||||
row.setSpans("2,3");
|
||||
rows.appendChild(row);
|
||||
includedTab .put(field.getIncluded_Tab_ID(), (Group)row);
|
||||
includedTab.put(field.getIncluded_Tab_ID(), (Group)row);
|
||||
row = new Groupfoot();
|
||||
rows.appendChild(row);
|
||||
includedTabFooter.put(field.getIncluded_Tab_ID(), (Groupfoot)row);
|
||||
|
||||
row = new Row();
|
||||
continue;
|
||||
}
|
||||
|
@ -342,6 +357,7 @@ DataStatusListener, IADTabpanel
|
|||
{
|
||||
((Group)row).setOpen(false);
|
||||
}
|
||||
currentGroup = (Group)row;
|
||||
rows.appendChild(row);
|
||||
headerRows.add(row);
|
||||
}
|
||||
|
@ -894,19 +910,18 @@ DataStatusListener, IADTabpanel
|
|||
ep.windowPanel = panel;
|
||||
org.zkoss.zul.Row row = new Row();
|
||||
row.setSpans("5");
|
||||
Component next = group.getNextSibling();
|
||||
grid.getRows().insertBefore(row, next);
|
||||
panel.createPart(row);
|
||||
panel.getComponent().setWidth("99%");
|
||||
grid.getRows().insertBefore(row, includedTabFooter.get(adTabId));
|
||||
panel.createPart(row);
|
||||
|
||||
panel.getComponent().setWidth("100%");
|
||||
panel.getComponent().setStyle("position: relative");
|
||||
panel.getComponent().setHeight("400px");
|
||||
|
||||
Label title = new Label(gridWindow.getTab(tabIndex).getName());
|
||||
group.appendChild(title);
|
||||
group.appendChild(panel.getToolbar());
|
||||
panel.getStatusBar().setZclass("z-group-foot");
|
||||
if (!group.isOpen()) {
|
||||
panel.getToolbar().setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
panel.initPanel(-1, null);
|
||||
if (active)
|
||||
activateChild(true, ep);
|
||||
|
@ -918,5 +933,15 @@ DataStatusListener, IADTabpanel
|
|||
IADTabpanel tabPanel;
|
||||
int adTabId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IADTabpanel#afterSave(boolean)
|
||||
*/
|
||||
public void afterSave(boolean onSaveEvent) {
|
||||
if (!includedPanel.isEmpty()) {
|
||||
for (EmbeddedPanel panel : includedPanel)
|
||||
panel.tabPanel.query(false, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,8 +74,6 @@ import org.zkoss.zk.ui.Executions;
|
|||
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.InputEvent;
|
||||
import org.zkoss.zk.ui.event.KeyEvent;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Div;
|
||||
|
@ -83,7 +81,6 @@ import org.zkoss.zul.Hbox;
|
|||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
import org.zkoss.zul.Menupopup;
|
||||
import org.zkoss.zul.Toolbarbutton;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -558,22 +555,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
|
|||
|
||||
m_popup.setPage(toolbar.getButton("Lock").getPage());
|
||||
}
|
||||
m_popup.open(toolbar.getButton("Lock"));
|
||||
|
||||
/*
|
||||
// Control Pressed
|
||||
if (toolbar.getEvent().getName() == Events.ON_CTRL_KEY)
|
||||
{
|
||||
new WRecordAccessDialog(null, curTab.getAD_Table_ID(), record_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
curTab.lock(Env.getCtx(), record_ID, !toolbar.getButton("Lock").isPressed());
|
||||
curTab.loadAttachments(); // reload
|
||||
}
|
||||
|
||||
toolbar.lock(curTab.isLocked());
|
||||
*/
|
||||
m_popup.open(toolbar.getButton("Lock"));
|
||||
} // lock
|
||||
//
|
||||
|
||||
|
@ -1128,6 +1110,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
|
|||
statusBar.setStatusLine(Msg.getMsg(Env.getCtx(), "SaveIgnored"), true);
|
||||
}
|
||||
curTabpanel.dynamicDisplay(0);
|
||||
curTabpanel.afterSave(onSaveEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1250,12 +1233,13 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
|
|||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, new EventListener()
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onEvent(Event event) throws Exception
|
||||
{
|
||||
if (FDialog.ask(curWindowNo, messagePanel, "DeleteSelection"))
|
||||
{
|
||||
logger.fine("ok");
|
||||
Set selectedValues = listbox.getSelectedItems();
|
||||
Set<Listitem> selectedValues = listbox.getSelectedItems();
|
||||
if(selectedValues != null)
|
||||
{
|
||||
for(Iterator<Listitem> iter = selectedValues.iterator(); iter.hasNext();)
|
||||
|
|
|
@ -89,4 +89,10 @@ public interface IADTabpanel extends Component, Evaluatee {
|
|||
* @param i
|
||||
*/
|
||||
public void dynamicDisplay(int i);
|
||||
|
||||
/**
|
||||
* After save event
|
||||
* @param onSaveEvent
|
||||
*/
|
||||
public void afterSave(boolean onSaveEvent);
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue