[
https://issues.jboss.org/browse/RF-10965?page=com.atlassian.jira.plugin.s...
]
Michal Huniewicz updated RF-10965:
----------------------------------
Summary: In Rich dataTable, [Enter] in h:inputText submits form (was: In Rich
dataTable, [Enter] in h:outputText submits form)
Description:
Enter submits form when focus is on h:inputText in a rich:dataTable.
<h:form id="dogForm">
<rich:messages />
<rich:dataTable value="#{dogsBean.allDogs}" var="dog"
id="table"
rows="30">
<f:facet name="noData">
<h:outputText value="#{msg['index.table.noData']}" />
</f:facet>
<rich:column filterValue="#{dogsFilteringBean.nameFilter}"
filterExpression="#{fn:containsIgnoreCase(dog.name,dogsFilteringBean.nameFilter)}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{msg['index.table.column.name']}" />
<h:inputText value="#{dogsFilteringBean.nameFilter}"
onkeypress="if (event.keyCode == 13) {return false;} else {return
true;}">
<a4j:ajax event="blur" render="table"
execute="@this" />
</h:inputText>
</h:panelGroup>
</f:facet>
<h:outputText value="#{dog.name}" />
</rich:column>
</rich:dataTable>
</h:form>
was:
Enter submits form when focus is on h:outputText in a rich:dataTable.
<h:form id="dogForm">
<rich:messages />
<rich:dataTable value="#{dogsBean.allDogs}" var="dog"
id="table"
rows="30">
<f:facet name="noData">
<h:outputText value="#{msg['index.table.noData']}" />
</f:facet>
<rich:column filterValue="#{dogsFilteringBean.nameFilter}"
filterExpression="#{fn:containsIgnoreCase(dog.name,dogsFilteringBean.nameFilter)}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{msg['index.table.column.name']}" />
<h:inputText value="#{dogsFilteringBean.nameFilter}"
onkeypress="if (event.keyCode == 13) {return false;} else {return
true;}">
<a4j:ajax event="blur" render="table"
execute="@this" />
</h:inputText>
</h:panelGroup>
</f:facet>
<h:outputText value="#{dog.name}" />
</rich:column>
</rich:dataTable>
</h:form>
In Rich dataTable, [Enter] in h:inputText submits form
------------------------------------------------------
Key: RF-10965
URL:
https://issues.jboss.org/browse/RF-10965
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-tables
Affects Versions: 4.0.0.Final
Environment: Windows 7, Firefox 4, JBoss 6
Reporter: Michal Huniewicz
Priority: Minor
Labels: enter, form, submit, waiting_on_user
Enter submits form when focus is on h:inputText in a rich:dataTable.
<h:form id="dogForm">
<rich:messages />
<rich:dataTable value="#{dogsBean.allDogs}" var="dog"
id="table"
rows="30">
<f:facet name="noData">
<h:outputText value="#{msg['index.table.noData']}" />
</f:facet>
<rich:column filterValue="#{dogsFilteringBean.nameFilter}"
filterExpression="#{fn:containsIgnoreCase(dog.name,dogsFilteringBean.nameFilter)}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{msg['index.table.column.name']}"
/>
<h:inputText value="#{dogsFilteringBean.nameFilter}"
onkeypress="if (event.keyCode == 13) {return false;} else {return
true;}">
<a4j:ajax event="blur" render="table"
execute="@this" />
</h:inputText>
</h:panelGroup>
</f:facet>
<h:outputText value="#{dog.name}" />
</rich:column>
</rich:dataTable>
</h:form>
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira