You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Volodymyr Siedlecki (Jira)" <de...@myfaces.apache.org> on 2022/10/25 02:30:00 UTC

[jira] [Commented] (MYFACES-4425) Input value not saved/restored in state when inside UIRepeat

    [ https://issues.apache.org/jira/browse/MYFACES-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623520#comment-17623520 ] 

Volodymyr Siedlecki commented on MYFACES-4425:
----------------------------------------------

[~tandraschko]  This problem is part of the Faces 4.0 TCK : 

[https://github.com/eclipse-ee4j/mojarra/issues/3837]

[https://github.com/jakartaee/faces/blob/4.0.1/tck/faces22/ajax/src/test/java/ee/jakarta/tck/faces/test/servlet30/ajax/Issue3833IT.java]


Any possibility we can use this fix above? Or are there concerns you have with it?

> Input value not saved/restored in state when inside UIRepeat
> ------------------------------------------------------------
>
>                 Key: MYFACES-4425
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4425
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Thomas Andraschko
>            Priority: Major
>
> https://github.com/eclipse-ee4j/mojarra/issues/4957
> reproducer:
>     click "1", message should say "null -> 1"
>     click "3", message should say "null -> 3"
>     click "2", message should say "1 -> 2", but MyFaces said "null -> 2"
>     click "4", message should say "3 -> 4", but MyFaces said "null -> 4"
> {code:html}
> <h:form id="form">
>     <ui:repeat value="#{issue3833Bean.lists}" var="list">
>         <h:selectOneListbox valueChangeListener="#{issue3833Bean.listener}" size="2">
>             <f:selectItems value="#{list}" />
>             <f:ajax render="form:message" />
>         </h:selectOneListbox>
>     </ui:repeat>
>     <h:panelGroup id="message" layout="block">
>         <h:outputText value="#{issue3833Bean.message}" />
>     </h:panelGroup>
> </h:form>
> {code}
> {code:java}
> @Named
> @RequestScoped
> public class Issue3833Bean {
>     private static List<String> list1 = Arrays.asList("1", "2");
>     private static List<String> list2 = Arrays.asList("3", "4");
>     private static List<List<String>> lists = Arrays.asList(list1, list2);
>     private String message;
>     public void listener(ValueChangeEvent e) {
>         message = (e.getOldValue() + " -> " + e.getNewValue());
>     }
>     public List<List<String>> getLists() {
>       return lists;
>     }
>     public String getMessage() {
>         return message;
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)