What happens is that I have an Activity Client where I have 2 buttons, one of register and another of query, when I call the register opens an Activity with a TabHost with 2 fragments inside, in the query opens an Activity with listView and such...
Hey, guys,
So I have a question in my college work,
I have two tables one USER and USER_AMIGO both related, by java I'm looking for a user list that brings all users registered, and another list that brings a friend to a certain user, so I...
I'm working with an existing PDF file, following the short line of code:
//Código...
document = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(document, fOut);
document.open();
PdfContentByte cb = writ...
I'm doing a program (using the NetBeans GUI Builder and CardLayout) with several screens (various JPanels) and all of them will have a start button, which obviously returns to the home screen.
I want to leave the code cleaner, so I created a...
I have two Controller files and two JSP files with the same structure.
In JSP I have the following structure for AJAX:
$.ajax({
method: "POST",
url: '/modulo1/funcao1',
data: {
'atributo1': atributo1,...
How do I convert a TIMESTAMP or DATETIME of MySQL into a GregorianCalendar of Java? Or a better idea?
In the class, the dataCadastro field is of type GregorianCalendar . I'm writing to the database in typ...
I use this JavaScript to call a popup on JSF :
function showMyPage() {
window.open('./showMyPage.xhtml','mywindow', 'resizable=no,toolbar=no,scrollbars=yes,height=450,width=530,top=145,left=235');
return true;
}
But,...
In an application for user authentication via Radius I thought it would be interesting to use Design Patter Strategy with Enum.
So the code looks like this:
public enum TipoAutenticacao {
LIVRE("Acesso Livre"){
@Override
public Str...
To retrieve an object from my domain from the AdapterView.OnItemLongClickListener event bound to my ListView I added to the ViewHolder of the adapter used by it a reference to my domain object.
public static class ViewHolder {
priva...
How do I do a check in java SE for some data, to return a message and request this information again if it is incorrect, in an elegant way following good practices of object orientation?