/** Creates and returns the initiator, or null if no initiator is resolved. * Notice that {@link Initiator#doInit} was called before returned. */ public Initiator newInitiator(PageDefinition pgdef, Page page) throws Exception { return newInitiator(pgdef.getEvaluator(), page); }
/** Returns a list of all {@link Initiator} and invokes * its {@link Initiator#doInit} before returning. * It never returns null. */ public List<Initiator> doInit(Page page) { if (_initdefs == null) return Collections.emptyList(); final List<Initiator> inits = new LinkedList<Initiator>(); try { for (InitiatorInfo ii : _initdefs) { final Initiator init = ii.newInitiator(getEvaluator(), page); if (init != null) inits.add(init); } } catch (Throwable ex) { throw UiException.Aide.wrap(ex); } return inits; }