Fix [2990258] Request toolbar button calls up search form on zkwebui
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2990258
This commit is contained in:
parent
3cc2f2a213
commit
bf05050818
|
@ -189,15 +189,23 @@ public class WRequest implements EventListener
|
|||
query = new MQuery("");
|
||||
String where = "(" + m_where + ") AND Processed='N'";
|
||||
query.addRestriction(where);
|
||||
query.setRecordCount(0);
|
||||
}
|
||||
else if (e.getTarget() == m_all)
|
||||
{
|
||||
query = new MQuery("");
|
||||
query.addRestriction(m_where.toString());
|
||||
query.setRecordCount(0);
|
||||
}
|
||||
else if (e.getTarget() == m_new)
|
||||
{
|
||||
query = new MQuery("");
|
||||
query.addRestriction("1=2");
|
||||
query.setRecordCount(0);
|
||||
}
|
||||
|
||||
int AD_Window_ID = 232; // 232=all - 201=my
|
||||
ADWindow frame = SessionManager.getAppDesktop().openWindow(AD_Window_ID);
|
||||
ADWindow frame = SessionManager.getAppDesktop().openWindow(AD_Window_ID, query);
|
||||
if(frame == null)
|
||||
return;
|
||||
// New - set Table/Record
|
||||
|
|
|
@ -82,8 +82,10 @@ import org.zkoss.zul.Toolbarbutton;
|
|||
*/
|
||||
public class DefaultDesktop extends TabbedDesktop implements MenuListener, Serializable, EventListener, IServerPushCallback
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 6320678631023300467L;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2899600212295462854L;
|
||||
|
||||
private static final CLogger logger = CLogger.getCLogger(DefaultDesktop.class);
|
||||
|
||||
|
@ -455,6 +457,12 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
return super.openWindow(windowId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ADWindow openWindow(int windowId, MQuery query) {
|
||||
autoHideMenu();
|
||||
return super.openWindow(windowId, query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ADForm openForm(int formId) {
|
||||
autoHideMenu();
|
||||
|
|
|
@ -144,6 +144,14 @@ public interface IDesktop extends UIPart {
|
|||
*/
|
||||
public ADWindow openWindow(int windowId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param windowId
|
||||
* @param query
|
||||
* @return ADWindow
|
||||
*/
|
||||
public ADWindow openWindow(int windowId, MQuery query);
|
||||
|
||||
/**
|
||||
* Open operating system task window
|
||||
* @param task_ID
|
||||
|
|
|
@ -116,6 +116,25 @@ public abstract class TabbedDesktop extends AbstractDesktop {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param windowId
|
||||
* @param query
|
||||
* @return ADWindow
|
||||
*/
|
||||
public ADWindow openWindow(int windowId, MQuery query) {
|
||||
ADWindow adWindow = new ADWindow(Env.getCtx(), windowId, query);
|
||||
|
||||
DesktopTabpanel tabPanel = new DesktopTabpanel();
|
||||
if (adWindow.createPart(tabPanel) != null) {
|
||||
windowContainer.addWindow(tabPanel, adWindow.getTitle(), true);
|
||||
return adWindow;
|
||||
} else {
|
||||
//user cancel
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param taskId
|
||||
|
|
Loading…
Reference in New Issue