[ https://issues.apache.org/jira/browse/TRINIDAD-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599321#action_12599321 ]
Martin Koci commented on TRINIDAD-930: -------------------------------------- I think this is unambiguously a bug: 1) No other component/renderer has that behaviour 2) If you look in getSubmittedValue implementations in trinidad, only SimpleSelectOneRenderer contains that strange code 3) Why SimpleSelectOneRenderer contains algorithm saying: this component was not sumbitted, but indicate that it was - without any explanation. 4) From user view: no JSF user expects that component modifies backing bean values although it was not in form (was not a part of a user interaction) 5) And last but not least: we use trinidad in production with this patch applied without any unexpected results. Without this patch users reported data lost/unexpected modifications. > tr:selectOneChoice resets value if not in form > ---------------------------------------------- > > Key: TRINIDAD-930 > URL: https://issues.apache.org/jira/browse/TRINIDAD-930 > Project: MyFaces Trinidad > Issue Type: Bug > Components: Components > Affects Versions: 1.2.6-core > Environment: JSF RI 1.2, Trinidad 1.2 trunk > Reporter: Martin Koci > Priority: Critical > Fix For: 1.2.5-core > > Attachments: SimpleSelectOneRenderer.java.patch > > > If tr:selectOneChoice is outside a h:form, it resets value used in > value="#{}". Test case: > JSP snippet: > <tr:selectOneChoice value="#{testBean.property}" unselectedLabel="(not > selected)"> > <f:selectItem itemValue="value1" itemLabel="Item 1"/> > </tr:selectOneChoice> > <h:form> <!-- tr:selectOneChoice is not in the form --> > <h:commandButton value="Ok" /> > </h:form> > managed bean in session scope: > public class TestBean { > > private String property = "value1"; > > public String getProperty() { > return property; > } > public void setProperty(String property) { > this.property = property; > } > } > > Steps to reproduce problem: > 1) Display jsp page - it shows "Item 1" in combobox > 2) Click on "Ok" button > 3) Value in combobox will change to "(not selected)" -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.