[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread flashguru
Hello there,

Can you show us your 'show-user-details' form?  And what do you mean by 
clicking on a form? Are you submitting a form or are you refreshing the page?

Also, are you using Firefox?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4022009#4022009

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4022009
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread schmatz
Yes I'm using Firefox 2.x.

clicking = submitting the user form with redirect 

Here's the userDataForm:

!DOCTYPE composition PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  |  
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  | ui:composition xmlns=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:ec=http://jboss.com/products/seam/entityconverter/taglib;
  | template=template.xhtml
  | 
  | ui:define name=subtitle
  | h:outputText value=Create a new account 
rendered=#{!identity.loggedIn} /
  | h:outputText value=Edit your account details 
rendered=#{identity.loggedIn} /
  | /ui:define
  |
  | ui:define name=body
  | 
  | p
  | h:outputText value=Please fill in the form 
rendered=#{!identity.loggedIn} /
  | h:outputText value=Update your fields 
rendered=#{identity.loggedIn} /
  | /p
  | 
  | h:form id=createNewAccountForm
  | 
  | s:validateAll
  | 
  | div class=dialog
  | div class=prop
  | span class=nameUsername/span
  | span class=value
  | s:decorate
  | h:inputText id=username required=true 
value=#{user.username} /
  | /s:decorate
  | /span
  | /div
  | s:div rendered=#{!identity.loggedIn}
  | div class=prop
  | span class=namePassword/span
  | span class=value
  | s:decorate
  | h:inputSecret id=password required=true 
value=#{user.password} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameRepeat password/span
  | span class=value
  | s:decorate
  | h:inputSecret id=password2 required=true 
value=#{user.password2} / 
  | /s:decorate
  | /span
  | /div
  | /s:div
  | div class=prop
  | span class=nameFirst name/span
  | span class=value
  | s:decorate
  | h:inputText id=firstName required=true 
value=#{user.firstName} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameLast name/span
  | span class=value
  | s:decorate
  | h:inputText id=lastName required=true 
value=#{user.lastName} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=namePseudonym/span
  | span class=value
  | s:decorate
  | h:inputText id=pseudonym 
value=#{user.pseudonym} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameEmail address/span
  | span class=value
  | s:decorate
  | h:inputText id=emailAddr required=true 
value=#{user.emailAddr} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameZip/span
  | span class=value
  | s:decorate
  | h:inputText id=zip required=true 
value=#{user.zip} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameCity/span
  | span class=value
  | s:decorate
  | h:inputText id=city required=true 
value=#{user.city} / 
  | /s:decorate
  | /span
  | /div
  | div class=prop
  | span class=nameCountry/span
  | span class=value
  | s:decorate
  | h:selectOneListbox 
id=country value=#{user.country} size=1 required=true
  | s:selectItems 
value=#{countries.resultList} var=countr label=#{countr.name} /
  | ec:convertEntity /
  | /h:selectOneListbox
  | /s:decorate
  | 

[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread flashguru
Please be aware that some browsers will repopulate some of the fields for you . 
 
If you have access to IE 6, can you try to reproduce the behavior again?

Also, would you please post your User class too?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4022086#4022086

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4022086
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread schmatz
anonymous wrote : Please be aware that some browsers will repopulate some of 
the fields for you.
Maybe it's of interest that I redirect to a success page after submitting the 
form.

Here's the User entity:
@Entity
  | @Scope(ScopeType.SESSION)
  | @Name(user)
  | @Table(name=tzuser)
  | @javax.persistence.SequenceGenerator(
  | name=s_tzuser,
  | sequenceName=s_tzuser)
  | public class User implements Serializable
  | {
  | private static final long serialVersionUID = 3366658268468153076L;
  | 
  | public static enum UserStatus { ACTIVE, INACTIVE, REMOVED };
  | 
  | protected Long id;
  | 
  | protected String username;
  | protected String checkPassword, password, password2;
  | protected SetRole roles = new HashSetRole();
  | 
  | protected String firstName;
  | protected String lastName;
  | protected String pseudonym;
  | protected String emailAddr;
  | 
  | protected String street;
  | protected String zip;
  | protected String city;
  | protected String district;
  | protected Country country;
  | 
  | protected Date dob;
  | 
  | protected Boolean emailAddrChecked = false;
  | protected UserStatus status = UserStatus.ACTIVE;
  | 
  | 
  | 
  | public User()
  | {
  | }
  | 
  | @Override
  | public String toString()
  | {
  | return firstName +   + lastName +  ( + id + );
  | }
  | 
  | @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, 
generator=s_tzuser)
  | public Long getId()
  | {
  | return id;
  | }
  | 
  | public void setId(Long id)
  | {
  | this.id = id;
  | }
  | 
  | @ManyToMany(
  | targetEntity=Role.class,
  | cascade={CascadeType.PERSIST, CascadeType.MERGE, 
CascadeType.REFRESH}
  | )
  | @JoinTable(
  | name=user_role,
  | [EMAIL PROTECTED](name=fk_user)},
  | [EMAIL PROTECTED](name=fk_role)}
  | )
  | public SetRole getRoles()
  | {
  | return roles;
  | }
  | 
  | public void setRoles(SetRole roles)
  | {
  | this.roles = roles;
  | }
  | 
  | public void addRole(Role role)
  | {
  | this.roles.add(role);   
  | }
  | 
  | @NotNull
  | public String getCity()
  | {
  | return city;
  | }
  | 
  | public void setCity(String city)
  | {
  | this.city = city;
  | }
  | 
  | @ManyToOne(cascade={CascadeType.PERSIST, CascadeType.MERGE, 
CascadeType.REFRESH})
  | @JoinColumn(name=fk_country)
  | public Country getCountry()
  | {
  | return country;
  | }
  | 
  | public void setCountry(Country country)
  | {
  | this.country = country;
  | }
  | 
  | public Date getDob()
  | {
  | return dob;
  | }
  | 
  | public void setDob(Date dob)
  | {
  | this.dob = dob;
  | }
  | 
  | @NotNull
  | public String getFirstName()
  | {
  | return firstName;
  | }
  | 
  | public void setFirstName(String firstName)
  | {
  | this.firstName = firstName;
  | }
  | 
  | @NotNull
  | public String getLastName()
  | {
  | return lastName;
  | }
  | 
  | public void setLastName(String lastName)
  | {
  | this.lastName = lastName;
  | }
  | 
  | @NotNull
  | @Length(min=2)
  | public String getUsername()
  | {
  | return username;
  | }
  | 
  | public void setUsername(String username)
  | {
  | this.username = username;
  | }
  | 
  | @NotNull
  | //@Length(min=8, max=30)
  | public String getPassword()
  | {
  | return password;
  | }
  | 
  | public void setPassword(String password)
  | {
  | this.password = password;
  | }
  | 
  | //@Length(min=8, max=30)
  | @Transient
  | public String getPassword2()
  | {
  | return password2;
  | }
  | 
  | public void setPassword2(String password2)
  | {
  | this.password2 = password2;
  | }
  | 
  | //@Length(min=8, max=30)
  | @Transient
  | public String getCheckPassword() {
  | return checkPassword;
  | }
  | 
  | public void setCheckPassword(String checkPassword) {
  | this.checkPassword = checkPassword;
  | }
  | 
  | @NotNull
  | public String getZip()
  | {
  | return zip;
  | }
  | 
  | public void setZip(String zip)
  | {
  | this.zip = zip;
  | }
  | 
  | public String getPseudonym()
  | {
  | return pseudonym;
  | }
  | 
  | public void setPseudonym(String pseudonym)
  | {
  | this.pseudonym 

[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread schmatz
Ups! Blame on me

I just realize that the user is SESSION-scoped...

Sorry for that!

Mark

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4022091#4022091

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4022091
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread flashguru
Ok, I should have asked for the User class from the start.  Glad you are okay 
now!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4022092#4022092

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4022092
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Does #{identity.login} start a long running conversation

2007-02-25 Thread schmatz
OK. After making the User entity CONVERSATION-scoped everything works like I 
expect.

Thanks,
Marl

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4022093#4022093

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4022093
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user