You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Marco Vieira <ma...@gmail.com> on 2008/08/21 23:23:49 UTC

[Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

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

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
Just a quick correction, the page source is actually the following:

<?xml version="1.0" encoding="iso-8859-1"?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
            xmlns:f="http://java.sun.com/jsf/core" xmlns:h="
http://java.sun.com/jsf/html"
            xmlns:t="http://myfaces.apache.org/tomahawk"
            xmlns:trh="http://myfaces.apache.org/trinidad/html"
            xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="Pesquisar por Medicamentos">
        <tr:form>
          <tr:panelGroupLayout layout="vertical">
              <tr:statusIndicator>
                  <f:facet name="busy">
                    <tr:outputText value="Loading, please wait..."/>
                  </f:facet>
               </tr:statusIndicator>
            <tr:table id="searchResults" summary="Resultados de Pesquisa"
                emptyText="Não existem resultados"
                binding="#{medSearchUITable.medSearchTable}"
                allDetailsEnabled="true"
                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:singleStepButtonBar selectedStep="1" maxStep="5"
previousAction="#"
                          nextAction="settime"/>

          </tr:panelGroupLayout>
        </tr:form>

</tr:document>
     </f:view>
     </jsp:root>

problem persists...any ideas?

On Mon, Aug 25, 2008 at 11:47 PM, Marco Vieira <ma...@gmail.com>wrote:

> Just to add, my logs do not show any warnings or errors. From my knowledge,
> the only information registered when the show link is clicked is the
> following:
>
>  DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
> - PI found at line 1
>  DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
> - PI found at line 2
>  DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
> - Marked section found at line 3. Surroundings: 'CDATA[<div
> id="searchResults">'.
>  DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
> - Marked section found at line 210. Surroundings: 'CDATA[<span
> id="tr_j_id_jsp_21'.
>
> Again, this is my page:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
>
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
>             xmlns:f="http://java.sun.com/jsf/core" xmlns:h="
> http://java.sun.com/jsf/html"
>             xmlns:t="http://myfaces.apache.org/tomahawk"
>             xmlns:trh="http://myfaces.apache.org/trinidad/html"
>             xmlns:tr="http://myfaces.apache.org/trinidad">
> <jsp:directive.page contentType="text/html;charset=utf-8"/>
> <f:view>
> <tr:document title="Pesquisar por Medicamentos">
>         <tr:form>
>           <tr:panelGroupLayout layout="vertical">
>               <tr:statusIndicator>
>                   <f:facet name="busy">
>                     <tr:outputText value="Loading, please wait..."/>
>                   </f:facet>
>                </tr:statusIndicator>
>             <tr:table id="searchResults" summary="Resultados de Pesquisa"
>                 emptyText="Não existem resultados"
>                 allDetailsEnabled="true"
>                 rendered="true"
>
>                 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:singleStepButtonBar selectedStep="1" maxStep="5"
> previousAction="#"
>                           nextAction="settime"/>
>
>           </tr:panelGroupLayout>
>         </tr:form>
>
>           </tr:document>
>      </f:view>
>      </jsp:root>
>
> ...and 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>javax.faces.STATE_SAVING_METHOD</param-name>
>         <param-value>client</param-value>
>         <!--param-value>server</param-value-->
>     </context-param>
>
>     <context-param>
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>         <param-value>.jspx</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.CHECK_FILE_MODIFICATION</param-name>
>         <param-value>false</param-value>
>     </context-param>
>     <!-- <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>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
>         <param-value>session</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
>         <param-value>false</param-value>
>     </context-param>
>     <context-param>
>
> <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <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>resources</servlet-name>
>
> <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
>     </servlet>
>
>     <filter>
>         <filter-name>trinidad</filter-name>
>
> <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
>     </filter>
>
>     <filter-mapping>
>         <filter-name>trinidad</filter-name>
>         <servlet-name>Faces Servlet</servlet-name>
>     </filter-mapping>
>
>
>
>
>
>     <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>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>UploadFilter</filter-name>
>         <servlet-name>Faces Servlet</servlet-name>
>     </filter-mapping> -->
>     <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>     </listener>
>
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>/faces/*</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>resources</servlet-name>
>         <url-pattern>/adf/*</url-pattern>
>     </servlet-mapping>
>
>     <welcome-file-list>
>         <welcome-file>faces/welcomeJSF.jsp</welcome-file>
>         </welcome-file-list>
>     </web-app>
>
> Thanks in advance,
>
> Marco
>
>
> On Mon, Aug 25, 2008 at 5:03 PM, Marco Vieira <ma...@gmail.com>wrote:
>
>> Well, I redid and double checked my web.xml file with the one provided by
>> the trinidad demo and they are pretty much the same. I also updated my
>> project to use Trinidad 1.2.9. Yet the problem remains...the table does
>> not auto-reload when I click on the "show details" link. I have to wait a
>> bit then manually reload the page to see the "details".
>>
>> I even implemented the first table on the Trinidad demo (
>> http://www.irian.at/trinidad-demo/faces/components/table.jspx), that is I
>> copied the webpage and necessary source files and the table from the demo
>> stops working.
>>
>> This is becoming quite frustrating...does anyone have an ideia as to why
>> the table does not reload.
>>
>> Thanks,
>>
>> Marco
>>
>>
>> On Sun, Aug 24, 2008 at 12:12 AM, Marco Vieira <ma...@gmail.com>wrote:
>>
>>> 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 <ma...@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
>>>>>
>>>>
>>>>
>>>
>>
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
Just to add, my logs do not show any warnings or errors. From my knowledge,
the only information registered when the show link is clicked is the
following:

 DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- PI found at line 1
 DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- PI found at line 2
 DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- Marked section found at line 3. Surroundings: 'CDATA[<div
id="searchResults">'.
 DEBUG http-8085-2 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- Marked section found at line 210. Surroundings: 'CDATA[<span
id="tr_j_id_jsp_21'.

Again, this is my page:

<?xml version="1.0" encoding="iso-8859-1"?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
            xmlns:f="http://java.sun.com/jsf/core" xmlns:h="
http://java.sun.com/jsf/html"
            xmlns:t="http://myfaces.apache.org/tomahawk"
            xmlns:trh="http://myfaces.apache.org/trinidad/html"
            xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="Pesquisar por Medicamentos">
        <tr:form>
          <tr:panelGroupLayout layout="vertical">
              <tr:statusIndicator>
                  <f:facet name="busy">
                    <tr:outputText value="Loading, please wait..."/>
                  </f:facet>
               </tr:statusIndicator>
            <tr:table id="searchResults" summary="Resultados de Pesquisa"
                emptyText="Não existem resultados"
                allDetailsEnabled="true"
                rendered="true"
                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:singleStepButtonBar selectedStep="1" maxStep="5"
previousAction="#"
                          nextAction="settime"/>

          </tr:panelGroupLayout>
        </tr:form>

          </tr:document>
     </f:view>
     </jsp:root>

...and 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>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
        <!--param-value>server</param-value-->
    </context-param>

    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jspx</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.CHECK_FILE_MODIFICATION</param-name>
        <param-value>false</param-value>
    </context-param>
    <!-- <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>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
        <param-value>session</param-value>
    </context-param>

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

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

    <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>resources</servlet-name>

<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
    </servlet>

    <filter>
        <filter-name>trinidad</filter-name>

<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>trinidad</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>





    <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>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>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping> -->
    <listener>

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

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>faces/welcomeJSF.jsp</welcome-file>
        </welcome-file-list>
    </web-app>

Thanks in advance,

Marco

On Mon, Aug 25, 2008 at 5:03 PM, Marco Vieira <ma...@gmail.com>wrote:

> Well, I redid and double checked my web.xml file with the one provided by
> the trinidad demo and they are pretty much the same. I also updated my
> project to use Trinidad 1.2.9. Yet the problem remains...the table does
> not auto-reload when I click on the "show details" link. I have to wait a
> bit then manually reload the page to see the "details".
>
> I even implemented the first table on the Trinidad demo (
> http://www.irian.at/trinidad-demo/faces/components/table.jspx), that is I
> copied the webpage and necessary source files and the table from the demo
> stops working.
>
> This is becoming quite frustrating...does anyone have an ideia as to why
> the table does not reload.
>
> Thanks,
>
> Marco
>
>
> On Sun, Aug 24, 2008 at 12:12 AM, Marco Vieira <ma...@gmail.com>wrote:
>
>> 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 <ma...@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 <ma...@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
>>>>
>>>
>>>
>>
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
Well, I redid and double checked my web.xml file with the one provided by
the trinidad demo and they are pretty much the same. I also updated my
project to use Trinidad 1.2.9. Yet the problem remains...the table does not
auto-reload when I click on the "show details" link. I have to wait a bit
then manually reload the page to see the "details".

I even implemented the first table on the Trinidad demo (
http://www.irian.at/trinidad-demo/faces/components/table.jspx), that is I
copied the webpage and necessary source files and the table from the demo
stops working.

This is becoming quite frustrating...does anyone have an ideia as to why the
table does not reload.

Thanks,

Marco

On Sun, Aug 24, 2008 at 12:12 AM, Marco Vieira <ma...@gmail.com>wrote:

> 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 <ma...@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 <ma...@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
>>>
>>
>>
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
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 <ma...@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 <ma...@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
>>
>
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
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 <ma...@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
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Marco Vieira <ma...@gmail.com>.
I removed the status indicator tag, removed some extra loggings I had. The
following is a excerpt of debug info when I click the "show" button and then
reload the page manually:

 DEBUG http-8085-7 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- PI found at line 1
 DEBUG http-8085-7 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- PI found at line 2
 DEBUG http-8085-7 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- Marked section found at line 3. Surroundings: 'CDATA[<div
id="searchResults">'.
 DEBUG http-8085-7 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- Marked section found at line 252. Surroundings: 'CDATA[<span
id="tr_j_id_jsp_21'.
 DEBUG http-8085-7 org.apache.myfaces.lifecycle.LifecycleImpl - exiting from
lifecycle.execute in RESTORE_VIEW(1) because getRenderResponse is true from
one of the after listeners
 DEBUG http-8085-7 org.apache.myfaces.renderkit.html.util.ReducedHTMLParser
- DOCTYPE found at line 1

Justinas, with regards to what you said. How can I verify the return value
of the show/hide jsf navigation function?

Thank you,

Marco

On Sun, Aug 24, 2008 at 8:35 AM, Justinas <ta...@gmail.com> wrote:

> Marco Vieira 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
>>
> hi,
> there could be problem with show/hide jsf navigation function: if it
> returns null, the page isn't rerendered.
>
> Justinas
>

Re: [Trinidad] Table does not auto-refresh (PPR) when "show details" is clicked

Posted by Justinas <ta...@gmail.com>.
Marco Vieira 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
hi,
there could be problem with show/hide jsf navigation function: if it 
returns null, the page isn't rerendered.

Justinas