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

Nick Belaevski resolved RF-5592.
--------------------------------

    Resolution: Rejected
      Assignee: Tsikhon Kuprevich


That's not a bug. Value of input is not saved in model due to 
bypassUpdates="true" thus causing rendering of old model value. ui:repeat just 
do not update page content (also this won't work with ajaxSingle component), 
while a4j:repeat does that. That's why ui:repeat seems to be working. Consider 
the following code:

import java.util.Arrays;
import java.util.List;

public class RF5992 {
        private List<String> texts = Arrays.asList(new String[] { "First" });

        public List<String> getTexts() {
                return texts;
        }

        public void setTexts(List<String> texts) {
                this.texts = texts;
        }
        
        public long getTime() {
                return System.currentTimeMillis();
        }
}


                <h:form>
                        <ui:repeat value="#{rf5992.texts}" rowKeyVar="index">
                                <h:inputText id="text" 
value="#{rf5992.texts[0]}">
                                        <a4j:support ajaxSingle="true" 
event="onchange" reRender="text, outputText"
                                                bypassUpdates="true" />
                                </h:inputText>
                                <h:outputText id="outputText" 
value="#{rf5992.time}" />
                        </ui:repeat>
                </h:form>

Compare value of time text when a4j:repeat and ui:repeat are used.

> User is unable to update the text in the input field, if this field is inside 
> of <a4j:repeat> and <a4j:support> is used to re-Render that field
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-5592
>                 URL: https://jira.jboss.org/jira/browse/RF-5592
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.2.2
>            Reporter: Igor Dikhtyaruk
>            Assignee: Tsikhon Kuprevich
>
> example:
> xhtml:
>       <a4j:repeat value="#{myBean.texts}" rowKeyVar="index">
>               <h:inputText id="text" value="#{myBean.texts[index]}">
>                       <a4j:support 
>                               ajaxSingle="true" 
>                               event="onchange" 
>                               reRender="text" 
>                               bypassUpdates="true"/>
>               </h:inputText>
>       </a4j:repeat>
> Java bean:
> package au.gov.austrac;
> import java.util.Arrays;
> import java.util.Date;
> import java.util.List;
> import org.jboss.seam.ScopeType;
> import org.jboss.seam.annotations.Name;
> import org.jboss.seam.annotations.Scope;
> @Name("myBean")
> @Scope(ScopeType.SESSION)
> public class MyBean {
>       private List<String> texts = Arrays.asList(new String[]{"First"});
>       public List<String> getTexts() {
>               return texts;
>       }
>       public void setTexts(List<String> texts) {
>               this.texts = texts;
>       }
> }
> BTW,
> the following works well:
>       <ui:repeat value="#{myBean.texts}">
>               <h:inputText id="text" value="#{myBean.texts[0]}">
>                       <a4j:support 
>                               ajaxSingle="true" 
>                               event="onchange" 
>                               reRender="text" 
>                               bypassUpdates="true"/>
>               </h:inputText>
>       </ui:repeat>

-- 
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