/** * @return the default footer text. */ protected String getDefaultFooterText() { return getApplicationService().getName() + " v" + getApplicationService().getVersion() + " - " + getApplicationService().getCopyright(); }
/** * @param stylesheets the stylesheets to set */ public void setStylesheets(final List<String> stylesheets) { List<String> tmp = new ArrayList<String>(); String stylesheetUrl; for (String stylesheet : stylesheets) { if (stylesheet.startsWith("http://") || stylesheet.startsWith("https://") || stylesheet.startsWith(".") || stylesheet.startsWith("/")) { stylesheetUrl = stylesheet; } else { stylesheetUrl = getMediaPath() + "/" + stylesheet; } tmp.add(stylesheetUrl); } this.stylesheets = tmp; }
@Override protected void setProperties(final UIComponent component) { TagsConfigurator tagsConfigurator = TagsConfigurator.getInstance(); setLayout(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuLayout())); setStyleClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuStyleClass())); setActiveItemClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuActiveItemStyleClass())); setItemClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuItemStyleClass())); super.setProperties(component); } }
/** * @param a * @return HtmlTag : LI tag containing the text separator (3 small points). */ private HtmlTag makeLiText(final Application a) { HtmlTag liText = (HtmlTag) a.createComponent(HtmlTag.COMPONENT_TYPE); liText.setValue(HTML.LI_ELEM); liText.setStyle("border:none;background-color:transparent;"); if (getBundles() != null) { HtmlOutputText text = (HtmlOutputText) a.createComponent(HtmlOutputText.COMPONENT_TYPE); text.setValue(getBundles().get(TEXT_SEPARATOR_I18N_KEY)); text.setParent(liText); text.setStyleClass(TagsConfigurator.getInstance().getTextStyleClass()); liText.getChildren().add(text); } return liText; } /*
@Override public void encodeBegin(final FacesContext arg0) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Entered encodeBegin for client-Id: " + getId()); } if (!StringUtils.hasText(getStyleClass())) { setStyleClass(TagsConfigurator.getInstance().getPaginatorStyleClass()); } Paginator< ? > pagi = getPaginator(); UIAbstractPaginatorStyle paginatorStyle = null; if (getChildren() != null && !getChildren().isEmpty()) { ////this paginator can have only one son. getChildren().remove(0); } paginatorStyle = new UIPaginatorStyle(); paginatorStyle.setParent(this); paginatorStyle.setAttributes(pagi, getPaginatorELExpression(), getItemsName(), getVisibleBlocks(), getStringsVar(), getOnchange()); getChildren().add(paginatorStyle); if (logger.isDebugEnabled()) { logger.debug("Exited encodeBegin"); } super.encodeBegin(arg0); }
documentTitle = getDefaultDocumentTitle(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(getClass() + ": no documentTitle set, using default [" footerText = getDefaultFooterText(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(getClass() + ": no footerText set, using default ["
@Override public void beforePhase(final PhaseEvent event) { if (logger.isDebugEnabled()) { logger.debug("enterig RessourceBundlePhaseListener::beforePhase = " + event); } FacesContext context = event.getFacesContext(); try { Locale locale = (Locale) ContextUtils.getSessionAttribute(AbstractI18nAwareBean.LOCALE_ATTRIBUTE); if (locale == null && context.getViewRoot() != null) { locale = context.getViewRoot().getLocale(); } if (locale != null && context.getExternalContext().getRequestMap().get(DEFAULT_STRINGVAR) == null) { TagsConfigurator tagsConfigurator = TagsConfigurator.getInstance(); context.getExternalContext().getRequestMap().put( DEFAULT_STRINGVAR, tagsConfigurator.getStrings(locale)); } } catch (NoRequestBoundException e) { //do nothing logger.warn("in ResourceBundlePhaseListener::beforePhase NoRequestBoundException"); } }
@Override protected void setProperties(final UIComponent component) { TagsConfigurator tagsConfigurator = TagsConfigurator.getInstance(); setLayout(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuLayout())); setStyleClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuStyleClass())); setActiveItemClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuActiveItemStyleClass())); setItemClass(TagUtils.getStringValueExpression( getFacesContext().getApplication(),tagsConfigurator.getMenuItemStyleClass())); super.setProperties(component); } }
/** * @param a * @return HtmlTag : LI tag containing the text separator (3 small points). */ private HtmlTag makeLiText(final Application a) { HtmlTag liText = (HtmlTag) a.createComponent(HtmlTag.COMPONENT_TYPE); liText.setValue(HTML.LI_ELEM); liText.setStyle("border:none;background-color:transparent;"); if (getBundles() != null) { HtmlOutputText text = (HtmlOutputText) a.createComponent(HtmlOutputText.COMPONENT_TYPE); text.setValue(getBundles().get(TEXT_SEPARATOR_I18N_KEY)); text.setParent(liText); text.setStyleClass(TagsConfigurator.getInstance().getTextStyleClass()); liText.getChildren().add(text); } return liText; } /*
@Override public void encodeBegin(final FacesContext arg0) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Entered encodeBegin for client-Id: " + getId()); } if (!StringUtils.hasText(getStyleClass())) { setStyleClass(TagsConfigurator.getInstance().getPaginatorStyleClass()); } Paginator< ? > pagi = getPaginator(); UIAbstractPaginatorStyle paginatorStyle = null; if (getChildren() != null && !getChildren().isEmpty()) { ////this paginator can have only one son. getChildren().remove(0); } paginatorStyle = new UIPaginatorStyle(); paginatorStyle.setParent(this); paginatorStyle.setAttributes(pagi, getPaginatorELExpression(), getItemsName(), getVisibleBlocks(), getStringsVar(), getOnchange()); getChildren().add(paginatorStyle); if (logger.isDebugEnabled()) { logger.debug("Exited encodeBegin"); } super.encodeBegin(arg0); }
documentTitle = getDefaultDocumentTitle(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(getClass() + ": no documentTitle set, using default [" footerText = getDefaultFooterText(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(getClass() + ": no footerText set, using default ["
/** * @return the default document title. */ protected String getDefaultDocumentTitle() { return getApplicationService().getName() + " v" + getApplicationService().getVersion(); }
/** * @param scripts the scripts to set */ public void setScripts(final List<String> scripts) { List<String> tmp = new ArrayList<String>(); String stylesheetUrl; for (String script : scripts) { if (script.startsWith("http://") || script.startsWith("https://") || script.startsWith(".") || script.startsWith("/")) { stylesheetUrl = script; } else { stylesheetUrl = getMediaPath() + "/" + script; } tmp.add(stylesheetUrl); } this.scripts = tmp; }
span.setParent(divNbItems); span.setId(divNbItems.getId() + "_numbers_items"); span.setStyleClass(TagsConfigurator.getInstance().getTextStyleClass()); UIParameter param = (UIParameter) a.createComponent(UIParameter.COMPONENT_TYPE); if (UIComponentTag.isValueReference(getItemsName())) {
/** * @return the default footer text. */ protected String getDefaultFooterText() { return getApplicationService().getName() + " v" + getApplicationService().getVersion() + " - " + getApplicationService().getCopyright(); }
/** * @param scripts the scripts to set */ public void setScripts(final List<String> scripts) { List<String> tmp = new ArrayList<String>(); String stylesheetUrl; for (String script : scripts) { if (script.startsWith("http://") || script.startsWith("https://") || script.startsWith(".") || script.startsWith("/")) { stylesheetUrl = script; } else { stylesheetUrl = getMediaPath() + "/" + script; } tmp.add(stylesheetUrl); } this.scripts = tmp; }
span.setParent(divNbItems); span.setId(divNbItems.getId() + "_numbers_items"); span.setStyleClass(TagsConfigurator.getInstance().getTextStyleClass()); UIParameter param = (UIParameter) a.createComponent(UIParameter.COMPONENT_TYPE); if (UIComponentTag.isValueReference(getItemsName())) {
/** * @return the default document title. */ protected String getDefaultDocumentTitle() { return getApplicationService().getName() + " v" + getApplicationService().getVersion(); }
/** * @param stylesheets the stylesheets to set */ public void setStylesheets(final List<String> stylesheets) { List<String> tmp = new ArrayList<String>(); String stylesheetUrl; for (String stylesheet : stylesheets) { if (stylesheet.startsWith("http://") || stylesheet.startsWith("https://") || stylesheet.startsWith(".") || stylesheet.startsWith("/")) { stylesheetUrl = stylesheet; } else { stylesheetUrl = getMediaPath() + "/" + stylesheet; } tmp.add(stylesheetUrl); } this.stylesheets = tmp; }
span.setParent(divNbItemsByPage); span.setId(divNbItemsByPage.getId() + "_items_per_page"); span.setStyleClass(TagsConfigurator.getInstance().getTextStyleClass());