/** * @see org.pivot4j.ui.table.TableRenderCallback#endRow(org.pivot4j.ui.table.TableRenderContext) */ @Override public void endRow(TableRenderContext context) { if (header == null) { grid.getChildren().add(row); } else { header.getChildren().add(row); } this.row = null; }
... public class MyBackingBean { ... private HtmlPanelGroup generatedElements = new HtmlPanelGroup(); public void init() { for (Element e : myElements) { // Take any element type you want HtmlOutputText subElement = new HtmlOutputText(); subElement.setValue(e.getText()); generatedElements.getChildren().add(subElement); } }
public HtmlPanelGroup getNavigationMenu() { HtmlPanelGroup menu = new HtmlPanelGroup(); menu.setId("menu"); HtmlOutputLink link = new HtmlOutputLink(); // ... other components etc. menu.getChildren().add(link); }
private void addNonGroupedProperties(AbstractConfigurationComponent config) { addDebug(config, true, ".addNonGroupedProperties()"); HtmlPanelGroup propertiesPanel = FacesComponentUtility.addBlockPanel(config, config, UNGROUPED_PROPERTIES_STYLE_CLASS); AbstractPropertyBagUIComponentTreeFactory propertyListUIComponentTreeFactory = new GroupUIComponentTreeFactory( config, GroupUIComponentTreeFactory.NO_GROUP); propertiesPanel.getChildren().add(propertyListUIComponentTreeFactory.createUIComponentTree(null)); addDebug(config, false, ".addNonGroupedProperties()"); }
/** {@inheritDoc} */ @Override public void processProperty(final FormPropertyRenderStrategy<?, ?> strategy, final RenderContext renderContext) { Validate.notNull(strategy, HtmlGeneratedForm.STRATEGY_NULL); Validate.notNull(renderContext, "Render context may not be null."); String layoutType = HtmlGeneratedForm.BLOCK_LAYOUT; if (!CheckUtil.isNull(this.getAttributes().get(PropertyKeys.LAYOUT.getName()))) { layoutType = this.getAttributes().get(PropertyKeys.LAYOUT.getName()).toString(); } List<UIComponent> parent = this.components; HtmlGeneratedForm.LOGGER.debug("Rendering with layout {}.", layoutType); if (HtmlGeneratedForm.BLOCK_LAYOUT.equals(layoutType)) { final HtmlPanelGroup parentGroup = new HtmlPanelGroup(); parentGroup.setLayout(HtmlGeneratedForm.BLOCK_LAYOUT); parentGroup.setStyleClass(renderContext.resolveStyleClass(JsfStyleClasses.FORM_CONTROL_ROW)); parent = parentGroup.getChildren(); this.components.add(parentGroup); } parent.add(strategy.getLabel()); parent.add(this.processLayout(strategy, renderContext, layoutType)); }
private void addListMemberProperty(AbstractConfigurationComponent configurationComponent) { // Update member Configurations if this is a group config. if (configurationComponent instanceof ConfigurationSetComponent) { ConfigurationSetComponent configurationSetComponent = ((ConfigurationSetComponent) configurationComponent); configurationSetComponent.getConfigurationSet().applyGroupConfiguration(); } // Now add a new component to the JSF component tree. AbstractPropertyBagUIComponentTreeFactory propertyListUIComponentTreeFactory = new MapInListUIComponentTreeFactory( configurationComponent, configurationComponent.getListName(), configurationComponent.getListIndex()); HtmlPanelGroup propertiesPanel = FacesComponentUtility.addBlockPanel(configurationComponent, configurationComponent, UNGROUPED_PROPERTIES_STYLE_CLASS); propertiesPanel.getChildren().add(propertyListUIComponentTreeFactory.createUIComponentTree(null)); }
panelGrid.setColumnClasses(PROPERTY_ALL_TO_SAME_VALUE_CONTROLS_COLUMN_CLASSES); setAllToSameValueControlPanel.getChildren().add(panelGrid);
nestedMetawidget.setLayout( metawidget.getLayout() ); nestedMetawidget.copyParameters( metawidget ); panel.getChildren().add( nestedMetawidget );
nestedMetawidget.setLayout( metawidget.getLayout() ); nestedMetawidget.copyParameters( metawidget ); panel.getChildren().add( nestedMetawidget );
panelGroup.getChildren().addAll(components); this.getChildren().add(panelGroup);
panel.getChildren().add(link); panel.getChildren().add(closeButton);
/** * Build the massages. * * @param property * The property. * @param context * The jsf context. May not be null. */ public final void buildMessages(final PropertyDescriptor<?, ?> property, final RenderContext context) { Validate.notNull(context, AbstractRenderStrategy.CONTEXT_NULL); this.messages = new HtmlPanelGroup(); this.messages.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_OUTPUT_MSG_PANEL)); this.messages.setLayout("block"); final HtmlMessage imessages = new HtmlMessage(); imessages.setId(VariableUtil.compileName("msg_", context.getPrefixDeque())); imessages.setFor(this.createInputName(context)); imessages.setErrorClass(context.resolveStyleClass(JsfStyleClasses.FORM_OUTPUT_MSG_ERROR)); imessages.setWarnClass(context.resolveStyleClass(JsfStyleClasses.FORM_OUTPUT_MSG_WARN)); imessages.setInfoClass(context.resolveStyleClass(JsfStyleClasses.FORM_OUTPUT_MSG_INFO)); imessages.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_OUTPUT_MSG)); this.messages.getChildren().add(imessages); }
parent.getChildren().add(wrapper); String wrapperId = PropertyIdGeneratorUtility.getIdentifier(propertySimple, getListIndex(), PANEL_ID_SUFFIX); wrapper.setId(wrapperId);