[JBoss JIRA] Created: (RF-4240) rich:scrollableDataTable exception thrown when attempting to filter
by Valery Tcherepanov (JIRA)
rich:scrollableDataTable exception thrown when attempting to filter
-------------------------------------------------------------------
Key: RF-4240
URL: https://jira.jboss.org/jira/browse/RF-4240
Project: RichFaces
Issue Type: Bug
Environment: FireFox 3.0, JSF 1.2, RichFaces 3.2.1
Reporter: Valery Tcherepanov
rich:scrollableDataTable fallbacks to rich:column id attribute as part of expression by which to filter. Since id attribute is not intended(??) to be a part of any type of value expression that leads to unpredictable sorting results or exception thrown. See code example beelow
// bean
import java.util.List;
import java.util.ArrayList;
public class TableBean {
private List<String[]> tableData;
private String[] headers;
public TableBean() {
fillTableData();
fillHeaders();
}
private void fillHeaders() {
headers = new String[]{"Header1", "Header2"};
}
private void fillTableData() {
tableData = new ArrayList<String[]>();
for (int i = 0; i < 20; i++) {
tableData.add(new String[]{"Record " + i, i + ""});
}
}
public List<String[]> getTableData() {
return tableData;
}
public String[] getHeaders() {
return headers;
}
}
// table
<rich:scrollableDataTable
height="400px"
width="700px"
value="#{tableBean.tableData}"
var="data">
<rich:column id="someId0">
<f:facet name="header"><h:outputText value="#{tableBean.headers[0]}"/></f:facet>
<h:outputText value="#{data[0]}"/>
</rich:column>
<rich:column id="someId1">
<f:facet name="header"><h:outputText value="#{tableBean.headers[1]}"/></f:facet>
<h:outputText value="#{data[1]}"/>
</rich:column>
</rich:scrollableDataTable>
Clicking on table header (in FireFox) results in
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: For input string: "someId1"
javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
root cause
java.lang.NumberFormatException: For input string: "someId1"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.parseInt(Integer.java:497)
javax.el.ArrayELResolver.coerce(ArrayELResolver.java:153)
javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
org.richfaces.model.impl.expressive.SimplePropertyExpression.evaluate(SimplePropertyExpression.java:33)
org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapObject(ObjectWrapperFactory.java:189)
org.richfaces.model.impl.expressive.ObjectWrapperFactory$2.convert(ObjectWrapperFactory.java:177)
org.richfaces.model.impl.expressive.ObjectWrapperFactory.convertList(ObjectWrapperFactory.java:138)
org.richfaces.model.impl.expressive.ObjectWrapperFactory.wrapList(ObjectWrapperFactory.java:175)
org.richfaces.model.internal.ComponentSortableDataModel.prepareCollection(ComponentSortableDataModel.java:58)
org.richfaces.model.internal.ComponentSortableDataModel.loadData(ComponentSortableDataModel.java:112)
org.richfaces.model.DataModelCache.loadData(DataModelCache.java:153)
org.richfaces.model.ScrollableTableDataModel.walk(ScrollableTableDataModel.java:127)
org.richfaces.model.DataModelCache.walk(DataModelCache.java:183)
org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:1127)
org.richfaces.component.UIScrollableDataTable.walk(UIScrollableDataTable.java:347)
org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderAjaxChildren(ScrollableDataTableBaseRenderer.java:736)
org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeChildren(ScrollableDataTableBaseRenderer.java:804)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:125)
org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:68)
org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:116)
org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:68)
org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:116)
org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:673)
org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:544)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
--
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, 6 months
[JBoss JIRA] Created: (RF-5396) Editor: "tabindex" attribute does not work.
by Alexander Dubovsky (JIRA)
Editor: "tabindex" attribute does not work.
-------------------------------------------
Key: RF-5396
URL: https://jira.jboss.org/jira/browse/RF-5396
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: 3.3.0.BETA4
Reporter: Alexander Dubovsky
Assignee: Nick Belaevski
"tabindex" attribute does not work in Editor.
Description for attribute:
"Tabindex" enables you to specify an element ID to focus, when the user pressed the tab key inside the
editor. You can also use the special ":prev" and ":next" values. It will then places the focus on either
the previous or next input element placed before/after the TinyMCE instance in the DOM.
Nothing from listed above does not work.
--
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, 7 months
[JBoss JIRA] Created: (RF-2393) Tree nested inside node of an outer tree has strange behaviour on ajax submit when there are validation errors
by Mike Hanafey (JIRA)
Tree nested inside node of an outer tree has strange behaviour on ajax submit when there are validation errors
--------------------------------------------------------------------------------------------------------------
Key: RF-2393
URL: http://jira.jboss.com/jira/browse/RF-2393
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.4
Environment: Glassfish v2, JSF RI 1.2
Reporter: Mike Hanafey
Attachments: NestedTree.war
I have situation where there is an outer tree whose nodes have an inner tree. Specifically, the outer tree is over DNA sequences, and each DNA sequence may have a tree of comments attached to it.
Both the inner and outer trees have a couple of faces, one is used when a node is in display mode, and the other when it is in edit mode.
If the inner tree is put into edit mode at a node (via an ajax request) and a validation error occurs on a second ajax request to submit the edits, the whole inner tree for that node disappears. It can be recovered by doing a browser redisplay. If there is no validation error, the edit works as expected
Looking at the XmlHttpRequest response when there is a validation error shows that the response does not contain the expected tree nodes.
When this same comment tree code (both the backing beans and the facelets views) is applied on an unnested tree this problem does not occur.
A test war is attached (the war is big only because it includes the library dependencies -- the test code itself is small).
To demonstrate, deploy the war and look at the top page.
Click on the + next to "Comments" (this is the un-nested tree). Click "Ajax Save". Observe the "Value is required" messages.
Enter something into the first textfield, and do the "Ajax Save". Now a custom validation message appears.
Now for the first strangeness. Enter something in both the textfield and the textarea. The custom validation message appears on both inputs, but now the inputs just made are erased. When only one of these fields have data, the data entered in the other field is preserved, and I believe the clearing of input data is another error, but not the one in the title of this this issue.
To see the main issue, open the tree labeled "Sequences". This has a comments tree just like the one above nested inside the sequence node.
Click on the + next the "Comments" under "Sequences".
Click on "Ajax Save". Now instead of seeing the "Value is required" error, the inner tree node collapses. Click on the "Submit" button, an reopen the "Sequences" tree to see that the inner tree is in fact still intact.
Click on "Ajax Immediate". Now the tree does not collapse. The only difference is this button is immediate, so the validation steps are not done.
Finally, clicking on "Plain Save" shows the expected validation errors (now the Sequence tree collapses after the submit so it must be manually opened, but I guess this is expected behavior because the open / close state is not maintained across the request). The problem where the inputs that fail validation are erased remains even with this non-ajax update mode).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months
[JBoss JIRA] Created: (RF-5380) dropSupport: "disableDefault" attribute doesn't work.
by Mikhail Vitenkov (JIRA)
dropSupport: "disableDefault" attribute doesn't work.
-----------------------------------------------------
Key: RF-5380
URL: https://jira.jboss.org/jira/browse/RF-5380
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 dragSupport and dropSupport zones following way:
<h:panelGrid columns="1" id="panel1">
<h:panelGroup id="column1">
<a4j:outputPanel>
<rich:dragSupport dragType="dragType1"></rich:dragSupport>
<h:outputText value="Drag it 1" />
</a4j:outputPanel>
</h:panelGroup>
</h:panelGrid>
<h:panelGrid columns="1" id="panel3">
<h:panelGroup id="column3">
<a4j:outputPanel>
<rich:dropSupport acceptedTypes="dragType1"></rich:dropSupport>
<h:outputText value="Drop from 1" />
</a4j:outputPanel>
</h:panelGroup>
</h:panelGrid>
#2. For dropSupport set action="main", where "main" is action navigation to the main page, defined in faces-config.xml
#3. Set ondrop="window.open('http://www.jboss.org/','_blank','width=200,height=200');"
#4. Set disableDefault="true".
#5. Navigate to page and make drag'n'drop content from "panel1" panelGrid to "panel3" panelGrid.(acceptedTypes="dragType1")
Actual behavior:
www.jboss.org opens in new window, then "main" navigation action works.
Try to append by hands "return false;" to the ondrop handler's content and repeat Step #5 - works fine: www.jboss.org opens in new window, current page remains.
--
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, 7 months