public HtmlPanelGridLayout() { this( new HtmlPanelGridLayoutConfig() ); }
public HtmlPanelGridLayout( HtmlPanelGridLayoutConfig config ) { if ( config.getColumnStyleClasses() == null ) { mColumnStyleClasses = null; } else { mColumnStyleClasses = ArrayUtils.toString( config.getColumnStyleClasses() ); } mMessageStyleClass = config.getMessageStyleClass(); }
@Override protected void addSectionWidget( String section, int level, StaticWidget container, StaticMetawidget metawidget ) { HtmlSectionOutputText outputText = new HtmlSectionOutputText(); outputText.putAttribute( "value", section ); Map<String, String> attributes = CollectionUtils.newHashMap(); getDelegate().layoutWidget( outputText, PROPERTY, attributes, container, metawidget ); } }
HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(param); panelGroup.getChildren().add(dataTable); HtmlPanelGrid panelGrid = new HtmlPanelGrid(); panelGrid.putAttribute("styleClass", "data-table-footer"); panelGrid.putAttribute("columns", "2"); panelGrid.putAttribute("columnClasses", ",remove-column"); select.setConverter(StaticFacesUtils.wrapExpression(controllerName + "Bean.converter")); addSelectItems(select, StaticFacesUtils.wrapExpression(controllerName + "Bean.all"), attributes); panelGrid.getChildren().add(select); panelGrid.getChildren().add(addLink); panelGroup.getChildren().add(panelGrid);
HtmlOutputLabel label = new HtmlOutputLabel(); String id = getWidgetId( widget ); label.putAttribute( "for", id ); label.putAttribute( "value", labelText + StringUtils.SEPARATOR_COLON ); panelGrid.getChildren().add( label ); HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGrid.getChildren().add( panelGroup ); panelGroup.getChildren().add( widget ); HtmlMessage message = new HtmlMessage(); message.putAttribute( "for", id ); message.putAttribute( "styleClass", mMessageStyleClass ); panelGroup.getChildren().add( message );
commandLink.putAttribute("rendered", StaticFacesUtils.wrapExpression("empty " + unwrappedExpression)); HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(commandLink); panelGroup.getChildren().add(nestedMetawidget); return panelGroup;
HtmlMessage message = new HtmlMessage(); message.putAttribute("for", footerMetawidget.getAttribute("id")); message.putAttribute("styleClass", "error"); footerFacet.getChildren().add(message); column.getChildren().add(footerFacet);
public void startContainerLayout( StaticXmlWidget container, StaticXmlMetawidget metawidget ) { try { HtmlPanelGrid panelGrid = new HtmlPanelGrid(); panelGrid.putAttribute( "columns", "3" ); panelGrid.putAttribute( "id", metawidget.getAttribute( "id" ) ); panelGrid.putAttribute( "columnClasses", mColumnStyleClasses ); if ( container instanceof StaticXmlMetawidget ) { panelGrid.putAttribute( "rendered", metawidget.getAttribute( "rendered" ) ); } container.getChildren().add( panelGrid ); } catch ( Exception e ) { throw LayoutException.newException( e ); } }
/** * Gets the id attribute of the given widget, recursing into child widgets if necessary. */ private String getWidgetId( StaticXmlWidget widget ) { String id = widget.getAttribute( "id" ); if ( id != null ) { return id; } for( StaticWidget child : widget.getChildren() ) { id = getWidgetId( (StaticXmlWidget) child ); if ( id != null ) { return id; } } return null; } }
HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(param); panelGroup.getChildren().add(dataTable); HtmlPanelGrid panelGrid = new HtmlPanelGrid(); panelGrid.putAttribute("styleClass", "data-table-footer"); panelGrid.putAttribute("columns", "2"); panelGrid.putAttribute("columnClasses", ",remove-column"); select.setConverter(StaticFacesUtils.wrapExpression(controllerName + "Bean.converter")); addSelectItems(select, StaticFacesUtils.wrapExpression(controllerName + "Bean.all"), attributes); panelGrid.getChildren().add(select); panelGrid.getChildren().add(addLink); panelGroup.getChildren().add(panelGrid);
commandLink.putAttribute("rendered", StaticFacesUtils.wrapExpression("empty " + unwrappedExpression)); HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(commandLink); panelGroup.getChildren().add(nestedMetawidget); return panelGroup;
HtmlMessage message = new HtmlMessage(); message.putAttribute("for", footerMetawidget.getAttribute("id")); message.putAttribute("styleClass", "error"); footerFacet.getChildren().add(message); column.getChildren().add(footerFacet);