Hirdetés
- iPhone topik
- Samsung Galaxy S20 és S20+ duplateszt
- Az iPhone 17 gáncsolta el a Galaxy S26 Prót?
- Huawei Mate 10 Pro - mestersége az intelligencia
- Xiaomi 15T Pro - a téma nincs lezárva
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Xiaomi 14T Pro - teljes a család?
- Poco X6 Pro - ötös alá
- EarFun Air Pro 4+ – érdemi plusz
- Megérkezett a Google Pixel 7 és 7 Pro
Ú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?:))
- GYÖNYÖRŰ iPhone 12 64GB Black -1 ÉV GARANCIA - Kártyafüggetlen, MS2113, 100% Akkumulátor
- IKEA Format lámpák eladóak (Egyben kedvezménnyel vihető!)
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7800X3D 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- ÁRGARANCIA!Épített KomPhone Ryzen 7 5700X 16/32/64GB RAM RTX 5060 Ti 16GB GAMER termékbeszámítással
- Telefon felvásárlás!! Apple Watch Series 6/Apple Watch Series 7/Apple Watch Series 8
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


