I am new to MyFaces Trinidad component library and I am trying to do some 
pretty simple stuff.  I am experiencing a problem with getting the 
tr:commandButton to actually invoke the managed bean's method.  My setup 
is as follows:

- Ubuntu Linux 64-bit
- Sun JDK 1.6.0_20
- Tomcat 6.0.29
- Apache MyFaces JSF Core 1.2.9
- Apache MyFaces Trinidad 1.2.13
- Facelets 1.1.15
- Development IDE = Eclipse Helios

For testing I have made reduced the eventHandler method called by the Search 
Button do nothing but System.out.println("..."), to confirm if it is being 
called.  It is not.  Any ideas on what I am missing (something 
obvious, I am sure)?

Here is the xhtml file with the unresponsive commandButton:
--------------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<tr:document xmlns="http://www.w3.org/1999/xhtml";
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;xmlns:h="http://java.sun.com/jsf/html";
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;xmlns:f="http://java.sun.com/jsf/core";
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;xmlns:ui="http://java.sun.com/jsf/facelets";
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;xmlns:tr="http://myfaces.apache.org/trinidad";
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;xmlns:trh="http://myfaces.apache.org/trinidad/html";>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
<trh:head title="Litens Automotive Group - Agile Drawing Search">&nbsp; 
&nbsp;&nbsp;&nbsp; <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8" />
&nbsp;&nbsp;&nbsp; <link href="css/stylesheet.css" rel="stylesheet" 
type="text/css" />
</trh:head>
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:form id="form1">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:panelGroupLayout id="top" 
layout="horizontal" styleClass="greyBox">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:panelGroupLayout 
id="left" layout="vertical" styleClass="subContainer">
&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:outputText value="Agile Drawing Search" 
inlineStyle="font-weight: bold; margin-bottom: 10px"/>
&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:spacer height="10"/>
&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:outputText value="Enter Part Number:"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:inputText id="searchString" 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 
contentStyle="width: 200px" 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 
maximumLength="20" 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 
value="#{DrawingFetcherBean.searchString}" /> 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:commandButton text="Search"
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp; id="searchButton" 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp; partialSubmit="true" 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp; actionListener="#{DrawingFetcherBean.loadDrawingResultsEventHandler}" />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tr:panelGroupLayout>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:panelGroupLayout 
id="right" layout="vertical">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<h:graphicImage url="/cad_logo.jpg" alt="Logo" style="margin-right: 10px"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tr:panelGroupLayout>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tr:panelGroupLayout>&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:spacer height="30"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:panelGroupLayout id="bottom" 
layout="vertical" class="greyBox" partialTriggers="searchButton">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:outputText 
value="Search Results:" inlineStyle="font-weight: bold; margin-bottom: 10px"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:table 
var="searchResults"
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
value="#{DrawingFetcherBean.drawingResults}"
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; columns="4" 
columnBandingInterval="1">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:column headerText="Part Number" width="120px">&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:outputText value="#{searchResults.partNumber}"/>
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tr:column>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:column headerText="Revision">
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <tr:outputText value="#{searchResults.revision}"/>
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tr:column>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:column headerText="Part Type" width="150px">
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:outputText 
value="#{searchResults.partType}"/>
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tr:column>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:column headerText="File Name" width="100px">
&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <tr:outputText 
value="#{searchResults.fileName}"/>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; </tr:column>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
<tr:column headerText="_____">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; <h:commandButton value="Get" action="Submit" />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
</tr:column>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tr:table>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tr:panelGroupLayout>
&nbsp;&nbsp;&nbsp; </tr:form>
</tr:document>

--------------------------------------------------------------------------------------------------

Here is the managed bean snippet:

public class DrawingFetcher implements Serializable
{
&nbsp;&nbsp;&nbsp; String searchString;
&nbsp;&nbsp;&nbsp; String fileName;
&nbsp;&nbsp;&nbsp; ...
&nbsp;&nbsp;&nbsp; ...
&nbsp;&nbsp;&nbsp; public void loadDrawingResultsEventHandler(ActionEvent event)
&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; System.out.println("Drawing Results 
loaded!");
&nbsp;&nbsp;&nbsp; }
}


Here is the web.xml:
--------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" version="2.5">
&nbsp; <display-name>Test_Trinidad</display-name>
&nbsp; <welcome-file-list>
&nbsp;&nbsp;&nbsp; <welcome-file>index.html</welcome-file>
&nbsp; </welcome-file-list>
&nbsp; <servlet>
&nbsp;&nbsp;&nbsp; <servlet-name>Faces Servlet</servlet-name>
&nbsp;&nbsp;&nbsp; 
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
&nbsp;&nbsp;&nbsp; <load-on-startup>1</load-on-startup>
&nbsp; </servlet>
&nbsp; <servlet-mapping>
&nbsp;&nbsp;&nbsp; <servlet-name>Faces Servlet</servlet-name>
&nbsp;&nbsp;&nbsp; <url-pattern>*.xhtml</url-pattern>
&nbsp; </servlet-mapping>
&nbsp; <!-- FaceletViewHandler configuration -->
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; 
<param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
&nbsp;&nbsp;&nbsp; 
<param-value>org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler</param-value>
&nbsp; </context-param>
&nbsp; <!-- Use documents saved as *.xhtml for Facelets -->
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
&nbsp;&nbsp;&nbsp; <param-value>.xhtml</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; 
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
&nbsp;&nbsp;&nbsp; <param-value>resources.application</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <description>State saving method: 'client' or 'server' 
(=default). See JSF Specification 2.5.2</description>
&nbsp;&nbsp;&nbsp; <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
&nbsp;&nbsp;&nbsp; <param-value>client</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <description>
&nbsp;&nbsp;&nbsp; This parameter tells MyFaces if javascript code should be 
allowed in
&nbsp;&nbsp;&nbsp; the rendered HTML output.
&nbsp;&nbsp;&nbsp; If javascript is allowed, command_link anchors will have 
javascript code
&nbsp;&nbsp;&nbsp; that submits the corresponding form.
&nbsp;&nbsp;&nbsp; If javascript is not allowed, the state saving info and 
nested parameters
&nbsp;&nbsp;&nbsp; will be added as url parameters.
&nbsp;&nbsp;&nbsp; Default is 'true'</description>
&nbsp;&nbsp;&nbsp; <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
&nbsp;&nbsp;&nbsp; <param-value>true</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <description>
&nbsp;&nbsp;&nbsp; If true, rendered HTML code will be formatted, so that it is 
'human-readable'
&nbsp;&nbsp;&nbsp; i.e. additional line separators and whitespace will be 
written, that do not
&nbsp;&nbsp;&nbsp; influence the HTML code.
&nbsp;&nbsp;&nbsp; Default is 'true'</description>
&nbsp;&nbsp;&nbsp; <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
&nbsp;&nbsp;&nbsp; <param-value>true</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
&nbsp;&nbsp;&nbsp; <param-value>false</param-value>
&nbsp; </context-param>
&nbsp; <context-param>
&nbsp;&nbsp;&nbsp; <description>
&nbsp;&nbsp;&nbsp; If true, a javascript function will be rendered that is able 
to restore the
&nbsp;&nbsp;&nbsp; former vertical scroll on every request. Convenient feature 
if you have pages
&nbsp;&nbsp;&nbsp; with long lists and you do not want the browser page to 
always jump to the top
&nbsp;&nbsp;&nbsp; if you trigger a link or button action that stays on the 
same page.
&nbsp;&nbsp;&nbsp; Default is 'false'
</description>
&nbsp;&nbsp;&nbsp; <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
&nbsp;&nbsp;&nbsp; <param-value>true</param-value>
&nbsp; </context-param>
&nbsp; <listener>
&nbsp;&nbsp;&nbsp; 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
&nbsp; </listener>
</web-app>

Here is the faces-config.xml:

--------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee";
&nbsp;xmlns:xi="http://www.w3.org/2001/XInclude";
&nbsp;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-facesconfig_1_2.xsd";>
&nbsp;<managed-bean>
&nbsp; <managed-bean-name>DrawingFetcherBean</managed-bean-name>
&nbsp; 
<managed-bean-class>com.litens.agile.cad.DrawingFetcher</managed-bean-class>
&nbsp; <managed-bean-scope>session</managed-bean-scope>
&nbsp;</managed-bean>
&nbsp;<application>
&nbsp; <!-- Use the Trinidad RenderKit -->
&nbsp; 
<default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
&nbsp;</application>
</faces-config>


************************** CONFIDENTIALITY NOTE **************************
This message contains information which may be privileged or confidential , or 
exempt from disclosure under applicable law.  If the reader of this message is 
not the intended recipient, or the employee or agent responsible for delivering 
the message to the intended recipient, you are hereby NOTIFIED that any 
dissemination, distribution, retention, archiving, or copying of this 
communication is strictly prohibited.  If you have received this e-mail in 
error, please notify us immediately by calling our office at (905) 856-0200 or 
by return e-mail to the Sender of this e-mail.  
************************** CONFIDENTIALITY NOTE **************************

Reply via email to