package com.wisedu.coeus.core.tag;

import com.wisedu.coeus.core.ConstantStatic;
import com.wisedu.coeus.core.bo.LoginUser;
import com.wisedu.coeus.util.MessageUtils;
import com.wisedu.coeus.util.Strings;
import com.wisedu.coeus.web.LocaleResolver;

import javax.servlet.ServletRequest;

/**
 * Created by 01112026 on 15-11-30.
 */
public class PageDescriptionTag extends TextTag {
    @Override
    protected String getOutputText() {
        String strText = "";

        ServletRequest request = pageContext.getRequest();

        strText = (String) request.getAttribute(ConstantStatic.PAGE_DESCRIPTION);

        if (Strings.isNotEmpty(strText)) return strText;

        strText = MessageUtils.getMessage("sys.page.description", null, null, LocaleResolver.getLocale());

        return strText;
    }
}
