Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    XMLGregorianCalendar support in SmartClient widgets for date fields.

    During XML-Java serialisation, if generated Java types (from XSD types) have any date field of javax.xml.datatype.XMLGregorianCalendar,
    we noticed that after SmartClient construt JavaScript array from this data, the date format is coming as XML schema type.
    And also, JavaScript object is coming where we have to extract day, month, year, hour, min, sec to construct string/text representation of require display date.
    This is causing a code change in our UI layer which we don't prefer.

    However, when java.util.Calendar is used for date property in Java types, the date is coming as text/string in JavaScript object which is
    straightforward to display in UI without any further parsing logic.

    Any specific reason for this behaviour or whether SmartClient supports JS serialisation of javax.xml.datatype.XMLGregorianCalendar type.

    Java 8 JAXB is used to generate types from XSD types.
    SmartClient 12.1-p20211102

    #2
    This is fixed and will be available for download in nightly build since Mar 16 (today).

    Comment


      #3
      Thanks for the update. Could you provide details of fix? Now, can we use XMLGregorianCalendear and expect JavaScript Date just like java.util.Calendar? Also, please let me know release version for me to download and test for smartclient 12.

      Comment


        #4
        Yes, you can use XMLGregorianCalendar on the server-side and expect JavaScript Date on the client-side like with java.util.Calendar and other supported date types. To get this fix you need to download the 12.1 nightly build from March 16 or later.

        Comment

        Working...
        X