Hirdetés
Új hozzászólás Aktív témák
-
Taoharcos
aktív tag
válasz
Taoharcos
#3785
üzenetére
Ja valami kód is:
package com.corejsf;
public class User {
private String name;
private String password;
public User(String name, String password){
this.name = name;
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}package com.corejsf;
import java.io.Serializable;
import java.util.*;
import javax.faces.bean.*;
@ManagedBean(name="userbean")
@SessionScoped
public class UserBean implements Serializable{
private String name;
private String password;
private String userListToString;
private static List userList = new ArrayList();
private User user;
public String addUser(){
user = new User(name, password);
userList.add(user);
userListToString = userList.toString();
if (userList.contains(user)){
return "thankYou";
}
else {
return "loginFail";
}
}
public String loginUser(){
user = new User(name, password);
userListToString = userList.toString();
if(userList.contains(user)){
return "thankYou";
}
else{
return "loginFail";
}
}
public String getUserListToString() {
return userListToString;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- E-roller topik
- Horgász topik
- Samsung Galaxy Felhasználók OFF topicja
- Linux kezdőknek
- Spórolós topik
- Luck Dragon: Alza kuponok – aktuális kedvezmények, tippek és tapasztalatok (külön igényre)
- PROHARDVER! feedback: bugok, problémák, ötletek
- Autós topik látogatók beszélgetős, offolós topikja
- Arc Raiders
- Építő/felújító topik
- További aktív témák...
- ELADÓ - Apple iPhone 14 Pro - 128gb
- Kiváló Thrustmaster T248 kormány + Posta! PS5 PS4 PC
- teljesen ÚJ Bontatlan Apple iPhone 17e 256GB ! 1Év nemzetközi APPLE GARANCiA
- ÚJ bontatlan Apple iPhone 17 Pro Max 256GB ! aktiválástól 1 ÉV nemzetközi APPLE GARANCiA
- Aorus RGB 16GB (2x8GB) DDR4 3333MHz GP-ARS16G33
- Apple iPhone 16 Pro Max 256GB fekete titán használt, megkímélt 100% akku (140 ciklus)
- AKCIÓ! AMD Ryzen 7 5700X3D 8 mag 16 szál processzor garanciával hibátlan működéssel
- 27% - Arzopa A1T 15,6" Hordozható Monitor!
- iPhone 12 Pro 128GB 100% (3hónap garancia)- ÚJ EREDETI AKKUMULÁTOR - AKCIÓ
- AKCÓ! HTC VIVE Pro 2 virtuális valóság szemüveg garanciával hibátlan működéssel
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

