1 5 package org.exoplatform.portlets.log.component; 6 7 import java.util.* ; 8 import org.exoplatform.faces.core.component.*; 9 import org.exoplatform.faces.core.component.model.*; 10 import org.exoplatform.services.log.LogService; 11 12 16 public class UILogError extends UILog { 17 private static List LOG_ERROR_LEVEL_OPTIONS ; 18 19 static { 20 LOG_ERROR_LEVEL_OPTIONS = new ArrayList(5) ; 21 LOG_ERROR_LEVEL_OPTIONS.add(new SelectItem("fatal", "0")) ; 22 LOG_ERROR_LEVEL_OPTIONS.add(new SelectItem("error", "1")) ; 23 } 24 25 public UILogError(LogService service) { 26 super(service) ; 27 setId("UILogError"); 28 } 29 30 protected void createUIComponents() { 31 uiLogMessages_ = new UILogMessages() ; 32 List list = getLogMessages(1 , 50) ; 33 uiLogMessages_.setLogMessages(list) ; ; 34 uiNumberOfMessages_ = new UISelectBox("numberOfMessages", "50", NUM_OF_MESSAGES_OPTIONS) ; 35 uiLogLevel_ = new UISelectBox("level", "1", LOG_ERROR_LEVEL_OPTIONS) ; 36 } 37 38 protected List getLogBuffer() { return service_.getErrorBuffer() ; } 39 } 40 | Popular Tags |