1 13 package info.magnolia.cms.gui.dialog; 14 15 import info.magnolia.cms.beans.config.ContentRepository; 16 import info.magnolia.cms.core.Content; 17 import info.magnolia.cms.i18n.MessagesManager; 18 19 import javax.jcr.RepositoryException; 20 import javax.servlet.http.HttpServletRequest ; 21 import javax.servlet.http.HttpServletResponse ; 22 23 24 28 public class DialogLink extends DialogEditWithButton { 29 30 33 protected DialogLink() { 34 } 35 36 39 public void init(HttpServletRequest request, HttpServletResponse response, Content websiteNode, Content configNode) 40 throws RepositoryException { 41 super.init(request, response, websiteNode, configNode); 42 String extension = this.getConfigValue("extension"); String label = MessagesManager.get(this.getRequest(), "dialog.link.internal"); this.getButton().setLabel(label); 45 this.getButton().setSaveInfo(false); 46 String repository = this.getConfigValue("repository", ContentRepository.WEBSITE); this.getButton().setOnclick( 48 "mgnlDialogLinkOpenBrowser('" + this.getName() + "','" + repository + "','" + extension + "');"); } 50 51 } 52 | Popular Tags |