Hello people,

Thanks for your fix Konstantin !

For those (like me) who are using a layout/border, I've refactored your
code in a mixin that includes the workaround javascript in a mixin
suitable for inclusion in layouts. This is a global fix that works for
datefields in beanforms.

Here's my mixin code:

-----snip----------snip----------snip----------snip-----
public class DateFieldTzFix {
        // XXX ---- workaround for TAP5-225 (affects v5.0.15) ---

        @Inject
        private RenderSupport renderSupport;

        @Inject
        @Path("datefield-tzfix.js")
        private Asset script;

        @AfterRender
        void afterRender(MarkupWriter writer) {
                renderSupport.addScriptLink(script);
        }

}
-----snip----------snip----------snip----------snip-----

To use the mixin, simply put this in your layout component:

-----snip----------snip----------snip----------snip-----
public class Layout {

        [...]

        @SuppressWarnings("unused")
        @Mixin
        private DateFieldTzFix dateFieldTzFix;

        [...]

}
-----snip----------snip----------snip----------snip-----

I also advice people (like me, again...) in uncommon locales to add
their GMT specifications in the resultHandler function. My contribution
is :

        tzfix = tzfix.replace(/NCT/, 'GMT+1100');

-- 
  .~.
  /V\      Mikaël Cluseau <[EMAIL PROTECTED]>
 // \\
/(   )\    ISI.NC             +687 26.93.18
 ^`~'^


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to