/** * @see org.pivot4j.ui.chart.ChartRenderCallback#endChart(org.pivot4j.ui.chart.ChartRenderContext) */ @Override public void endChart(ChartRenderContext context) { chart.setModel(model); pageComponent.getChildren().add(chart); this.model = null; this.chart = null; }
private HtmlPanelGrid gridComponent; public void someFunction(){ HtmlOutputText outPutText = new HtmlOutputText(); outPutText.setValue("Some Text"); gridComponent.getChildren().add(outPutText);
private void addPropertySimpleValue(UIComponent parent, @Nullable UIInput input, ValueExpression propertyValueExpression) { if (!this.isGroup) { parent.getChildren().add(input); return; } HtmlPanelGrid panelGrid = FacesComponentUtility.addPanelGrid(parent, null, 2, CssStyleClasses.BUTTONS_TABLE); panelGrid.setColumnClasses("group-property-value-cell, group-property-members-icon-cell"); if (input != null) panelGrid.getChildren().add(input); else FacesComponentUtility .addOutputText(panelGrid, null, "Member Values Differ", VALUES_DIFFER_TEXT_STYLE_CLASS); // Add the Members button which will display the "drill-down" modal panel. HtmlAjaxCommandLink ajaxCommandLink = FacesComponentUtility.createComponent(HtmlAjaxCommandLink.class); panelGrid.getChildren().add(ajaxCommandLink); ajaxCommandLink.setOncomplete("Richfaces.showModalPanel('" + this.memberValuesModalPanel.getClientId(FacesContext.getCurrentInstance()) + "');"); //ajaxCommandLink.setReRender("rhq_propSet"); String verb = this.config.isReadOnly() ? "View" : "Edit"; String tooltip = verb + " Member Values"; ajaxCommandLink.setTitle(tooltip); FacesComponentUtility.addParameter(ajaxCommandLink, null, "propertyExpressionString", propertyValueExpression .getExpressionString()); FacesComponentUtility.addParameter(ajaxCommandLink, null, "refresh", ConfigRenderer.PROPERTY_SET_COMPONENT_ID); FacesComponentUtility.addGraphicImage(ajaxCommandLink, null, "/images/icn_member_configs.png", null); }
panelGrid.getChildren().add(input);
private void addMapMemberProperties(UIComponent parent, String mapName, String rowStyleClass) { FacesComponentUtility.addVerbatimText(parent, "\n\n<tr class='" + rowStyleClass + "'>\n"); FacesComponentUtility.addVerbatimText(parent, "<td colspan='4' class='" + LIST_PROPERTY_CHILDREN_CELL_STYLE_CLASS + "'>"); HtmlPanelGrid spacerPanelGrid = FacesComponentUtility.addPanelGrid(parent, this.config, 2, FacesComponentUtility.NO_STYLE_CLASS); spacerPanelGrid.setWidth("100%"); spacerPanelGrid.setColumnClasses(NESTED_PROPERTIES_TABLE_INDENT_CELL_STYLE_CLASS + "," + FacesComponentUtility.NO_STYLE_CLASS); FacesComponentUtility.addBlockPanel(spacerPanelGrid, this.config, FacesComponentUtility.NO_STYLE_CLASS); AbstractPropertyBagUIComponentTreeFactory propertyListUIComponentTreeFactory = new MapInConfigurationUIComponentTreeFactory( this.config, mapName); spacerPanelGrid.getChildren().add( propertyListUIComponentTreeFactory.createUIComponentTree(CssStyleClasses.ROW_EVEN)); parent.getChildren().add(spacerPanelGrid); FacesComponentUtility.addVerbatimText(parent, "</td></tr>\n"); }
labelUser.setValue(Utils.getMessageResourceString(SecurityConst.BUNDLE_NAME, SecurityConst.USER_LOGIN, null, null)); panel.getChildren().add(labelUser); inputUser.setMaxlength(User.USERNAME_MAX_LENGHT); inputUser.setSize(User.USERNAME_MAX_LENGHT); panel.getChildren().add(inputUser); labelPwd.setFor(PWD_NAME); labelPwd.setValue(Utils.getMessageResourceString(SecurityConst.BUNDLE_NAME, SecurityConst.PWD_LOGIN, null, null)); panel.getChildren().add(labelPwd); inputPwd.setMaxlength(User.PASSWORD_MAX_LENGHT); inputPwd.setSize(User.PASSWORD_MAX_LENGHT); panel.getChildren().add(inputPwd); button.setId(FORM_ACTION); button.setValue(Utils.getMessageResourceString(SecurityConst.BUNDLE_NAME, SecurityConst.BUTTON_LOGIN, null, null)); panel.getChildren().add(button);
private void addPropSetButtons(ConfigurationSetComponent configurationSetComponent, HtmlForm modalPanelForm) { //the modal panel form is embedded inside the modal panel itself String modalPanelClientId = modalPanelForm.getParent().getClientId(FacesContext.getCurrentInstance()); HtmlPanelGrid panelGrid = FacesComponentUtility.addPanelGrid(modalPanelForm, null, 2, CssStyleClasses.BUTTONS_TABLE); // OK button HtmlAjaxCommandLink okLink = FacesComponentUtility.createComponent(HtmlAjaxCommandLink.class); panelGrid.getChildren().add(okLink); okLink.setTitle("OK"); FacesComponentUtility.addParameter(okLink, null, "refresh", configurationSetComponent.getId()); FacesComponentUtility.addButton(okLink, "OK", CssStyleClasses.BUTTON_MEDIUM); // Cancel button (only if not read-only) if (!configurationSetComponent.isReadOnly()) { HtmlOutputLink cancelLink = FacesComponentUtility.addOutputLink(panelGrid, null, "#"); cancelLink.setOnclick("Richfaces.hideModalPanel('" + modalPanelClientId + "'); return false;"); cancelLink.setTitle("Cancel"); FacesComponentUtility.addButton(cancelLink, "CANCEL", CssStyleClasses.BUTTON_MEDIUM); } }