Announcement Announcement Module
Collapse
No announcement yet.
dijit.form.TimeTextBox is working fine in create mode but not in edit mode Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dijit.form.TimeTextBox is working fine in create mode but not in edit mode

    Hi ,

    I have created an entity where I want to use time picker for a field 'hearingTime' which is declared as String ,for this I used dijit.form.TimeTextBox in a custom tag named 'time.tagx'. It is working properly in create mode but when it is opened in edit mode then value is shown in textfield but when I click inside the textfield then time picker selection is not shown.Attachment Attachment

    Entity code code:

    public class CourtCaseHearing {

    @NotNull
    @ManyToOne
    private CourtCase courtCase;

    private String hearingTime;

    @Size(max=4000)
    private String remark;

    .
    .
    .
    }

    create .jspx


    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:form="urn:jsptagdir:/WEB-INF/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" version="2.0">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <jsp:output omit-xml-declaration="yes"/>

    <form:create id="fc_com_domain_CourtCaseHearing" modelAttribute="courtCaseHearing" path="/courtcasehearings" render="${empty dependencies}" z="ooxITuRgp1XN+DWEYKKyUYaioHo=">


    <field:time field="hearingTime" min="T08:00:00" max="T19:00:00" id="c_com_domain_CourtCaseHearing_hearingTime" z="6dPvBKIBFXEfKNuLXxsPmDMxqXE="/>

    </form:create>
    <form:dependency dependencies="${dependencies}" id="d_com_CourtCaseHearing" render="${not empty dependencies}" z="/wnoNHvyvOm4L5OV/b+4tt6Y22o="/>

    </div>



    update .jspx

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <div xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:form="urn:jsptagdir:/WEB-INF/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:spring="http://www.springframework.org/tags" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" version="2.0">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <jsp:output omit-xml-declaration="yes"/>

    <form:update id="fu_com_business_domain_CourtCaseHearing" modelAttribute="courtCaseHearing" path="/courtcasehearings" versionField="Version" z="6UAQn27UW5ZDPLcSyxFEOCMusUQ=">



    <field:time field="hearingTime" min="T08:00:00" max="T19:00:00" id="c_com_domain_CourtCaseHearing_hearingTime" z="6dPvBKIBFXEfKNuLXxsPmDMxqXE="/>



    </form:update>

    </div>


    time.tagx : Inside time.tagx I have written following code for time picker .Complete tagx file is attached with this mail.

    <script type="text/javascript">dojo.require('dijit.form.TimeTextBox') ;</script>
    <script type="text/javascript">

    Spring.addDecoration(new Spring.ElementDecoration({
    elementId : '_${field}_id',
    widgetType : 'dijit.form.TimeTextBox',
    widgetAttrs : {constraints:{timePattern:"HH:mm:ss",min:'${min}', max:'${max}',clickableIncrement:"T00:15:00", visibleIncrement:"T00:15:00", visibleRange:"T02:00:00"}}
    }));
    </script>
    Attached Files
    Last edited by anubhavtripathi; Sep 26th, 2011, 06:40 AM.
Working...
X