[JBoss JIRA] Created: (RF-976) rich:column width property throws pointless exceptions
by David Delbecq (JIRA)
rich:column width property throws pointless exceptions
------------------------------------------------------
Key: RF-976
URL: http://jira.jboss.com/jira/browse/RF-976
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.0
Reporter: David Delbecq
Using width in rich:column for scrollabledatatable can lead to exception if "width" is badly formulated:
<rich:scrollableDataTable value="...">
<rich:column sortExpression="#{item.level}" width="100" >
Leads to
1832387 [http-8080-Processor4] FATAL jsp.error - Jsp error occured
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1444)
at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$3.renderContent(ScrollableDataTableBaseRenderer.java:111)
at org.richfaces.renderkit.html.ExtendedColumnVisitor.visit(ExtendedColumnVisitor.java:31)
at org.richfaces.renderkit.html.ColumnWalker.iterateOverColumns(ColumnWalker.java:42)
at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderHeaders(ScrollableDataTableBaseRenderer.java:475)
at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:303)
at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:552)
at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(ScrollableDataTableBaseRenderer.java:731)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:688)
The faulty lines are:
110 String widthPx = (String)column.getAttributes().get("width");
111 int width = Integer.parseInt(widthPx.substring(0, widthPx.indexOf("px")));
The doc, while stating the width is expressed in pixels, does not state you have to add a "px" extension to your number. Either the doc must clarify this, either code should not assume px is present and in case can not convert to integer, throw an appriopriate Faces exception.
--
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
17 years, 2 months
[JBoss JIRA] Commented: (RF-572) ClassCastException when trying to access a JSF Portlet using RichFaces
by Thomas Heute (JIRA)
[ http://jira.jboss.com/jira/browse/RF-572?page=comments#action_12379073 ]
Thomas Heute commented on RF-572:
---------------------------------
MyFaces implementation has a unique FacesContextFactory for Portet and 'pure servlet' environemnt and check against the 2 to create the
correct FacesContext:
if (context instanceof ServletContext)
{
return new ServletFacesContextImpl((ServletContext)context,
(ServletRequest)request,
(ServletResponse)response);
}
if (context instanceof PortletContext)
{
return new ServletFacesContextImpl((PortletContext)context,
(PortletRequest)request,
(PortletResponse)response);
}
Sun RI has 2 FacesContextFactory, one used in a portlet environment, one used in a servlet environment both suppose that only portletContext (or only servletContext) will be used, while this is not the case with RichFaces's filter.
Both implementation are not perfect while the myFaces one is safer as long as no other context exist. In fact we should have 2 facesContextFactory but the portletContextFactory should delegate if needed.
As a conclusion on this particular problem it should work just fine with MyFaces but the jsfportletbridge.dev.java.net project should modify this behavior.
Alternatively we can probably create a RichFacesFacesPortletContextFactory and workaround this issue
> ClassCastException when trying to access a JSF Portlet using RichFaces
> ----------------------------------------------------------------------
>
> Key: RF-572
> URL: http://jira.jboss.com/jira/browse/RF-572
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.1.0
> Environment: RealFaces 3.1.0.SNAPSHOT (sourcecode retrieved and built manually from svn 08.08.2007 )
> JSF Portlet Bridge 1.2.1 from Sun
> JBoss Portal 2.6.1.GA
> JBoss AS 4.2.1.GA
> JDK 1.5.0_08
> Postgresql 8.x database
> Linux Kubuntu 6.10
> Reporter: Viggo Navarsete
> Assigned To: Alexander Smirnov
> Fix For: 3.2.0
>
> Attachments: AbstractExternalContext.java, ContextAttributesMap.java, ContextMap.java, EnumerationIterator.java, FacesContextImpl.java, portlet-jsfrichfacesdemo.war, PortletContextImpl.java, ServletContextImpl.java, SessionAttributesNames.java
>
>
> I have created a JSF portlet using the latest RichFaces source code from svn. I have added a <rich:panel> to my jsp page, deployed it to my jboss portal, created a portlet instance and added it to a page. When trying to access the page I get the following stacktrace:
> 08:37:37,523 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
> 08:37:39,853 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
> java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade
> at com.sun.faces.portlet.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:64)
> at org.ajax4jsf.resource.InternetResourceService.getFacesContext(InternetResourceService.java:317)
> at org.ajax4jsf.resource.InternetResourceService.getResourceContext(InternetResourceService.java:251)
> at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:162)
> at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
> at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:259)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
> at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:595)
> Please read the JBoss Forum reference for more information about configuration of my web.xml, portlet.xml and other "war-file-specific-things".
--
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
17 years, 2 months
[JBoss JIRA] Closed: (RF-919) Problems in a4j:support with oncomplete attribute
by Ilya Shaikovsky (JIRA)
[ http://jira.jboss.com/jira/browse/RF-919?page=all ]
Ilya Shaikovsky closed RF-919.
------------------------------
> Problems in a4j:support with oncomplete attribute
> -------------------------------------------------
>
> Key: RF-919
> URL: http://jira.jboss.com/jira/browse/RF-919
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.1.0
> Environment: Firefox Mozilla 2.0.0.6, IE 6
> Reporter: Alexander Belov
> Assigned To: Maksim Kaszynski
> Fix For: 3.2.0, 3.1.1
>
>
> I have use the following:
> <rich:menuItem icon="images/edit.gif" value="#{app.editDataLabel}" id="editItem" disabled="#{!simpleBean.canEdit}" submitMode="none">
> <a4j:support oncomplete="if(data){Richfaces.showModalPanel('#{simpleBean.modalPanelComponentClientId}');}"
> action="#{simpleBean.editData}"
> event="onclick"
> reRender="#{simpleBean.toolbarUpdate}"
> data="#{simpleBean.showPanel}"
> limitToList="true" id="editData"
> ignoreDupResponces="true"/>
> </rich:menuItem>
> And it worked good. I have upgraded RichFaces libraries to 3.1.0 release and have the following javascript error if log component:
> Error evaluate oncomplete function undefined
> Page pontent is updated, but modalPanel cannot be opened.
--
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
17 years, 2 months
[JBoss JIRA] Created: (RF-965) Calendar isn't work in ajax mode.
by Ilya Shaikovsky (JIRA)
Calendar isn't work in ajax mode.
---------------------------------
Key: RF-965
URL: http://jira.jboss.com/jira/browse/RF-965
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.0
Reporter: Ilya Shaikovsky
Assigned To: Alexej Kushunin
RF 3.1.0 GA
<h:form id="form">
<h:inputText value="" required="true"/>
<rich:messages/>
<rich:calendar popup="true" id="calendar" >
</rich:calendar>
<a4j:commandButton value="Empty Submit" data="#{bean.property}"></a4j:commandButton>
</h:form>
If I scroll the calendar - messages shown.
But calendar should works in AjaxSingle mode by default and works like this only with ajaxSingle="false" setted.
--
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
17 years, 2 months