Hirdetés
- OnePlus 15 - van plusz energia
- Apple Watch
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Szívós, szép és kitartó az új OnePlus óra
- One mobilszolgáltatások
- Milyen okostelefont vegyek?
- Huawei P30 Pro - teletalálat
- Xiaomi 15T Pro - a téma nincs lezárva
- Megtalálták az akkumulátortechnológiai Szent Grált? - CES
- EarFun Air Pro 4+ – érdemi plusz
Ú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?:))
- Lenovo Yoga 7 2-in-1 OLED Ryzen 5 8640HS 16GB /512SSD/1év gari
- Dobozos Asus VivoBook S 15 Laptop 15,6" -30% Snapdragon X Elite 32/1TB 3K OLED 120Hz
- Jó állapotú Playstation 2 SLIM SCPH-70005 csomag eladó!
- Emc CX4-4PDAE STORAGE- adattároló - 15X 3TB - Több db van
- BESZÁMÍTÁS! LENOVO ThinkPad P15 Gen2 munkaállomás - i7 11800H 16GB DDR4 512GB SSD Quadro T1200 4GB W
- BESZÁMÍTÁS! MSI B450M R5 5600X 16GB DDR4 512GB SSD RX 7700 XT 12GB Lian Li Lancool 217 fehér CM 700W
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7500F 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- IttEladó egy Huawei GT3 okos óra Dobozzal tőltővel
- GYÖNYÖRŰ iPhone 13 Mini 128GB Blue- 1 ÉV GARANCIA -Kártyafüggetlen, MS4062
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7800X3D 32/64GB RAM RTX 5090 32GB GAMER PC termékbeszámítással
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


