Matthias Wessendorf wrote:
On Feb 8, 2008 6:03 AM, Shane Petroff <[EMAIL PROTECTED]> wrote:
 Any ideas why the partialTriggers aren't working?

are you using <tr:document> OR <trh:html/head/body> tags ?
They ensure all required CSS (Skinning) and JS files are sent down to the
client.

I'd go with <document>, like

The code I attached earlier did not use tr:document, however I should have noted that this was intentional. My original version did use the tr:document, but the newly applied css didn't play nicely with the existing styles, so I went back to the original. Using the Trinidad document didn't affect the PPR behaviour though, I still had the autoSubmit call working, but no refresh on the field specified in partialTriggers. I hadn't really considered what else might be dependent on the tr:document though, should I always use them (and modify my styles to work with them)?

Shane

<f:view> //only in JSP(X) required
<tr:document title="Blah">

all my content goes here

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

-M

 Shane



Regards,

 - - Rafa


On Feb 7, 2008 10:04 PM, Shane Petroff <[EMAIL PROTECTED]> wrote:

Hi,

My first experiment with Trinidad hasn't gone too well. I wanted to test
out a very simple ppr case, but cannot get it to work. I want to 'tie'
two controls together via value change. I've pasted the entire page
below my sig (or rather a functional, but simpler version of the real
thing), but the 2 fields in question are:

   <h:dataTable ...

     <h:column>
       <f:facet name="header">
           <h:outputText value="#{bundle.ClassListFinalMarkHeader}"
styleClass="label"/>
       </f:facet>
       <tr:inputText id="finalMarkField"
                     columns="5"
                     value="#{studentSec.finalMark}"
                     autoSubmit="true"

valueChangeListener="#{classListBean.finalMarkChanged}"/>
     </h:column>

     <h:column>
       <f:facet name="header">
           <h:outputText
value="#{bundle.ClassListWithdrawalDateHeader}" styleClass="label"/>
       </f:facet>
       <tr:inputDate id="withdrawalDate"
                     columns="11"
                     partialTriggers="finalMarkField"
                     value="#{studentSec.withdrawalDate}"
                     required="false" >
       </tr:inputDate>
       <h:message for="withdrawalDate"/>
     </h:column>

and in the backing bean

   public void finalMarkChanged( ValueChangeEvent event )
   {
       StudentSection ss = (StudentSection) m_Table.getRowData();
       ss.setWithdrawalDate(new Date());
       System.out.println( "finalMarkChanged for " +
ss.getStudentName() + " " + ss.getWithdrawalDate() );
   }

The autoSubmit is working, i.e. I can see that the value change event is
processed, but the partialTriggers portion has no effect and the
"withdrawalDate" field is never updated.

Also, the date picker is non-functional. The first time one attempts to
use it, the pop-up opens with the error below, and subsequent attempts
to open the pop-up are simply ignored.

HTTP Status 404 - /reportCard/__ADFv__.jsp
type Status report
message /reportCard/__ADFv__.jsp
description The requested resource (/reportCard/__ADFv__.jsp) is not
available.

Another annoyance is that default buttons no longer function throughout
the app.

--
Shane


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t" %>
<%@ taglib uri="http://myfaces.apache.org/trinidad"; prefix="tr" %>

<f:loadBundle basename="ui" var="bundle"/>
<f:loadBundle basename="config" var="configBundle"/>

<f:view>
<html>
 <head>
   <jsp:include page="boilerPlate.jsp"/>
   <title> <h:outputText value="#{bundle.ClassListHeader}"/> </title>
 </head>

<body class="page-background">


<h:form>

 <h:panelGrid headerClass="page-header" styleClass="panel"
              columns="1" cellpadding="5">

   <h:messages showDetail="true" showSummary="false" styleClass="errors"/>

   <h:dataTable styleClass="dataTable"
                rowClasses="list-row-even,list-row-odd" cellpadding="4"
border="0"
                headerClass="list-header"
                cellspacing="0"
                value="#{classListBean.studentSections}"
                var="studentSec"
                binding="#{classListBean.table}">

     <h:column>
       <f:facet name="header">
         <h:commandLink styleClass="table-header" id="studentDesc"
                        actionListener="#{classListBean.sort}">
           <h:outputText value="#{bundle.StudentColHeader}"/>
         </h:commandLink>
       </f:facet>
       <h:outputText value="#{studentSec.studentName}"/>
     </h:column>

     <h:column>
       <f:facet name="header">
         <h:commandLink styleClass="table-header" id="studentId"
                        actionListener="#{classListBean.sort}">
           <h:outputText value="#{bundle.StudentIdColHeader}"/>
         </h:commandLink>
       </f:facet>
       <h:outputText value="#{studentSec.studentId}"/>
     </h:column>

     <h:column>
       <f:facet name="header">
           <h:outputText value="#{bundle.ClassListFinalMarkHeader}"
styleClass="label"/>
       </f:facet>
       <tr:inputText id="finalMarkField"
                     columns="5"
                     value="#{studentSec.finalMark}"
                     autoSubmit="true"

valueChangeListener="#{classListBean.finalMarkChanged}"/>
     </h:column>

     <h:column>
       <f:facet name="header">
           <h:outputText value="#{bundle.ClassListWithdrawalDateHeader}"
styleClass="label"/>
       </f:facet>
       <tr:inputDate id="withdrawalDate"
                     columns="11"
                     partialTriggers="finalMarkField"
                     value="#{studentSec.withdrawalDate}"
                     required="false" >
       </tr:inputDate>
       <h:message for="withdrawalDate"/>
     </h:column>

   </h:dataTable>

 </h:panelGrid>

</h:form>
</body>
</html>
</f:view>



 --
Shane






--
Shane

Reply via email to