[seam-issues] [JBoss JIRA] (SEAMFACES-47) UIInputContainer keeps invalid state too long

Miguel Z (JIRA) jira-events at lists.jboss.org
Tue Jan 22 17:04:21 EST 2013


    [ https://issues.jboss.org/browse/SEAMFACES-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749585#comment-12749585 ] 

Miguel Z commented on SEAMFACES-47:
-----------------------------------

Very simple fix proposed here:

https://community.jboss.org/thread/178631

                
> UIInputContainer keeps invalid state too long
> ---------------------------------------------
>
>                 Key: SEAMFACES-47
>                 URL: https://issues.jboss.org/browse/SEAMFACES-47
>             Project: Seam Faces
>          Issue Type: Bug
>          Components: UI Components
>    Affects Versions: 3.0.0.Alpha3
>            Reporter: Nicklas Karlsson
>            Assignee: José Freitas
>             Fix For: 3.Future
>
>
> Given a 
> 		<p:input>
> 			<h:inputText value="#{credentials.username}" />
> 		</p:input>
> 		<p:input>
> 			<h:inputText value="#{credentials.password}" />
> 		</p:input>
> 		<h:commandButton value="Login" action="#{credentials.login}" />
> and a 
> @Model
> public class Credentials {
> 	@NotNull
> 	private String username;
> 	public String getUsername() {
> 		return username;
> 	}
> 	public void setUsername(String username) {
> 		this.username = username;
> 	}
> 	@NotNull
> 	public String getPassword() {
> 		return password;
> 	}
> 	public void setPassword(String password) {
> 		this.password = password;
> 	}
> 	private String password;
> 	public void login() {
> 		System.out.println(username);
> 		System.out.println(password);
> 	}
> }
> with 
> 	<context-param>
> 		<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
> 		<param-value>true</param-value>
> 	</context-param>
> and a modified input.xhtml that outputs #{cc.attrs.invalid}
> you submit a blank form and get "true" and correct message for both fields, then you enter a value in the second field and re-submit and the messages are correct but both fields still show true for the invalid attribute output (making it impossible to use the attr for rendered attributes if e.g. an error image)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the seam-issues mailing list