myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Vieira" <marcoacvie...@gmail.com>
Subject Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked
Date Sat, 23 Aug 2008 23:12:53 GMT
No ideas? Please, I don't want to come off as being obnoxious but if anyone
one could help I would really appreciate it, any hint or tip.

Some extra information:

"medSearchUITable.dbResults" is an ArrayList that, according to the tag
documentation is converted to a collection model.

This is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>

<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
        <param-value>token</param-value>
    </context-param>
    <context-param>

<param-name>org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS</param-name>
        <param-value>15</param-value>
    </context-param>
    <context-param>

<param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>

<param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
        <param-value>false</param-value>
    </context-param>

<context-param><param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name><param-value>true</param-value></context-param>
    <context-param>

<param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>
    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
        </init-param>
        </filter>
    <filter>
        <filter-name>trinidad</filter-name>

<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.webui.jsf.util.UploadFilter</filter-class>
        <init-param>
            <param-name>maxSize</param-name>
            <param-value>1000000</param-value>
        </init-param>
        <init-param>
            <param-name>sizeThreshold</param-name>
            <param-value>4096</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>trinidad</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>

<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
            <param-name>errorHost</param-name>
            <param-value>localhost</param-value>
        </init-param>
        <init-param>
            <param-name>errorPort</param-name>
            <param-value>24444</param-value>
        </init-param>
    </servlet>
    <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>resources</servlet-name>

<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/Page1.jsp</welcome-file>
        <welcome-file>faces/welcomeJSF.jsp</welcome-file>
        </welcome-file-list>
    <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>

<exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jspf</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
        </jsp-config>
    </web-app>

Why isn't the page reloading itself? The PPR POST is sent and a response is
received, and ONLY when I manually reload the page do I see the changes. The
online Trinidad demo at Irian works and I downloaded this demo and deployed
it to my Tomcat and it works. I fear I'm missing something in my binding
objects. I've compared my web.xml file to that in the demo and do not notice
anything that, in my opinion, could be the source of the problem.

Any ideas?

Thanks in advance,

Marco

On Sat, Aug 23, 2008 at 12:00 AM, Marco Vieira <marcoacvieira@gmail.com>wrote:

> I've tried changing the page to *.jspx, hoping it was a JSP problem, but I
> continue the have the same problem. I receive a response to the PPR request,
> the page just does not reload. Could it be a web.xml misconfiguration?
>
> Has anyone faced this problem before?
>
>
> On Thu, Aug 21, 2008 at 10:23 PM, Marco Vieira <marcoacvieira@gmail.com>wrote:
>
>> Hello everyone,
>>
>> After finally getting skinning to work, I face another problem. I have a
>> table, that has a select-one column and a show-details column. However, when
>> I click on show/hide or show all or hide all nothing happens. Only after I
>> manually reload the page, or after a few clicks and a manual reload do I see
>> the requested changes in the table. With firebug, upon clicking the links, a
>> request is sent, I'm assuming this is the table's built-in PPR working, but
>> the table isn't refreshed automatically.
>>
>> I'm using Tomcat 6.0.16, Trinidad 1.2.8 and testing with Firefox 3.0.1,
>> although I see the same behavior in IE 7.
>>
>> This is my page:
>>
>> <%@page contentType="text/html" pageEncoding="UTF-8"%>
>> <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
>> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
>> <%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
>> <%@taglib prefix="trh" uri="http://myfaces.apache.org/trinidad/html"%>
>> <%@taglib prefix="tr" uri="http://myfaces.apache.org/trinidad"%>
>>
>> <f:view>
>> <tr:document title="Pesquisar por Medicamentos">
>>         <tr:form>
>>             <tr:table id="searchResults" summary="Resultados de Pesquisa"
>>                 allDetailsEnabled="true"
>>                 binding="#{medSearchUITable.medSearchTable}"
>>                 rendered="true"
>>                 rowSelection="single"
>>                 rowBandingInterval="1"
>>                 value="#{medSearchUITable.dbResults}"
>>                 var="row"
>>                 rows="20">
>>                 <f:facet name="actions">
>>                     <tr:outputText value="Resultados"/>
>>                 </f:facet>
>>                 <f:facet name="footer">
>>                     <tr:commandButton text="Seleccionar"
>> actionListener="#{medSearchUITable.selectMedication}"/>
>>                 </f:facet>
>>                 <tr:column>
>>                     <f:facet name="header">
>>                         <tr:outputText value="Nome"/>
>>                     </f:facet>
>>                     <tr:outputText value="#{row.medName}"/>
>>                 </tr:column>
>>                 <tr:column>
>>                     <f:facet name="header">
>>                         <tr:outputText value="DCI"/>
>>                     </f:facet>
>>                     <tr:outputText value="#{row.medDCIPT}"/>
>>                 </tr:column>
>>                 <tr:column>
>>                     <f:facet name="header">
>>                         <tr:outputText value="Forma"/>
>>                     </f:facet>
>>                     <tr:outputText value="#{row.medPharmForm}"/>
>>                 </tr:column>
>>                 <f:facet name="detailStamp">
>>               <tr:panelGroupLayout layout="vertical">
>>                 <tr:outputText value="Pre├žo: #{row.medPrice}"/>
>>                 <tr:outputText value="Tratamento: #{row.medTreatment}"/>
>>                 <tr:outputText value="Via Admin.: #{row.medAdminis}"/>
>>                 <tr:outputText value="Tipo Emb.: #{row.medPackType}"/>
>>               </tr:panelGroupLayout>
>>             </f:facet>
>>             </tr:table>
>>         </tr:form>
>>
>> </tr:document>
>>      </f:view>
>>
>>
>> Any ideas? Thanks in advance,
>>
>> Marco
>>
>
>

Mime
View raw message