incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sloan, Noah M" <Noah_Sl...@baylor.edu>
Subject RE: af:table - redirect and selection problems
Date Wed, 26 Jul 2006 18:45:36 GMT
Well, we found the solution, use af:commandLink instead of h:commandLink.  

The stack trace was:

java.lang.IllegalStateException
	org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:432)
	javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
	javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
	oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl$MonitorRedirectServletResponse.sendRedirect(AdfFacesFilterImpl.java:431)
	javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
	org.apache.myfaces.context.servlet.ServletExternalContextImpl.redirect(ServletExternalContextImpl.java:490)
	org.apache.myfaces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:131)
	oracle.adfinternal.view.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:29)
	org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
	javax.faces.component.UICommand.broadcast(UICommand.java:106)
	oracle.adf.view.faces.component.UIXCollection.broadcast(UIXCollection.java:94)
	oracle.adf.view.faces.component.UIXTable.broadcast(UIXTable.java:205)
	javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:95)
	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:169)
	org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:335)
	org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:108)
	oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
	oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
	oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
	oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
	org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
	org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
	org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:216)
	org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
	org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:195)
	org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)


-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com]
Sent: Tue 25-Jul-06 3:39 PM
To: adffaces-user@incubator.apache.org
Subject: Re: af:table - redirect and selection problems
 
Could you provide the whole stack trace?

BTW, a tiny tip:  instead of:

  <af:column>
    <f:facet name="header">
       <h:outputText value="..." />
    </f:facet>

just use:

  <af:column headerText="...">

-- Adam



On 7/25/06, Sloan, Noah M <Noah_Sloan@baylor.edu> wrote:
> Using Facelets (1.0.10) and MyFaces + Tomahawk 1.1.2.
> I have an af:table like the following:
>
> <af:table var="row" value="#{bean.list}">
>    <af:column sortProperty="username" sortable="true">
>      <f:facet name="header">
>         <h:outputText value="..." />
>      </f:facet>
>
>      <h:commandLink action="viewPerson" value="#{row.username}">
>        <af:setActionListener from="#{row}" to="#{result}" />
>      </h:commandLink>
>    </af:column>
> ...
>
> The table is paginated.  Whenever the username link is clicked, I get:
> java.lang.IllegalStateException
>         org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:432)
>         javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
>         javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:125)
> ...
>
> So, I removed the redirect for that action ti see what would happen.  I no longer get
an exception but instead, no matter which username is clicked, the last row of the currently
displayed page is selected.  e.g. if a page displayed the following:
> foo
> bar
> john
> No matter which one is clicked, john will be the one that is put into #{result}.
>
> I switched to an h:dataTable and both problems went away, but we need the pagination
af:table offers.
>
> So, what is it that I need to do differentely to use an af:table?
>
> Cheers,
> ns
>
> P.S. I would use a t:dataTable, but AFAIK the dataScoller still wont function while using
ADF.
>
>
>


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message