private static Boolean getAutomaticTimeout(Desktop desktop) { if (desktop != null) for (Page page : desktop.getPages()) { Boolean b = ((PageCtrl) page).getAutomaticTimeout(); if (b != null) return b; } return null; }
private static final boolean isGroupingAllowed(Desktop desktop) { final String name = "org.zkoss.zk.ui.input.grouping.allowed"; if (desktop != null) { final Collection<Page> pages = desktop.getPages(); if (!pages.isEmpty()) { final Page page = pages.iterator().next(); Object o = page.getAttribute(name); if (o != null) return (o instanceof Boolean && ((Boolean) o).booleanValue()) || !"false".equals(o); } } if (_groupingAllowed == null) { final String s = Library.getProperty(name); _groupingAllowed = Boolean.valueOf(s == null || !"false".equals(s)); } return _groupingAllowed.booleanValue(); }