Creates a new faces component from the component metadata.
true
370371372373374375376377378379380
clayContext.setDisplayElement(displayElement); clayContext.setSymbols(displayElement.getSymbols()); clayContext.setJspIds(new TreeSet()); Command command = new CreateComponentCommand(); boolean isFinal = command.execute(clayContext); assertEquals("command finished", false, isFinal); UIComponent child = (UIComponent) clayContext.getChild(); assertNotNull("child", child);
400401402403404405406407408409410
clayContext.setSymbols(displayElement.getSymbols()); clayContext.setJspIds(new TreeSet()); command = new CreateComponentCommand(); try { isFinal = command.execute(clayContext); assertTrue("id replacement failed", false); } catch (RuntimeException e) { assertTrue("null component id", e.getMessage().startsWith("The component symbol substitution failed for id \"@wynn\"")); }
427428429430431432433434435436437
clayContext.setSymbols(displayElement.getSymbols()); clayContext.setJspIds(new TreeSet()); command = new CreateComponentCommand(); try { isFinal = command.execute(clayContext); assertTrue("id replacement failed", false); } catch (RuntimeException e) { assertTrue("missing component id", e.getMessage().startsWith("The component symbol substitution failed for id \"@wynn\"")); }