Rafa Pérez wrote:
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jsp</param-value>
</context-param>
in order to make inputDate and popups work properly.
Thanks, that sorts out the popup.
Any ideas why the partialTriggers aren't working?
Shane
Regards,
- - Rafa
On Feb 7, 2008 10:04 PM, Shane Petroff <[EMAIL PROTECTED]
<mailto:[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