struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luís Filipe Geraldo Alves (Jira) <j...@apache.org>
Subject [jira] [Commented] (WW-4497) when we use <s:datetextfield id="doj" format="yyyy-MM-dd" name="journeyDate" ../> Struts has detected an unhandled exception: Messages: Template /template/xhtml/datetextfield.ftl not found. Template /template/xhtml/datetextfield.ftl not found.
Date Sat, 01 Aug 2020 20:39:00 GMT

    [ https://issues.apache.org/jira/browse/WW-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17169404#comment-17169404
] 

Luís Filipe Geraldo Alves commented on WW-4497:
-----------------------------------------------

This is happening on 2.5.22. FreemarkerThemeTemplateLoader is looking for the wrong FTL. Its
looking for "datetextfield.ftl" instead of "datetext.ftl".

And the tag <s:datetextfield> seems to work only with JavaTemplatePlugin, which does
not support XHTML theme, only SIMPLE theme. Maybe this tag should not appear in the default
struts-tags, since xhtml is the default theme. Or maybe the JavaTemplate Plugin should be integrated
in the core. It's only a suggestion.

Its confusing for Struts2 newbies to find that they need the JavaTemplate Plugin, which is
not on the struts-core, to use a tag that is on the struts-core, and not use the default theme
"xhtml" but "simple". By now i'll go with <s:textfield type="date">.

> when we use <s:datetextfield id="doj"  format="yyyy-MM-dd"    name="journeyDate" 
 ../>    Struts has detected an unhandled exception:  Messages:  Template /template/xhtml/datetextfield.ftl
not found. Template /template/xhtml/datetextfield.ftl not found. 
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-4497
>                 URL: https://issues.apache.org/jira/browse/WW-4497
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Plugin - Tags
>    Affects Versions: 2.3.20
>         Environment: windows7,tomcat8,eclipse(mars)
>            Reporter: dtr prasad
>            Priority: Major
>              Labels: finding, new, problem, s:datetextfield, template
>             Fix For: 2.3.24
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> jars used are antlr-2.7.2.jar
> asm-5.0.3.jar
> commons-beanutils-1.8.0.jar,
> commons-chain-1.2.jar
>  commons-collections-3.1.jar
>  commons-digester-2.0.jar
> commons-fileupload-1.3.1.jar
>  commons-io-2.2.jar
>  commons-lang-2.4.jar
>  commons-lang3-3.2.jar
> commons-logging-1.1.3.jar
> commons-validator-1.3.1.jar
> freemarker-2.3.19.jar
> javassist-3.11.0.GA.jar
> ognl-3.0.6.jar
> struts2-bootstrap-plugin-2.0.1.jar
> struts2-core-2.3.20.jar
>  struts2-jquery-plugin-3.7.1.jar
>  xwork-core-2.3.20.jar
> bkTrip.jsp is
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
> <html>
>  <head>
>    <sj:head jqueryui="true"/>
>    
>    <title>Strut2's actions</title>
>  </head>
>  <body>
>  <div align="center" >
>       <h2>Strut2's actions</h2>
>       <br/>
>  
>     <s:form action="bookTrip"   cssStyle="height:240px;"  label="Form For Booking
Trip">
>     
>      <s:actionerror/>
>      
>      <s:textfield name="name"  label="Enter Name"  />
>       <s:datetextfield id="doj" format="yyyy-MM-dd" 
>         name="journeyDate"
>         label="Date Of Travel"
>         tooltip="Choose Date-of-Travel"
>        />
>       
>     <s:url id="places_url" action="places" />
>     <sj:autocompleter  id="place" name="place"
>          tooltip="Choose A Place" 
>          list="%{places}" 
>          label="Enter Place to Travel"
>          loadMinimumCount="1"
>     />    
>    
>    <s:textfield name="numOfMembers"  label="How Many tickets you want"/>
>   
>    <s:submit   value="Book Trip"/>
>   </s:form>
>  </div>
>  </body>
> </html>
>  
> when we open struts-core.jar there is no spectic template for this



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message