You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dyego Souza Dantas Leal (JIRA)" <de...@myfaces.apache.org> on 2006/02/03 11:45:03 UTC

[jira] Created: (MYFACES-1091) Problem with validators and immediate

Problem with validators and immediate
-------------------------------------

         Key: MYFACES-1091
         URL: http://issues.apache.org/jira/browse/MYFACES-1091
     Project: MyFaces
        Type: Bug
    Versions: 1.1.1    
 Environment: Windows XP - P IV 3.0 HT with 1GB of ram running on JBoss 4.0.3SP1 inside eclipse 3.1.2
    Reporter: Dyego Souza Dantas Leal
    Priority: Critical


The bug is very strange , i have a form to include a new user... but the form have a selectOneMenu with two options "1-Insdustry / 2 - Home" , if i select the Industry option , the form open two new inputTexts to addtional informations:

	       <h:selectOneMenu id="tipo" value="#{webeugUsuario.formbean.tipocadastro}" onchage="submit" immediate="true">
		          <f:selectItems value="#{webeugUsuario.tiposCadastro}" />
               </h:selectOneMenu>

               <h:outputText value="Industry Name" rendered="#{webeugUsuario.formbean.cadastroInstituicao}"/>
 	       <h:inputText id="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicao}"/>
		<h:message for="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
            

               <h:outputText value="Industry Id" rendered="#{webeugUsuario.formbean.cadastroInstituicaoId}"/>
 	       <h:inputText id="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicaoId}"/>
		<h:message for="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>


            <h:outputText value="Nome"/>
 			   <h:inputText id="nome" required="true" value="#{webeugUsuario.formbean.nome}">
			       <f:validateLength minimum="5"/>
			   </h:inputText>	
			<h:message for="nome" styleClass="error"/>

the field Name always rendered, of course , this field is mandatory , If the selectOneMenu has change , page change , but ,  the name field show a validator error:

"field 'name' has no value"

Of course... i'm not adding new user... just change type of user... i put the immediate option in selectOneMenu , but has no effect.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1091) Problem with validators and immediate

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1091?page=comments#action_12365277 ] 

Martin Marinschek commented on MYFACES-1091:
--------------------------------------------

What you will need to do is put valueChangeListener on the component, and react in this valuechanged-listener.

You will need to pull the value out of the component, and pass it through to the model in this valuechange-listener - finally you will need to call 

facesContext.renderResponse() 

to make sure that you immediately go to the render phase, and not do any validation anymore.

Please ask for further clarifications on the user-list!

regards,

Martin

> Problem with validators and immediate
> -------------------------------------
>
>          Key: MYFACES-1091
>          URL: http://issues.apache.org/jira/browse/MYFACES-1091
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.1.1
>  Environment: Windows XP - P IV 3.0 HT with 1GB of ram running on JBoss 4.0.3SP1 inside eclipse 3.1.2
>     Reporter: Dyego Souza Dantas Leal
>     Priority: Critical
>      Fix For: Nightly

>
> The bug is very strange , i have a form to include a new user... but the form have a selectOneMenu with two options "1-Insdustry / 2 - Home" , if i select the Industry option , the form open two new inputTexts to addtional informations:
> 	       <h:selectOneMenu id="tipo" value="#{webeugUsuario.formbean.tipocadastro}" onchage="submit" immediate="true">
> 		          <f:selectItems value="#{webeugUsuario.tiposCadastro}" />
>                </h:selectOneMenu>
>                <h:outputText value="Industry Name" rendered="#{webeugUsuario.formbean.cadastroInstituicao}"/>
>  	       <h:inputText id="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicao}"/>
> 		<h:message for="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             
>                <h:outputText value="Industry Id" rendered="#{webeugUsuario.formbean.cadastroInstituicaoId}"/>
>  	       <h:inputText id="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicaoId}"/>
> 		<h:message for="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             <h:outputText value="Nome"/>
>  			   <h:inputText id="nome" required="true" value="#{webeugUsuario.formbean.nome}">
> 			       <f:validateLength minimum="5"/>
> 			   </h:inputText>	
> 			<h:message for="nome" styleClass="error"/>
> the field Name always rendered, of course , this field is mandatory , If the selectOneMenu has change , page change , but ,  the name field show a validator error:
> "field 'name' has no value"
> Of course... i'm not adding new user... just change type of user... i put the immediate option in selectOneMenu , but has no effect.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1091) Problem with validators and immediate

Posted by "Dyego Souza Dantas Leal (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1091?page=comments#action_12365063 ] 

Dyego Souza Dantas Leal commented on MYFACES-1091:
--------------------------------------------------

this is a classic situation , imagine you putting the postalcode of user , and the system search the address "onblur" , the same problem occur...
the rest of firelds with "required=true" shows a validation error... this is very strange... but i'm not tested on R.I.


> Problem with validators and immediate
> -------------------------------------
>
>          Key: MYFACES-1091
>          URL: http://issues.apache.org/jira/browse/MYFACES-1091
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.1.1
>  Environment: Windows XP - P IV 3.0 HT with 1GB of ram running on JBoss 4.0.3SP1 inside eclipse 3.1.2
>     Reporter: Dyego Souza Dantas Leal
>     Priority: Critical

>
> The bug is very strange , i have a form to include a new user... but the form have a selectOneMenu with two options "1-Insdustry / 2 - Home" , if i select the Industry option , the form open two new inputTexts to addtional informations:
> 	       <h:selectOneMenu id="tipo" value="#{webeugUsuario.formbean.tipocadastro}" onchage="submit" immediate="true">
> 		          <f:selectItems value="#{webeugUsuario.tiposCadastro}" />
>                </h:selectOneMenu>
>                <h:outputText value="Industry Name" rendered="#{webeugUsuario.formbean.cadastroInstituicao}"/>
>  	       <h:inputText id="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicao}"/>
> 		<h:message for="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             
>                <h:outputText value="Industry Id" rendered="#{webeugUsuario.formbean.cadastroInstituicaoId}"/>
>  	       <h:inputText id="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicaoId}"/>
> 		<h:message for="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             <h:outputText value="Nome"/>
>  			   <h:inputText id="nome" required="true" value="#{webeugUsuario.formbean.nome}">
> 			       <f:validateLength minimum="5"/>
> 			   </h:inputText>	
> 			<h:message for="nome" styleClass="error"/>
> the field Name always rendered, of course , this field is mandatory , If the selectOneMenu has change , page change , but ,  the name field show a validator error:
> "field 'name' has no value"
> Of course... i'm not adding new user... just change type of user... i put the immediate option in selectOneMenu , but has no effect.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-1091) Problem with validators and immediate

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1091?page=all ]
     
Martin Marinschek closed MYFACES-1091:
--------------------------------------

    Fix Version: Nightly
     Resolution: Invalid
      Assign To: Martin Marinschek

> Problem with validators and immediate
> -------------------------------------
>
>          Key: MYFACES-1091
>          URL: http://issues.apache.org/jira/browse/MYFACES-1091
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.1.1
>  Environment: Windows XP - P IV 3.0 HT with 1GB of ram running on JBoss 4.0.3SP1 inside eclipse 3.1.2
>     Reporter: Dyego Souza Dantas Leal
>     Assignee: Martin Marinschek
>     Priority: Critical
>      Fix For: Nightly

>
> The bug is very strange , i have a form to include a new user... but the form have a selectOneMenu with two options "1-Insdustry / 2 - Home" , if i select the Industry option , the form open two new inputTexts to addtional informations:
> 	       <h:selectOneMenu id="tipo" value="#{webeugUsuario.formbean.tipocadastro}" onchage="submit" immediate="true">
> 		          <f:selectItems value="#{webeugUsuario.tiposCadastro}" />
>                </h:selectOneMenu>
>                <h:outputText value="Industry Name" rendered="#{webeugUsuario.formbean.cadastroInstituicao}"/>
>  	       <h:inputText id="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicao}"/>
> 		<h:message for="instituicao" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             
>                <h:outputText value="Industry Id" rendered="#{webeugUsuario.formbean.cadastroInstituicaoId}"/>
>  	       <h:inputText id="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" required="true" value="#{webeugUsuario.formbean.nomeInstituicaoId}"/>
> 		<h:message for="instituicaoId" rendered="#{webeugUsuario.formbean.cadastroInstituicao}" styleClass="error"/>
>             <h:outputText value="Nome"/>
>  			   <h:inputText id="nome" required="true" value="#{webeugUsuario.formbean.nome}">
> 			       <f:validateLength minimum="5"/>
> 			   </h:inputText>	
> 			<h:message for="nome" styleClass="error"/>
> the field Name always rendered, of course , this field is mandatory , If the selectOneMenu has change , page change , but ,  the name field show a validator error:
> "field 'name' has no value"
> Of course... i'm not adding new user... just change type of user... i put the immediate option in selectOneMenu , but has no effect.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira