[JBoss JIRA] Created: (RF-5595) Combobox loses it's value if value is entered by user and component is ajax re-rendered
by Brian Couchman (JIRA)
Combobox loses it's value if value is entered by user and component is ajax re-rendered
---------------------------------------------------------------------------------------
Key: RF-5595
URL: https://jira.jboss.org/jira/browse/RF-5595
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Environment: Firefox 2 - 3, IE6 / 7, Safari, Opera,....
Reporter: Brian Couchman
When a rich:combobox is on a page, with enableManualInput=true, user can type a value in the box that is not in the list of propositions.
At that moment, the hidden input is properly populated.
If an ajax request is fired on the page, and the combobox is rerendered, the input text still contains the user value, but the hidden input is empty, and any next submit (ajax or not) empties the bean bound to the combobox object.
The issue comes from the renderer of the Combobox
In the class ComboboxRenderer, doEncodeEnd(), at line 560 we see this code :
String hiddenValue = null;
if (items.contains(value)) {
variables.setVariable("hiddenValue", value);
}
which means : "If the value in the field is not part of the list of propositions, do not fill the hidden input with it". The input text is properly filled and it breaks the symetry (user sees a value in the box but another value is saved in the bean).
If enableManualInput=true, meaning the user can type his own value, there should be no check if the value is in the propositions or not, and the hidden field should be filled the same way the input text is.
Code should look like :
String hiddenValue = null;
if (enableManualInput || items.contains(value)) {
variables.setVariable("hiddenValue", value);
}
--
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
15 years, 11 months
[JBoss JIRA] Created: (RF-5300) columns: begin attribute ignore last columns, instead of earliest under facelets & seamApp application(jsf1.2_10)
by Mikhail Vitenkov (JIRA)
columns: begin attribute ignore last columns, instead of earliest under facelets & seamApp application(jsf1.2_10)
-----------------------------------------------------------------------------------------------------------------
Key: RF-5300
URL: https://jira.jboss.org/jira/browse/RF-5300
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: IE6, IE7, FF 3.1.3, Safari 3.1, Opera 9.62(3.3.0.BETA3)
Reporter: Mikhail Vitenkov
Assignee: Nick Belaevski
#1. Add rich:columns inside rich:dataTable following way:
<rich:dataTable id="richColumnsID" value="#{columns.data1}" var="d1" rendered="#{columns.dataTableRendered}">
...<rich:columns value="#{columns.data2}" var="d2" footerClass="test" headerClass="#{style.headerClass}" breakBefore="#{columns.breakBefore}" colspan="#{columns.colspan}"
columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" begin="#{columns.begin}" end="#{columns.end}" width="#{columns.width}" style="#{style.style}" styleClass="#{style.styleClass}"
sortOrder="#{columns.orderings[index]}" sortBy="#{d1.str0}"
filterBy="#{d1.str0}" selfSorted="true" sortable="true"
filterValue="#{columns.filterValue[index]}" filterMethod="#{columns.filterMethod}">
<f:facet name="header">
<h:outputText value="header #{index}"></h:outputText>
</f:facet>
<h:outputText value="#{d2}"></h:outputText>
<h:outputLink value="http://www.jboss.com/"><f:verbatim>Link</f:verbatim></h:outputLink>
<f:facet name="footer">
<h:outputText value="Footer #{index}"></h:outputText>
</f:facet>
</rich:columns>
...</rich:dataTable>
#2. Define data for columns and fill it:
private ArrayList<String> data2;
for (int i = 0; i < length1; i++) {
data2.add("data[" + i + "]");
}
getter & setter.
#3. Set begin attribute to '2';
#4. Navigate to page & verify columns' data.
Actual behavior:
The last colunm is ignored.
Expected behavior:
The first colunm is ignored.
--
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
15 years, 11 months