public HtmlPanelGroup() { super(); setRendererType("javax.faces.Group"); }
/** * <p>Set the value of the <code>onmousedown</code> property.</p> * @param onmousedown the new property value */ public void setOnmousedown(java.lang.String onmousedown) { getStateHelper().put(PropertyKeys.onmousedown, onmousedown); handleAttribute("onmousedown", onmousedown); }
public HtmlPanelGroup getNavigationMenu() { HtmlPanelGroup menu = new HtmlPanelGroup(); menu.setId("menu"); HtmlOutputLink link = new HtmlOutputLink(); // ... other components etc. menu.getChildren().add(link); }
public void initTitreCivil(String value) { if (value == null || value.isEmpty()) { throw new IllegalArgumentException(); } type = value; formIndiv.setRendered(INDIV.equals(type)); formCorpo.setRendered(CORPO.equals(type)); FacesContext contexte = FacesContext.getCurrentInstance(); formIndiv.saveState(contexte); formCorpo.saveState(contexte); }
private void handleAttribute(String name, Object value) { List<String> setAttributes = (List<String>) this.getAttributes().get("javax.faces.component.UIComponentBase.attributesThatAreSet"); if (setAttributes == null) { String cname = this.getClass().getName(); if (cname != null && cname.startsWith(OPTIMIZED_PACKAGE)) { setAttributes = new ArrayList<String>(6); this.getAttributes().put("javax.faces.component.UIComponentBase.attributesThatAreSet", setAttributes); } } if (setAttributes != null) { if (value == null) { ValueExpression ve = getValueExpression(name); if (ve == null) { setAttributes.remove(name); } } else if (!setAttributes.contains(name)) { setAttributes.add(name); } } }
panel.setId( FacesUtils.createUniqueId() ); panel.setStyle( mStyle ); panel.setLayout( mPanelLayout ); panel.setStyleClass( sectionStyleClass ); } else { panel.setStyleClass( mStyleClass + ' ' + sectionStyleClass ); panel.getAttributes().put( UIMetawidget.COMPONENT_ATTRIBUTE_METADATA, panelAttributes ); nestedMetawidget.setLayout( metawidget.getLayout() ); nestedMetawidget.copyParameters( metawidget ); panel.getChildren().add( nestedMetawidget );
/** {@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)); }
/** * <p>Return the value of the <code>onmouseover</code> property.</p> * @return the property value * <p>Contents: Javascript code executed when a pointer button is * moved onto this element. */ public java.lang.String getOnmouseover() { return (java.lang.String) getStateHelper().eval(PropertyKeys.onmouseover); }
final HtmlPanelGroup group = new HtmlPanelGroup(); group.setLayout(HtmlGeneratedForm.BLOCK_LAYOUT); group.setStyleClass(renderContext.resolveStyleClass(JsfStyleClasses.FORM_CONTROL_BLOCK)); container = group;
/** * Gets CSS styling instructions. * * @return the new style value */ public String getStyle() { if (_style != null) { return _style; } ValueExpression expression = getValueExpression("style"); if (expression != null) { return (String)expression.getValue(getFacesContext().getELContext()); } return null; }
htmlFormTmp = new HtmlPanelGroup(); htmlFormTmp.setStyleClass(jsfContext.resolveStyleClass(JsfStyleClasses.TABLE_FORM)); htmlForm = htmlFormTmp; parentId = this.getClientId(context); final HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().addAll(components); this.getChildren().add(panelGroup);
public Object saveState(FacesContext context) { Object[] values = new Object[2]; values[0] = super.saveState(context); values[1] = _toggled; return values; }
comp.setValueBinding("style", vb); comp.getAttributes().put("style", _style); comp.setValueBinding("styleClass", vb); comp.getAttributes().put("styleClass", _styleClass);
@NotNull public static HtmlPanelGroup createBlockPanel(FacesComponentIdFactory idFactory, String styleClass) { HtmlPanelGroup panel = createComponent(HtmlPanelGroup.class, idFactory); panel.setLayout("block"); panel.setStyleClass(styleClass); return panel; }
/** * @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); } }
String layout = panelGroup.getLayout(); if (layout != null && layout.equals(LAYOUT_BLOCK_VALUE)) Map<String, List<ClientBehavior>> behaviors = panelGroup.getClientBehaviors(); if (behaviors != null && !behaviors.isEmpty())
String layout = panelGroup.getLayout(); if (layout != null && layout.equals(LAYOUT_BLOCK_VALUE))
if (outerForm) { HtmlPanelGroup tmpHtmlForm; tmpHtmlForm = new HtmlPanelGroup(); tmpHtmlForm.setStyleClass(resolver.resolve(JsfStyleClasses.FORM_PANEL)); htmlForm = tmpHtmlForm; } else {
&& Layout.STYLE_CLASS_LAYOUT_CONTENT.equals(((HtmlPanelGroup) parent).getStyleClass()) && "block".equals(((HtmlPanelGroup) parent).getLayout())) {