Rechercher : dans
Par :

Passage de parametre entre un beam est jsf

Dernière réponse le 4 oct 2007 à 10:17:20 anisj1m, le 4 oct 2007 à 09:56:43 
 Signaler ce message aux modérateurs

Bonjour,

j'ai un probleme de passage de parametre de type list entre on bean et ma jsf;
mon bean est
[code]

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.trinidad.imaf;

import javax.faces.context.FacesContext;

import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
import org.apache.myfaces.trinidad.util.Service;
import com.labosun.cj.ejb3.entity.Contact;
import com.labosun.cj.ejb3.session.ContactManager;
import com.labosun.cj.web.locator.EjbLocator;
import java.util.List;
/**
* A typical simple backing bean, that is backed to

helloworld.jsp

*
*/
public class Beanlist
{

//properties
private String firstname;

private String lastname;

private String address;

private int zipCode;

private String city;

private String phone;

private String mobile;

private List<Contact> Listcontact;

/**
* default empty constructor
*/
public Beanlist()
{
}

//-------------------getter & setter
//debut
public String getfirstname()
{
//firstname = "anis";
return firstname;
}

public void setfirstname(String name)
{
this.firstname = name;
}
//fin
//debut
public String getlastname()
{
return lastname;
}

public void setlastname(String name)
{
this.lastname = name;
}
//fin
//debut
public String getaddress()
{
return address;
}

public void setaddress(String name)
{
this.address = name;
}
//fin
//debut
public int getzipCode()
{
return zipCode;
}

public void setzipCode(int name)
{
this.zipCode = name;
}
//fin
//debut
public String getcity()
{
return city;
}

public void setcity(String name)
{
this.city = name;
}
//fin
//debut
public String getphone()
{
return phone;
}

public void setphone(String name)
{
this.phone = name;
}
//fin
//debut
public String getmobile()
{
return mobile;
}

public void setmobile(String name)
{
this.mobile = name;
}
//fin



public List<Contact> getListcontact()
{
ContactManager contactManager = EjbLocator.getLocator().getContactManager();

Listcontact = contactManager.getlistContact();
System.out.println(Listcontact.toString());
return Listcontact;

}




}

[/code]
et ma jsf est :
[code]
<tr:table value="#{Beanlist.Listcontact}" var="entry">

<tr:column>
<tr:outputText value="entry.firstname"></tr:outputText>
</tr:column>



</tr:table>

[/code]
Configuration: Windows XP
Internet Explorer 6.0

Meilleures réponses pour « passage de parametre entre un beam est jsf » dans :
Bash - Les paramètres VoirIntroduction Les paramètres positionnels Exemple 1 Les paramètres spéciaux Exemple 2 Initialiser des paramètres - La commande "set" - Exemples - La commande "shift" - Exemple 3 Introduction Il est possible de fournir à un script,...
Paramètres GPRS VoirSi vous possédez un téléphone mobile fonctionnant sous Windows Mobile (smartphone du type HTC, Qtek, etc.), voici les paramètres GPRS pour les trois principaux opérateurs français Orange Orange GSM Orange GPRS Orange MMS Orange...
[Mozilla Firefox] Sauvegarder les paramètres VoirSauvegarder / Restaurer les paramètres de Firefox, les marque-pages, historique et les extensions installées Commencez par afficher les fichiers cachés. Sous Vista, il faut s'approprier le dossier C:\users\Utilisateur*\Application Data pour...
Télécharger Password Interlock VoirVoulez-vous un endroit sûr pour stocker vos mots de passes ? Une seule adresse : Password interlock. Password interlock est un programme qui vous permet de garder vos différents login et mot de passe en sécurité. Comme paramètre de sécurité, il vous...

1

 anisj1m, le 4 oct 2007 à 10:17:20

Bonjour,
j'ai trouver l'erreur c'est la specification des bean il ne faut pas commencer un attribut avec une majiscule;
mais al'issue de cela je n'ai pas d'erreur mais au lieu d'avoir les nom j'ai eu comme cela:

Code :

entry.firstname
entry.firstname
entry.firstname
entry.firstname
entry.firstname
entry.firstname
entry.firstname
et mon code est:

Code :
<tr:table value="#{Beanlist.Listcontact}" var="entry">

<tr:column>
<tr:outputText value="entry.firstname"></tr:outputText>
</tr:column>



</tr:table>

Répondre à anisj1m