myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hines <st...@teego.com>
Subject Re: [Trinidad] Trinidad components not rendering with Facelets
Date Mon, 05 May 2008 05:09:08 GMT
Problem solved, there was an old version of Trinidad in the classpath 
from another application. 

Steve Hines wrote:
> It's version 1.1.14.  I just noticed that the Trinidad tableLayout, 
> rowLayout, cellLayout components are rendering fine, it's the 
> inputText, commandButton, and selectOneRadio components that are not 
> rendering.  Here is a chunk of the generated HTML, notice the trinidad 
> generated comens.
>
> <!--Start: org.apache.myfaces.trinidad.TableLayout["j_id5"]--><table 
> class="Table2" cellpadding="5" cellspacing="0" border="0" width="75%" 
> summary=""><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id6"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id7"]-->
>                            <td align="right">
>
>                                                             
> <tr:inputText id="ifFirstName" label="First Name" value="" 
> required="true" styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id9"]-->
>                            <td align="left">                
>                                                             
> <tr:message for="ifFirstName" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id11"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id12"]-->
>                            <td align="right" width="60%">            
>                                                             
> <tr:inputText id="ifLastName" label="Last Name" value="" 
> required="true" styleClass="form"></tr:inputText>
>                            </td>
>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id14"]-->
>                            <td align="left">
>                                                             
> <tr:message for="ifLastName" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id16"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id17"]-->
>                            <td align="right" width="60%">            
>                                                             
> <tr:inputText id="ifAddress1" label="Address Line 1" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id19"]-->
>
>                            <td align="left">
>                                                             
> <tr:message for="ifAddress1" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id21"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id22"]-->
>                            <td align="right" width="60%">            
>                                                             
> <tr:inputText id="ifAddress2" label="Address Line 2" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id24"]-->
>                            <td align="left">
>
>                                                             
> <tr:message for="ifAddress2" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id26"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id27"]-->
>                            <td align="right" width="60%">            
>                                                             
> <tr:inputText id="ifCity" label="City" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id29"]-->
>                            <td align="left">
>                                                             
> <tr:message for="ifCity" styleClass="errortext"></tr:message>
>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id31"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id32"]-->
>                            <td align="right" width="60%">            
>                                                             
> <tr:inputText id="ifState" label="State" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id34"]-->
>                            <td align="left">
>                                                             
> <tr:message for="ifState" styleClass="errortext"></tr:message>
>                            </td>
>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id36"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id37"]-->
>                            <td align="right" width="60%"> 
>                                                             
> <tr:inputText id="ifPost" label="Postal Code" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id39"]-->
>                            <td align="left">
>                                                             
> <tr:message for="ifPost" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id41"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id42"]-->
>
>                            <td align="right" width="60%"> 
>                                                             
> <tr:inputText id="ifCountry" label="Country" value="" 
> styleClass="form"></tr:inputText>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id44"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id45"]-->
>                            <td align="right" width="60%"> 
>                                                             
> <tr:inputText id="ifEmail" label="E-mail" value="" required="true" 
> styleClass="form">
>                                                                   
> <tr:validateRegExp 
> pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$"

> messageDetailNoMatch="Invalid e-mail format"></tr:validateRegExp>
>                                                               
> </tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id47"]-->
>
>                            <td align="left">
>                                                             
> <tr:message for="ifEmail" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id49"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id50"]-->
>                            <td align="right" width="60%"> 
>                                                             
> <tr:inputText id="ifPhone" label="Telephone" value="" styleClass="form">
>                                                                   
> <tr:validateRegExp pattern="^((\+\d{1,3}(-| )?\(?\d\)?(-| 
> )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| 
> ext)\d{1,5}){0,1}$" messageDetailNoMatch="Phone must be: 
> NNN-NNN-NNNN"></tr:validateRegExp>
>                                                               
> </tr:inputText>
>                            </td>
>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id52"]-->
>                            <td align="left">
>                                                             
> <tr:message for="ifPhone" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id54"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id55"]-->
>                            <td align="right">
>                                                             
> <tr:inputText id="ifPass1" label="Password" required="true" 
> secret="true" styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id57"]-->
>
>                            <td align="left">
>                                                             
> <tr:message for="ifPass1" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id59"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id60"]-->
>                            <td align="right">
>                                                             
> <tr:inputText id="ifPass2" label="Validate Password" required="true" 
> secret="true" styleClass="form"></tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id62"]-->
>                            <td align="left">
>
>                                                             
> <tr:message for="ifPass2" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id64"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id65"]-->
>                            <td align="right">
>                                                             
> <tr:inputText id="ifHandicap" label="Current Handicap" styleClass="form">
>                                                                   
> <tr:validateRegExp pattern="^\d{1,2}\.*\d*$" 
> messageDetailNoMatch="Handicap value is invalid"></tr:validateRegExp>
>                                                               
> </tr:inputText>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id67"]-->
>
>                            <td align="left">
>                                                             
> <tr:message for="ifHandicap" styleClass="errortext"></tr:message>
>                            </td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id69"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id70"]-->
>                            <td align="right">
>                                                             
> <tr:panelGroupLayout>
>                                                                   
> <tr:selectOneRadio id="rbTips" label="Receive E-mail Tips" value="y">
>                                        
>                                  <tr:selectItem label="Yes" 
> value="y"></tr:selectItem>
>                                  
>                                        
>                                  <tr:selectItem label="No" 
> value="n"></tr:selectItem>
>
>                                                                     
> </tr:selectOneRadio>
>                                                               
> </tr:panelGroupLayout>
>                            </td>
>                            <!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id72"]-->
>                            <td align="left"></td>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id73"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id74"]-->
>                            <td align="center">
>                                                             
> <tr:commandButton id="cbReg" text="Register"></tr:commandButton>
>                            </td>
>
>                          </tr><!--Start: 
> org.apache.myfaces.trinidad.RowLayout["j_id76"]--><tr><!--Start: 
> org.apache.myfaces.trinidad.CellFormat["j_id77"]-->
>                            <td align="center">
>                                                             
> <tr:commandButton id="cbCancel" immediate="true" text=" Cancel 
> "></tr:commandButton>
>                            </td>
>                          </tr></table><input type="hidden" 
> name="org.apache.myfaces.trinidad.faces.FORM" 
> value="registration"><!--Start: 
> org.apache.myfaces.trinidad.Form--><span 
> id="tr_registration_Postscript"><input type="hidden" 
> name="javax.faces.ViewState" value="!-3c8f3e04"><script 
> type="text/javascript">function _registrationValidator(f,s){return 
> _validateInline(f,s);}var registration_SF={};</script></span><script 
> type="text/javascript">_submitFormCheck();</script></form>
>                                                     </td>
>                                               </tr>
>                        </table>
>
>
>
> Andrew Robinson wrote:
>> What facelets version are you using? Make sure it is 1.1.14 at least
>> to test with.
>>
>> On Sun, May 4, 2008 at 7:18 PM, Steve Hines <steve@teego.com> wrote:
>>  
>>> Hi Andrew,
>>>   The trinidad-impl-1.2.7.jar, trinidad-api-1.2.7.jar and 
>>> jsf-facelets.jar
>>> files are in the WEB-INF/lib directory of the war file.  As for the 
>>> JSF jars
>>> I don't think there are any duplicates, I know for sure they are 
>>> not  in my
>>> .ear or .war file.
>>>
>>>   Thanks for taking the time to reply.
>>>
>>>  Steve
>>>
>>>
>>>
>>>  Andrew Robinson wrote:
>>>
>>>    
>>>> Silly question, but have you ensured that trinidad-impl.jar is on the
>>>> classpath and that only one set of JSF jars (myfaces or mojarra/RI) is
>>>> on the classpath and no more?
>>>>
>>>> On Sun, May 4, 2008 at 4:40 PM, Steve Hines <steve@teego.com> wrote:
>>>>
>>>>
>>>>      
>>>>> I switched my application from using Tiles for templating to facelets
>>>>>         
>>> and
>>>    
>>>>> now the Trinidad components are not rendering (but the original 
>>>>> <tr: and
>>>>> trh: tags are showing the resulting HTML page source).  They were
>>>>>         
>>> rendering
>>>    
>>>>> fine with the Tiles configuration.  The standard JSF components 
>>>>> render
>>>>>         
>>> and
>>>    
>>>>> function with no problem.
>>>>>
>>>>>  I'm using Trinidad v1.2.7, facelets v1.1.14 on Glassfish v2
>>>>>
>>>>>  Attached is the XHTML page in which the Trinidad components do not
>>>>>         
>>> render.
>>>    
>>>>> Here is the web.xml setup for facelets:
>>>>>
>>>>>  <context-param>
>>>>>
>>>>>
>>>>>         
>>> <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>

>>>
>>>    
>>>>>      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>>>>>  </context-param>
>>>>>   <!-- Special Debug Output for Development -->
>>>>>  <context-param>
>>>>>      <param-name>facelets.DEVELOPMENT</param-name>
>>>>>      <param-value>true</param-value>
>>>>>  </context-param>
>>>>>  <context-param>
>>>>>      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>>>>>      <param-value>.xhtml</param-value>
>>>>>  </context-param>
>>>>>  <context-param>
>>>>>      <param-name>facelets.SKIP_COMMENTS</param-name>
>>>>>      <param-value>true</param-value>
>>>>>  </context-param>
>>>>>  <context-param>
>>>>>      <param-name>facelets.REFRESH_PERIOD</param-name>
>>>>>      <param-value>2</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>com.sun.faces.validateXml</param-name>
>>>>>      <param-value>true</param-value>
>>>>>  </context-param>
>>>>>  <context-param>
>>>>>      <param-name>com.sun.faces.verifyObjects</param-name>
>>>>>      <param-value>false</param-value>
>>>>>  </context-param>
>>>>>  <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>
>>>>>     <servlet>
>>>>>      <servlet-name>Faces Servlet</servlet-name>
>>>>>      <servlet-class>javax.faces.webapp.FacesServlet</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>
>>>>>  <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>
>>>>>
>>>>>  Any help would be appreciated!
>>>>>
>>>>>
>>>>>
>>>>>         

Mime
View raw message