• djDateTextBox value not updated with scope variable

    By Fernando Levi 1 decade ago

    I am using a djDateTextBox control bound to a scope variable like this:

     

    <xe:djDateTextBox id="djDateTextBox" value="#{viewScope.date}">
    
    <xp:eventHandler event="onchange" submit="true" refreshMode="complete"></xp:eventHandler>
    
    </xe:djDateTextBox>
    

    When I change the date using the helper, or typing into the input box, it works fine. But then I created a simple "Today" button that sets the scope variable, and the box shows the previous date unchanged. Peeking at the scope variable it shows the correct changed date. So the box does not refresh the scope variable data.

    I tried replacing this code with a simple input box, like:

     

    <xp:inputText id="inputDate" value="#{viewScope.date}">
    
    <xp:this.converter><xp:convertDateTime type="date" dateStyle="short"></xp:convertDateTime></xp:this.converter>
    
    <xp:dateTimeHelper></xp:dateTimeHelper>
    
    <xp:eventHandler event="onchange" submit="true" refreshMode="complete"></xp:eventHandler>
    
    </xp:inputText>
    

    and the problem disappears.

     
    
    • Can you please attach some sample code?

      By Philippe Riand 1 decade ago

      I mean the code that is not working.

      Thanks!

      • Here is an example db

        By Fernando Levi 1 decade ago