Saturday, March 26, 2011

Sweet 16 Barbie Invitations

IDENTIFY THE TYPE OF PROJECT


IDENTIFY THE TYPE OF PROJECT
identifies the type of project open and gets the src folder path and web
We click the project name and press




create a new module


and aggregated

En el layer.xml agregamos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN"
"http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="Actions">
<folder name="File">
<file name="org-avbravo-analizadorproyectos-MiAccion.instance">
<attr name="SystemFileSystem.localizingBundle"
stringvalue="org.avbravo.analizadorproyectos.Bundle"/>
<attr name="delegate" newvalue="org.avbravo.analizadorproyectos.MiAccion"/>
<attr name="displayName"
bundlevalue="org.avbravo.analizadorproyectos.Bundle#CTL_AnalizadorProyecto="/>
<attr name="iconBase"
stringvalue="org/avbravo/analizadorproyectos/resources/custom.png"/>
<attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
<attr name="noIconInMenu" stringvalue="false"/>
</file>
</folder>
<folder name="Window">
<file name="org-avbravo-analizadorproyectos-JSFWindowsTopComponent.instance"
url="org-avbravo-analizadorproyectos-JSFWindowsTopComponent.instance"/>
</folder>
</folder>
<folder name="Toolbars">
<folder name="File">
<file name="org-avbravo-analizadorproyectos-MiAccion.shadow">
<attr name="originalFile" stringvalue="Actions/File/org-avbravo-analizadorproyectos-
MiAccion.instance"/>
<attr name="position" intvalue="0"/>
</file>
</folder>
</folder>
</filesystem>


Clase Sesion.java
/*
* To change this template, choose Tools
/**
*
* @author avbravo
*/
public class Sesion {
static String src;
static String web;
static String tipoProyecto;
public static String getSrc() {
return src;
}
public static void setSrc(String src) {
Sesion.src = src;
}
public static String getWeb() {
return web;
}
public static void setWeb(String web) {
Sesion.web = web;
}
public static String getTipoProyecto() {
return tipoProyecto;
}
public static void setTipoProyecto(String tipoProyecto) {
Sesion.tipoProyecto = tipoProyecto;
}
}

MiAccion.java

package org.avbravo.analizadorproyectos;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javscazutilidades.Mensajeria;
import org.openide.windows.TopComponent;
/**
*
* @author avbravo
*/
public class MiAccion implements ActionListener {public void
actionPerformed (ActionEvent e) {
/ / TODO Implement action
body MyAction MyAction myAction = new ();
myAction.isEnabled
boolean b = ();
if (b) {
/ / / Mensajeria.Mensaje ("true");
} else {
Mensajeria.Mensaje ("You must select the project");
}}}
MyAction.java




javscazutilidades.Mensajeria import, import
org.netbeans.api.project.Project;
import org.openide.nodes.Node; import org.openide.util.HelpCtx; import org.openide.util.Lookup;
import org.openide.util.actions.CookieAction;
import org.openide.windows.TopComponent;

/**
 *
 * @author avbravo
 */
public final class MyAction extends CookieAction {

    Sesion sesion = new Sesion();
    String web = "";
    String src = "";

    @Override
    public boolean isEnabled() {
        try {
            web = "";
            src = "";
            if (this.getActivatedNodes() == null        return false;
            }
            Lookup lookup = this.getActivatedNodes()[0].getLookup();
            // gets the selected project
            Project currentProject = lookup.lookup(Project.class);
            if (currentProject != null) {
                String tipoProyecto = currentProject.getClass().getSimpleName();
                // Mensajeria.Mensaje("TipoProyecto:" + tipoProyecto);
                sesion.setTipoProyecto(tipoProyecto);
                src = currentProject.getProjectDirectory().getFileObject("src").toString();
                src = src.substring(src.indexOf("[") + 1, src.indexOf("@"));
              
sesion.setSrc(src);
                if (tipoProyecto.equals("NbMavenProjectImpl")) {
                    /*
                     * maven
                     */
              

} else {if (tipoProyecto.equals ("NbModuleProject")) {
/ * * modulo
netbeans
                      */
                    } else {
                        if (tipoProyecto.equals("J2SEProject")) {
                            /*
                             * desktop
                             */
                        } else {
                            if (tipoProyecto.equals("WebProject")) {
                                /*
                                 * web
                                 */
                                web = currentProject.getProjectDirectory().getFileObject("web").toString();
                                web = web.substring(web.indexOf("[") + 1, web.indexOf("@"));
                            }
                        }
                    }

                  
                    sesion.setWeb(web);
                    /*
                    if (currentProject.getProjectDirectory().getFileObject("nbproject") == null) {
                    Mensajeria.Mensaje(" null");
                    } else {
                    }
                     */



                }

         TopComponent AnalizadorProyectoTopComponent tc = new ();
tc.open ();
tc.requestActive ();
return true;
;
            }
        
        } catch (Exception ex) {
            Mensajeria.MensajeError(ex, "Error");

        }
        return false;
    }

    @Override
    protected int mode() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected Class<?>[] cookieClasses() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    protected void performAction(Node[] nodes) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public String getName() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

@ Override public
HelpCtx getHelpCtx () {throw new UnsupportedOperationException
("not supported yet.");
;}}










create a window



jTextFieldSRC.setText (sesion.getSrc () )

jTextFieldWEB.setText (sesion.getWeb ());
jTextFieldTipo.setText (sesion.getTipoProyecto ());


Sunday, March 20, 2011

Which Letter Not On Ontario Licence Plate

Basics Tutorial Web applications with NetBeans Part 4

Continuing with the basic tutorial with NetBeans Web applications, this section will see the application running and create a page to display data sent from the user.


Edit the Login bean and replace the definition of the class
long serialVersionUID = 1L;

and add the import java. io.Serializable





public String validate
() {return
"user";}

The value of "user" is the name of the page usuario.xhtml.
index.xhtml Edit and add in action = "# {login.Validar} a \u0026lt;h: commandButton
\u0026lt;h:commandButton value="Entrar" action="#{login.Validar}"/>

create a new page
Web Pages select New-> Java Server Faces and JSF Page file type



indicate the name



add \u0026lt;h: outputText to display the name of the user loginscreen  <h:outputLabel value ="#{login.username}"/>

quedarĂ­a
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
\u0026lt;title> Facelet Title \u0026lt;/ title>
\u0026lt;/ h: head>
\u0026lt;h:body> ;
\u0026lt;h:outputLabel value ="#{login.username}"/>
\u0026lt;/ h: body>
\u0026lt;/ html>
Now run the application}


and to click the Login button brings us to the next page and shows the user name that we entered on the previous page.





Friday, March 18, 2011

How To Word Free Concert Poster

For (String text

few days ago chatting with a friend on how to use Java cycles for ArrayList
\u0026lt;String> ; arrayImports \u0026lt;String> = new ArrayList ();
He used how are you
sentences for (int i = 0; i \u0026lt;arrayImports.size (); i + +) {
salida.println (arrayImports . get (i). toString ());}
tells you could improve your code
for (String t: arrayImports)
; salida.prinltn (t);


Wednesday, March 9, 2011

Getting Rid Of Gingivitis In Cats

PHOTOS SIKITRAKYS

PHOTO HUNTERS Gamusina "SIKITRAKYS"

Best Blueray Player With Upconversion

2011 2011 MURGA THE SEMIFINAL SIKITRAKYS

Wednesday, March 2, 2011

People With Same Birthday Compatibel

Basics Tutorial Web applications with NetBeans Part 3

now proceed to create our Bean. We
Sources are located in
Packages





to right click and select -> New -> Java Package


write avbravo.com




Within avbravo.beans
right click, select New-> Other
Categories Java Server Faces and File Type: JSF Bean Managed

We indicate the name: Login and Scope: Session (for which the value is maintained throughout the user session)

We created bean




generated code

javax.faces.bean.ManagedBean import, import
javax.faces.bean . SessionScoped;

/ **
* * @ Author
avbravo
* /

@ @ ManagedBean
SessionScoped
public class Login {
/ ** Creates a new instance of Login * / public
Login () {}

}
add two String attributes


right-click with your mouse and select Insert Code or press the key combination ALT + INS




select Getters and Setters

select all fields

The IDE generates get and set methods for each field
our class would be as follows
avbravo.beans package;

import javax. faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
/**
 *
 * @author avbravo
 */

@ManagedBean
@SessionScoped
public class Login {
String username;
String password;
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
   this.username = username;}

/ ** Creates a new instance of login * /
; public Login () {}

}

Edit the
index.xhtml


Agregamps In value = "" add # {and activates the wizard allows you to select
class

login select the class and write. and activates the wizard (you can activate by pressing CTRL + SPACE) and select username


repeat the same procedure for password.
the end result is this


In the next blog will create a page that will display the data sent by the user and stored in the Login class

Free Eye Exams In Dallas Tx

The preliminary Sikitrakys in 2011. WEDDING

Sunday, February 6, 2011

Cruising Spots Jacksonville

MURGA THE MANOLO AND ROSI TUNA AND DIFFICULTY SIKITRAKYS