Here we go:
PS: I'm using a4j extremly hard!!!
| /**
| *
| * @author Dennis Guse
| *
| */
| @Name("users")
| @Scope(ScopeType.SESSION)
| public class UserControl extends Selection implements Serializable {
|
| @Out(required=false)
| public User getSelectedUser() {
| User selected = ((User) super.getSelected());
| if (selected != null) {
| System.out.println(selected.toString());
| }
| return (User) super.getSelected();
| }
|
| @In(required=false)
| public void setSelectedUser(User user) {
| setSelected(user);
| }
|
| public void add() {
| setSelected(new User());
| }
|
| public List getResult() {
| return entityManager.createQuery(getQuery()).getResultList();
| }
| }
|
| http://www.w3.org/1999/xhtml";
|xmlns:s="http://jboss.com/products/seam/taglib";
|xmlns:ui="http://java.sun.com/jsf/facelets";
|xmlns:f="http://java.sun.com/jsf/core";
|xmlns:h="http://java.sun.com/jsf/html";
|xmlns:rich="http://richfaces.ajax4jsf.org/rich";
|xmlns:a4j="https://ajax4jsf.dev.java.net/ajax";>
|
|
| Client
|
|
|
|
|
|
|
| Status
|
|
|
|
|
|
|
| CustomerGroup
|
|
|
|
|
|
|
|
| Titel
|
|
|
|
|
|
|
| firstName
|
|
|
|
|
|
|
| surName
|
|
|
|
|
|
|
| Language
|
|
|
|
|
|
|
| userName
|
|
|
|
|
|
|
|
|
| Street
|
|
|
|
|
|
|
| StreetNumber
|
|
|
|
|
|
|
| ZIP
|
|
|
|
|
|
|
|
| Town
|
|
|
|
|
|
|
| Country
|
|
|
|
|
|
|
|
|
| http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
| http://www.w3.org/1999/xhtml";
| xmlns:s="http://jboss.com/products/seam/taglib";
| xmlns:ui="http://java.sun.com/jsf/facelets";
| xmlns:f="http://java.sun.com/jsf/core";
| xmlns:h="http://java.sun.com/jsf/html";
| xmlns:rich="http://richfaces.ajax4jsf.org/rich";
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax";
| template="/administration/template.xhtml">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| The template for this page is easy nothing special, only some panels...
|
If i visit the /objects/user.xhtml direct, i can watch closely.
If a user gets selected I can see all attributes, but If I do any action on the
page I lose the data, but only the data for the manytoone relations...
Thanks in advance!!!
View the original post :
http://www.jb