Développement et langages de programmation » JSF (Java server Face) et Applications web

Accueil » Forums » Développement et langages de programmation » JSF (Java server Face) et Applications web (4 messages)

Veuillez vous authentifier pour poster des messages

il y a 2 ans, 9 mois
par dialune

Salut . Pour ceux qui voudrai realiser une application web dans un environnement de production ,voici JSF.Un frameword de developpement qui implemente le model MVC .Et de plus , JSF vous fourni des composants de presentation tres fournis :D

il y a 2 ans, 9 mois
par dialune

Voici comment ca fonctionne

//Definir son model
package sn.myApps;

public class MyModel {
        private String nom ;
    private String prenom ;
    private Integer age;
    private String  job ;
    public MyModel(String nom, String prenom, Integer age, String job) {
            super();
            this.nom = nom;
            this.prenom = prenom;
            this.age = age;
            this.job = job;
    }
    public Integer getAge() {
            return age;
    }
    public void setAge(Integer age) {
            this.age = age;
    }
    public String getJob() {
            return job;
    }
    public void setJob(String job) {
            this.job = job;
    }
    public String getNom() {
            return nom;
    }
    public void setNom(String nom) {
            this.nom = nom;
    }
    public String getPrenom() {
            return prenom;
    }
    public void setPrenom(String prenom) {
            this.prenom = prenom;
    }

System Message: WARNING/2 (<string>, line 42)

Literal block ends without a blank line; unexpected unindent.

}

//Definir son bean

System Message: WARNING/2 (<string>, line 45)

Block quote ends without a blank line; unexpected unindent.

package sn.myApps; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class MyModelBean {

System Message: ERROR/3 (<string>, line 50)

Unexpected indentation.

private List<MyModel> myModels ; public List getMyModels (){

System Message: ERROR/3 (<string>, line 52)

Unexpected indentation.
/**

System Message: WARNING/2 (<string>, line 56)

Bullet list ends without a blank line; unexpected unindent.

*/

System Message: WARNING/2 (<string>, line 56); backlink

Inline emphasis start-string without end-string.
MyModel&#91;] arrayMyModel ={
new MyModel ('Dia', 'Alioune', new Integer (27), 'Informaticien') , new MyModel ('Barron', 'Jack', new Integer (23), 'Agronome') , new MyModel ('charle', 'Jack', new Integer (23), 'testeur') };
if(this.myModels == null || this.myModels.isEmpty()){
this.myModels =new ArrayList<MyModel> (); this.myModels = Arrays.asList(arrayMyModel);

System Message: WARNING/2 (<string>, line 65)

Definition list ends without a blank line; unexpected unindent.

} return this .myModels;

System Message: WARNING/2 (<string>, line 67)

Block quote ends without a blank line; unexpected unindent.

}

System Message: WARNING/2 (<string>, line 68)

Block quote ends without a blank line; unexpected unindent.

}

//En fin votre jsp <%@ taglib uri='http://java.sun.com/jsf/html' prefix='html' %> <%@ taglib uri='http://java.sun.com/jsf/core' prefix='core' %> <core:view>

System Message: ERROR/3 (<string>, line 74)

Unexpected indentation.
<html:dataTable value='#{myModelBean.myModels}' var='model' border='1' cellspacing='4' width='60%' > <html:column> <html:outputText value='#{model.nom}' /> </html:column> <html:column> <html:outputText value='#{model.prenom}' /> </html:column> <html:column> <html:outputText value='#{model.job}' /> </html:column> </html:dataTable>

System Message: WARNING/2 (<string>, line 86)

Block quote ends without a blank line; unexpected unindent.

</core:view>

et c'est fini ,vous avez une ebauche d'application web , :D

il y a 2 ans, 9 mois
par Thomas

Il faut vraiment que tu te mettes à Python et Django (ou Ruby on Rails, ou TurboGears, ou autre)... tu découvrira le bon côté de la force ;)

il y a 2 ans, 9 mois
par dialune

Salut J'avoue que quand on m'a parlé de python pour la première fois ,je me suis dis pourquoi j'allais mettre au tiroir mon java adoré ;D . J'étais loin de penser que quelques mois plus tard j'allai devenir accro de ce magnifique et puissant langage .Pour une application DeskTop , je confirme que il y'a tout ce qu'il faut . Je n'ai pas encore utilisé a fond jango , mais celui-ci parait assez prometteur .Je vais regarder ça de plus près .merci thomas . :) Par contre turbogears , je connais pas , si j'ai le temps , je vais regarder .

Répondez

Authentifiez-vous pour répondre