Announcement Announcement Module
Collapse
No announcement yet.
undefined attributes date dateTimePattern Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • undefined attributes date dateTimePattern

    Hello,

    I have a problem with date attributes in list views. attributes date & dateTimePattern are undefined, if I create a new project with a simple entity and a date field, it's works but in my main project it fails.

    My Java class :
    Code:
    @Column(name = "LAST_CONNECTION")
        @Temporal(TemporalType.TIMESTAMP)
        @DateTimeFormat(style = "S-")
        private Date last_connection;
    list.jspx :
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" xmlns:table="urn:jsptagdir:/WEB-INF/tags/form/fields" version="2.0">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <jsp:output omit-xml-declaration="yes"/>
        <page:list id="pl_com_francetelecom_roo_karmaihm_domain_okarmafr_Device" items="${devices}" z="mgzYzlw+QCmmNi8mU60FEZbSa54=">
            <table:table data="${devices}" id="l_com_francetelecom_roo_karmaihm_domain_okarmafr_Device" path="/devices" typeIdFieldName="DEVICE_ID" z="p0iPhRg4LwVsJN3f+p4GSt5Tp8w=">
                <table:column id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_macAddress" property="macAddress" z="c4qfWOoADeFiBa124HzWflKH0MA="/>
                <table:column id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_serial_number" property="serial_number" z="afhdKLIZ0im8kYxDsyOJ5rQjix0="/>
                <table:column id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_FIRMWARE_ID" property="FIRMWARE_ID" z="o5sEPDowcGwr/2whIr4CSd1Fzl8="/>
                <table:column id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_HARDWARE_ID" property="HARDWARE_ID" z="0DfdmLLISQSoAWEjtJxGw/lsaL4="/>
                <table:column id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_CUSTOMER_ID" property="CUSTOMER_ID" z="1eZk/5Es3qKeWZadwsn6WTOhljA="/>
                
            <table:column date="true" dateTimePattern="${device_last_connection_date_format}" id="c_com_francetelecom_roo_karmaihm_domain_okarmafr_Device_last_connection" property="last_connection" z="Dhs5XDz333pK3YjlmZAVniutabE="/>
            </table:table>
        </page:list>
    </div>
    errors :
    Code:
    GRAVE: "Servlet.service()" pour la servlet jsp a lancé une exception
    org.apache.jasper.JasperException: /WEB-INF/views/devices/list.jspx(12,230) L'attribut dateTimePattern est incorrect pour le tag column d'après la TLD indiquée
    warnings :
    Code:
    Multiple annotations found at this line:
    	- Line breakpoint:list.jspx [line: 12]
    	- Undefined attribute name "date"
    	- Undefined attribute name 
    	 "dateTimePattern"

  • #2
    I see this problem as well with roo 1.1.4

    I recently updated from roo 1.1.0 to 1.1.4 and I now see this problem.

    Comment


    • #3
      I am having the same problem. The following attributes are missing in the column.tagx. A new project with date field will have the correct column.tagx

      <jsp:directive.attribute name="date" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate that this field is of type java.util.Date" />
      <jsp:directive.attribute name="calendar" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate that this field is of type java.util.Calendar" />
      <jsp:directive.attribute name="dateTimePattern" type="java.lang.String" required="false" rtexprvalue="true" description="The date / time pattern to use if the field is a date or calendar type" />

      Comment


      • #4
        Thanks!

        Thanks for pointing out the solution to work around this.

        Comment


        • #5
          Please raise a Jira request for this

          Comment


          • #6
            Looks like someone already did.

            Following your advice I went to create an issue, but I first searched to see if someone already had. It looks like this issue relates to this. It seems it was fixed with a new upgrade command, but roo could be a little more proactive in suggesting it when upgrading.

            https://jira.springsource.org/browse/ROO-2327

            Comment


            • #7
              As described in https://jira.springsource.org/browse/ROO-2327 with Roo 1.1.4 we are offering a command which takes care of tag upgrading. Also, if you look at section B.4. Upgrading to 1.1.3.RELEASE
              this is issue specifically mentioned there. Furthermore you will see the new command is documented in section A.20.7. web mvc update tags of our reference guide.

              Do you have any specific suggestions where we should announce this in addition to the three places named above?

              Comment


              • #8
                Sorry, I didn't read that. Roo has actually spoiled me. I think I had upgraded once before and it simply worked without issue. I simply downloaded and setup the new version and let roo upgrade auto-magically. When I created a new entity with the new version I was a little taken by surprised when the views didn't work.

                My only suggestion is that roo actually print a message to the console when the user upgrades a project to indicate further steps they may need to take.

                Thanks for the hard work, and sorry again for not RTFM.

                Comment


                • #9
                  Thank's a lot, it works when updating the column.tagx

                  Comment

                  Working...
                  X