/** * {@inheritDoc} */ @Override public Link getMyCardUrl(PortalControllerContext portalControllerContext) throws PortalException { Bundle bundle = this.bundleFactory.getBundle(portalControllerContext.getHttpServletRequest().getLocale()); Map<String, String> properties = new HashMap<String, String>(); properties.put(InternalConstants.PROP_WINDOW_TITLE, bundle.getString(InternationalizationConstants.KEY_MY_PROFILE)); properties.put("osivia.hideTitle", "1"); properties.put("osivia.ajaxLink", "1"); properties.put(DynaRenderOptions.PARTIAL_REFRESH_ENABLED, String.valueOf(true)); Map<String, String> parameters = new HashMap<String, String>(); String url = this.urlFactory.getStartPortletInNewPage(portalControllerContext, "myprofile", bundle.getString(InternationalizationConstants.KEY_MY_PROFILE), this.getCardInstance(), properties, parameters); return new Link(url, false); }
Bundle bundle = this.bundleFactory.getBundle(locale);
/** * Return a label in resources files * @param pcc * @param label the key in resources bundle * @return the label translated */ protected String getMessage(PortalControllerContext pcc, String label) { Bundle bundle = this.getBundleFactory().getBundle(pcc.getRequest().getLocale()); return bundle.getString(label); }
/** * Return a label in resources files * @param pcc * @param label the key in resources bundle * @param args some args * @return the label translated */ protected String getMessage(PortalControllerContext pcc, String label, Object... args) { Bundle bundle = this.getBundleFactory().getBundle(pcc.getRequest().getLocale()); return bundle.getString(label, args); }
Bundle bundle = this.bundleFactory.getBundle(request.getLocale());
/** * {@inheritDoc} */ @Override protected void doTag(NuxeoController nuxeoController, DocumentDTO document) throws JspException, IOException { if (document.isCommentable()) { // Internationalization bundle Bundle bundle = this.bundleFactory.getBundle(nuxeoController.getRequest().getLocale()); // Container Element container = this.generateContainer(nuxeoController, document, bundle); // Delete confirmation fancybox Element fancybox = this.generateDeleteConfirmationFancybox(nuxeoController, document, bundle); // HTML writer HTMLWriter htmlWriter = new HTMLWriter(this.getJspContext().getOut()); htmlWriter.setEscapeText(false); htmlWriter.write(container); htmlWriter.write(fancybox); } }