[ 
https://jira.jboss.org/jira/browse/RF-6664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Belaevski reassigned RF-6664:
----------------------------------

    Assignee: Mikhail Vitenkov  (was: Nick Belaevski)


> graphValidator: message level change it state during update field, verified 
> by ajaxValidator.
> ---------------------------------------------------------------------------------------------
>
>                 Key: RF-6664
>                 URL: https://jira.jboss.org/jira/browse/RF-6664
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: IE7, IE8, FF 3.0.7, Safari 3.1, Opera 9.62, Chrome 
> 1.0.154.43(3.3.1.BETA2)
>            Reporter: Mikhail Vitenkov
>            Assignee: Mikhail Vitenkov
>            Priority: Minor
>
> #1. Add dataTable, verified by graphValidator(each field in table validated 
> by ajaxValidator):
> <h:form>
> <rich:messages id="richMessagesID" ajaxRendered="true" showSummary="true">
>                               <f:facet name="errorMarker">
>                                       <h:graphicImage url="/pics/error.gif" />
>                               </f:facet>
>                               <f:facet name="fatalMarker">
>                                       <h:graphicImage url="/pics/fatal.gif" />
>                               </f:facet>
>                               <f:facet name="infoMarker">
>                                       <h:graphicImage url="/pics/info.gif" />
>                               </f:facet>
>                               <f:facet name="warnMarker">
>                                       <h:graphicImage url="/pics/warn.gif" />
>                               </f:facet>
>                               <f:facet name="passedMarker">
>                                       <h:graphicImage url="/pics/passed.gif" 
> />
>                               </f:facet>
>               </rich:messages>
>       <h2>Input fields with label and message in the JSF dataTable.
>               Each field validated by AJAX on "onchange" event</h2>
>               <rich:graphValidator value="#{dataValidator}"                   
>                       id="graphValidatorID">
>                       <rich:dataTable value="#{dataValidator.beans}" 
> var="dataBean"
>                               id="table">
>                               <f:facet name="header">
>                                       <h:outputText
>                                               value="Validate values in the 
> data table. Total sum for an all integer values validated for a value less 
> then 20" />
>                               </f:facet>
>                               <h:column>
>                                       <f:facet name="header">
>                                               <h:outputText value="text 
> field" />
>                                       </f:facet>
>                                       <h:outputLabel for="text" 
> value="#{dataBean.textDescription}" />
>                                       <h:inputText id="text" 
> value="#{dataBean.text}">
>                                               <rich:ajaxValidator 
> event="onchange" />
>                                       </h:inputText>
>                               </h:column>
>                               <h:column>
>                                       <f:facet name="header">
>                                               <h:outputText value="integer 
> field" />
>                                       </f:facet>
>                                       <h:outputLabel for="intValue" 
> value="#{dataBean.intDescription}" />
>                                       <h:inputText id="intValue" 
> value="#{dataBean.intValue}">
>                                               <rich:ajaxValidator 
> event="onchange"/>
>                                       </h:inputText>                          
>         
>                               </h:column>
>                               <f:facet name="footer">
>                                       <h:panelGroup>
>                                               <h:outputText>in addition to 
> fields validation, total sum for an all integer values validated for a value 
> less then 20.</h:outputText>
>                                               <a4j:commandButton 
> value="Submit all fields"></a4j:commandButton>
>                                       </h:panelGroup>
>                               </f:facet>
>                       </rich:dataTable>
>               </rich:graphValidator>
> </h:form>
> And the bean code:
> public class DataBean  {
>       
>       private final List<Validable> beans;    
>       /**
>        * @return the beans
>        */
>       @Valid
>       public List<Validable> getBeans() {
>               return beans;
>       }
>       public DataBean() {
>               beans = new ArrayList<Validable>(6);
>               beans.add(new NotNullBean());
>               beans.add(new NotEmptyBean());
>               beans.add(new LengthBean());
>               beans.add(new MinBean());
>               beans.add(new MaxBean());
>               beans.add(new MinMaxBean());            
>       }
>       @Max(value=20,message="Total value should be less then 20")
>       public int getTotal(){
>               int total = 0;
>               for (Validable bean : beans) {
>                       total += bean.getIntValue();
>               }
>               return total;
>       }
> }
> #2. Navigate to the page.
> #3. Enter '44' in "Integer Value, more then 1" input.
> #4. Press "Submit all fields". - graphValidator message appears.
> #5. Verify messages level - it should be "error"
> #6. Replace '44' by '4' and verify messages level again.
> Actual behavior:
> Message level is changed to "info".

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

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to