This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Caixa de diálogo modal que apresenta opções de download: abrir ou baixar. | |
| */ | |
| var downloadModal = { | |
| /** | |
| * Inicializa os eventos necessários. | |
| */ | |
| init: function() { | |
| downloadModal.installShow(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // RICH TEXT EDITOR | |
| var richEditor = { | |
| init: function() { | |
| richEditor.initValidation(); | |
| }, | |
| /** | |
| * Adiciona uma classe de erro, no caso do campo ter sido invalidado por falta de conteúdo ou | |
| * exceder o tamanho máximo de caracteres. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.eclipse.persistence.mappings.DatabaseMapping; | |
| import org.eclipse.persistence.mappings.converters.Converter; | |
| import org.eclipse.persistence.sessions.Session; | |
| public class BooleanConverter implements Converter { | |
| private static final long serialVersionUID = -8002966734017614459L; | |
| @Override | |
| public Object convertDataValueToObjectValue(Object arg0, Session arg1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.Serializable; | |
| import javax.faces.application.FacesMessage; | |
| import javax.faces.bean.ManagedBean; | |
| import javax.faces.bean.RequestScoped; | |
| import javax.faces.component.UIComponent; | |
| import javax.faces.context.FacesContext; | |
| import javax.faces.convert.Converter; | |
| import javax.faces.convert.ConverterException; | |
| import javax.persistence.EntityManager; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| /** | |
| * <P>Componente de {@link Tema}.</P> | |
| * @author thania | |
| * @since 2013-04-26 | |
| */ | |
| public abstract class TemaComponent { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import org.apache.poi.hssf.usermodel.HSSFCell; | |
| import org.apache.poi.hssf.usermodel.HSSFCellStyle; | |
| import org.apache.poi.hssf.usermodel.HSSFFont; | |
| import org.apache.poi.hssf.usermodel.HSSFRow; | |
| import org.apache.poi.hssf.usermodel.HSSFSheet; | |
| import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| import org.apache.poi.ss.usermodel.Font; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static br.com.sebrae.action.BaseAction.NO_PASSWORD; | |
| import javax.servlet.http.HttpServletRequest; | |
| import org.apache.struts2.ServletActionContext; | |
| import br.com.sebrae.action.BaseAction; | |
| import br.com.sebrae.model.Usuario; | |
| import br.com.sebrae.util.ActionRetriever; | |
| import br.com.sebrae.util.SessionKeys; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TextUtils { | |
| /** | |
| * Trunca um texto de acordo com o total de caracteres repassado. | |
| * @param text texto para truncar. | |
| * @param length o tamanho máximo para truncar. | |
| * @return um literal truncado. | |
| */ | |
| public static String truncate(String text, int length) { | |
| if (text.length() <= length) return text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.commons.lang3.StringUtils; | |
| /** | |
| * Validador de campos. | |
| */ | |
| public class FieldValidator { | |
| private String value; | |
| public FieldValidator(String value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.servlet.http.HttpServletRequest; | |
| import org.apache.commons.lang3.StringUtils; | |
| /** | |
| * Recupera a ação de um {@link HttpServletRequest}. | |
| * @author thania | |
| */ | |
| public class ActionRetriever { |