Skip to main content

for HTTP get not working for jsf2.3

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
dtrprasad
Offline
Joined: 2005-01-29

I have start page forMeta.xhtml

xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">

Sending Data To metadata

Using Meta & viewParam





index3.xhtml is
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">

Metadata Example

User Data






#{username}






FacesUser is
package htcjsfs;
import javax.enterprise.context.SessionScoped;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
@Named
@SessionScoped
public class FacesUser implements java.io.Serializable {
private String username;
private String commonName;
private String education;
private String email;
private long mobile;
private String occupation;
private String address;

private String data = "BBB..um";

public String getData() {
return data;
}

public void setData(String data) {
this.data = data;
}

public FacesUser() {
super();
System.out.println("HHHHH");
}

public FacesUser(String username,
String commonName,
String education,
String occupation,
String address) {
super();
this.username = username;
this.commonName = commonName;
this.education = education;
this.occupation = occupation;
this.address = address;
}

public String getUsername() {
System.out.println("FFFFF2");
return username;
}

public void setUsername(String username) {
System.out.println("FFFFF");
this.username = username;
}

public String getCommonName() {
return commonName;
}

public void setCommonName(String commonName) {
this.commonName = commonName;
}

public String getEducation() {
return education;
}

public void setEducation(String education) {
this.education = education;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public long getMobile() {
return mobile;
}

public void setMobile(long mobile) {
this.mobile = mobile;
}

public String getOccupation() {
return occupation;
}

public void setOccupation(String occupation) {
this.occupation = occupation;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((username == null) ? 0 : username.hashCode());
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FacesUser other = (FacesUser) obj;
if (username == null) {
if (other.username != null)
return false;
} else if (!username.equals(other.username))
return false;
return true;
}
@Override
public String toString() {
return "FacesUser [username=" + username + ", commonName=" + commonName
+ ", education=" + education + ", email=" + email + ", mobile="
+ mobile + ", occupation=" + occupation + ", address="
+ address + "]";
}
public void process(){
System.out.println("GGGGG");
UserDetails ud = new UserDetails();
this.data = ud.getUserDetails(username);
}
}
i have web.xml,beans.xml(empty), only named bean's getters are firing without setter firing
please help me
dtrprasad@gmail.com