Re: Log feedback messages

2019-10-28 Thread Martin Grigorov
Hi,

On Mon, Oct 28, 2019 at 7:33 PM Entropy  wrote:

> As part of a larger effort to improve our audit logs, I have been requested
> to add the feedback messages that appear as part of validation to those
> audits.  So in the onError() of a button or form, where the validation has
> failed, I need to gather (non-destructively) the feedback messages that
> will
> soon be displayed.
>
> How can I get this list?  getPage().getFeedbackMessages() returns empty
> because, I presume, the errors are on lower level controls.  Is there an
> API
> that gathers the messages for me?
>

Yes, see FeedbackCollector class.


>
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
@Calin, you can use (new Date().getTimezoneOffset() / -60);
Then you can use code like this
http://examples8x.wicket.apache.org/ajaxhellobrowser/wicket/bookmarkable/org.apache.wicket.examples.source.SourcesPage;jsessionid=01612235C0920A71B39B2D8CA0FA641A?0&SourcesPage_class=org.apache.wicket.examples.ajaxhellobrowser.AjaxHelloBrowser&source=AjaxHelloBrowser.java

to get this value on the server side

@Martin Actually the code works, BUT
1) for me it shows timezone as "GMT+07:00" instead of Asia/Novosibirsk
And there are a lot of time zones with same offset 
2) there are a lot of magic in the current code (for ex.
southern hemisphere time zone calculation
https://issues.apache.org/jira/browse/WICKET-6689)
3*) I guess this calculation can stop working in a year time zone rules are
changed

I believe this might be improvement to wicket code base to let browser do
the real time zone calculation :)

On Tue, 29 Oct 2019 at 00:21, Calin Pavel  wrote:

> Current code is working ok. There is no problem with it.
> But it gives you the UtcOffset at 1.Jan.2019 and UtcDstOffset at
> 1.June.2019.
>
> But I do not know how to determine what is the CURRENT timezone offset
> (for Date.NOW)
>
> On 10/28/2019 6:24 PM, Martin Grigorov wrote:
> > Hi,
> >
> > I didn't get what is the problem with the current code.
> > For me http://examples8x.wicket.apache.org/ajaxhellobrowser/ shows
> > utcDSTOffset=3
> > utcOffset=2
> > which seems to be correct.
> >
> > On Mon, Oct 28, 2019 at 5:56 PM Maxim Solodovnik 
> > wrote:
> >
> >> On the other hand: the old code can be used if TZ is not available
> >> I'll do some tests and will create PR
> >>
> >> On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik 
> >> wrote:
> >>
> >>> @devs are we supporting IE11 for wicket9? if not we can add this call
> to
> >>> standard ClientProperties ...
> >>> WDYT?
> >>>
> >>> On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik 
> >>> wrote:
> >>>
>  Hello,
> 
>  according to stackoverflow [1]
>  you can use Intl.DateTimeFormat().resolvedOptions().timeZone
>  ClientProperties can be extended to get this info on server
> 
>  [1]
> 
> >>
> https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser
>  On Mon, 28 Oct 2019 at 22:26, Calin Pavel 
> wrote:
> 
> > I'm trying to detect what is the current timezone offset for a client
> > browser accessing my Wicket application.
> > I found out that BrowserInfoForm.ClientPropertiesBean contains
> details
> > about:
> > - utcOffset
> > - utcDstOffset
> > but these are calculated at 1.Jan and 1.June.
> >
> > Is there any way to determine on server side what is the CURRENT
> >> timezone
> > offset of the client?
> > I've tried to use ClientPropertiesBean.timeZone, but that is
> relative /
> > guest and not real client timezone.
> >
> >
> > --
> >
> > Kind Regards,
> >
> >
> > *CALIN PAVELSoftware Engineer - consultant*
> > calin.pa...@tvh.com
> >
> > *TVH PARTS HOLDING NV*
> > Vichtseweg 129 • BE-8790 WAREGEM
> > T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com
> >
> > 
> >
> > --
> >
> >
> >  DISCLAIMER
> > 
> 
> >
> > This
> > message is delivered to all addressees subject to the conditions set
> > forth
> > in the attached disclaimer, which is an integral part of this
> message.
> >
> >
> > When you communicate with us via e-mail, telephone, fax or via our
> > website,
> > we process your personal data. For more information on how we process
> > your
> > personal data, please consult our Privacy Policy
> > . By communicating with us, you
> > unambiguously consent to our use of your personal data as explained
> in
> > the
> > Privacy Policy.
> >
> 
>  --
>  WBR
>  Maxim aka solomax
> 
> >>>
> >>> --
> >>> WBR
> >>> Maxim aka solomax
> >>>
> >>
> >> --
> >> WBR
> >> Maxim aka solomax
> >>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
WBR
Maxim aka solomax


Log feedback messages

2019-10-28 Thread Entropy
As part of a larger effort to improve our audit logs, I have been requested
to add the feedback messages that appear as part of validation to those
audits.  So in the onError() of a button or form, where the validation has
failed, I need to gather (non-destructively) the feedback messages that will
soon be displayed.  

How can I get this list?  getPage().getFeedbackMessages() returns empty
because, I presume, the errors are on lower level controls.  Is there an API
that gathers the messages for me?

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Client browser timezone offset

2019-10-28 Thread Calin Pavel

Current code is working ok. There is no problem with it.
But it gives you the UtcOffset at 1.Jan.2019 and UtcDstOffset at 
1.June.2019.


But I do not know how to determine what is the CURRENT timezone offset 
(for Date.NOW)


On 10/28/2019 6:24 PM, Martin Grigorov wrote:

Hi,

I didn't get what is the problem with the current code.
For me http://examples8x.wicket.apache.org/ajaxhellobrowser/ shows
utcDSTOffset=3
utcOffset=2
which seems to be correct.

On Mon, Oct 28, 2019 at 5:56 PM Maxim Solodovnik 
wrote:


On the other hand: the old code can be used if TZ is not available
I'll do some tests and will create PR

On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik 
wrote:


@devs are we supporting IE11 for wicket9? if not we can add this call to
standard ClientProperties ...
WDYT?

On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik 
wrote:


Hello,

according to stackoverflow [1]
you can use Intl.DateTimeFormat().resolvedOptions().timeZone
ClientProperties can be extended to get this info on server

[1]


https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser

On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:


I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT

timezone

offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


--

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com



--


 DISCLAIMER
 

This
message is delivered to all addressees subject to the conditions set
forth
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our
website,
we process your personal data. For more information on how we process
your
personal data, please consult our Privacy Policy
. By communicating with us, you
unambiguously consent to our use of your personal data as explained in
the
Privacy Policy.



--
WBR
Maxim aka solomax



--
WBR
Maxim aka solomax



--
WBR
Maxim aka solomax




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Client browser timezone offset

2019-10-28 Thread Martin Grigorov
Hi,

I didn't get what is the problem with the current code.
For me http://examples8x.wicket.apache.org/ajaxhellobrowser/ shows
utcDSTOffset=3
utcOffset=2
which seems to be correct.

On Mon, Oct 28, 2019 at 5:56 PM Maxim Solodovnik 
wrote:

> On the other hand: the old code can be used if TZ is not available
> I'll do some tests and will create PR
>
> On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik 
> wrote:
>
> > @devs are we supporting IE11 for wicket9? if not we can add this call to
> > standard ClientProperties ...
> > WDYT?
> >
> > On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik 
> > wrote:
> >
> >> Hello,
> >>
> >> according to stackoverflow [1]
> >> you can use Intl.DateTimeFormat().resolvedOptions().timeZone
> >> ClientProperties can be extended to get this info on server
> >>
> >> [1]
> >>
> https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser
> >>
> >> On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:
> >>
> >>> I'm trying to detect what is the current timezone offset for a client
> >>> browser accessing my Wicket application.
> >>> I found out that BrowserInfoForm.ClientPropertiesBean contains details
> >>> about:
> >>> - utcOffset
> >>> - utcDstOffset
> >>> but these are calculated at 1.Jan and 1.June.
> >>>
> >>> Is there any way to determine on server side what is the CURRENT
> timezone
> >>> offset of the client?
> >>> I've tried to use ClientPropertiesBean.timeZone, but that is relative /
> >>> guest and not real client timezone.
> >>>
> >>>
> >>> --
> >>>
> >>> Kind Regards,
> >>>
> >>>
> >>> *CALIN PAVELSoftware Engineer - consultant*
> >>> calin.pa...@tvh.com
> >>>
> >>> *TVH PARTS HOLDING NV*
> >>> Vichtseweg 129 • BE-8790 WAREGEM
> >>> T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com
> >>>
> >>> 
> >>>
> >>> --
> >>>
> >>>
> >>>  DISCLAIMER
> >>>  
> >>>
> >>> This
> >>> message is delivered to all addressees subject to the conditions set
> >>> forth
> >>> in the attached disclaimer, which is an integral part of this message.
> >>>
> >>>
> >>> When you communicate with us via e-mail, telephone, fax or via our
> >>> website,
> >>> we process your personal data. For more information on how we process
> >>> your
> >>> personal data, please consult our Privacy Policy
> >>> . By communicating with us, you
> >>> unambiguously consent to our use of your personal data as explained in
> >>> the
> >>> Privacy Policy.
> >>>
> >>
> >>
> >> --
> >> WBR
> >> Maxim aka solomax
> >>
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
> --
> WBR
> Maxim aka solomax
>


Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
On the other hand: the old code can be used if TZ is not available
I'll do some tests and will create PR

On Mon, 28 Oct 2019 at 22:51, Maxim Solodovnik  wrote:

> @devs are we supporting IE11 for wicket9? if not we can add this call to
> standard ClientProperties ...
> WDYT?
>
> On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik 
> wrote:
>
>> Hello,
>>
>> according to stackoverflow [1]
>> you can use Intl.DateTimeFormat().resolvedOptions().timeZone
>> ClientProperties can be extended to get this info on server
>>
>> [1]
>> https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser
>>
>> On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:
>>
>>> I'm trying to detect what is the current timezone offset for a client
>>> browser accessing my Wicket application.
>>> I found out that BrowserInfoForm.ClientPropertiesBean contains details
>>> about:
>>> - utcOffset
>>> - utcDstOffset
>>> but these are calculated at 1.Jan and 1.June.
>>>
>>> Is there any way to determine on server side what is the CURRENT timezone
>>> offset of the client?
>>> I've tried to use ClientPropertiesBean.timeZone, but that is relative /
>>> guest and not real client timezone.
>>>
>>>
>>> --
>>>
>>> Kind Regards,
>>>
>>>
>>> *CALIN PAVELSoftware Engineer - consultant*
>>> calin.pa...@tvh.com
>>>
>>> *TVH PARTS HOLDING NV*
>>> Vichtseweg 129 • BE-8790 WAREGEM
>>> T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com
>>>
>>> 
>>>
>>> --
>>>
>>>
>>>  DISCLAIMER
>>>  
>>>
>>> This
>>> message is delivered to all addressees subject to the conditions set
>>> forth
>>> in the attached disclaimer, which is an integral part of this message.
>>>
>>>
>>> When you communicate with us via e-mail, telephone, fax or via our
>>> website,
>>> we process your personal data. For more information on how we process
>>> your
>>> personal data, please consult our Privacy Policy
>>> . By communicating with us, you
>>> unambiguously consent to our use of your personal data as explained in
>>> the
>>> Privacy Policy.
>>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
> --
> WBR
> Maxim aka solomax
>


-- 
WBR
Maxim aka solomax


Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
@devs are we supporting IE11 for wicket9? if not we can add this call to
standard ClientProperties ...
WDYT?

On Mon, 28 Oct 2019 at 22:48, Maxim Solodovnik  wrote:

> Hello,
>
> according to stackoverflow [1]
> you can use Intl.DateTimeFormat().resolvedOptions().timeZone
> ClientProperties can be extended to get this info on server
>
> [1]
> https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser
>
> On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:
>
>> I'm trying to detect what is the current timezone offset for a client
>> browser accessing my Wicket application.
>> I found out that BrowserInfoForm.ClientPropertiesBean contains details
>> about:
>> - utcOffset
>> - utcDstOffset
>> but these are calculated at 1.Jan and 1.June.
>>
>> Is there any way to determine on server side what is the CURRENT timezone
>> offset of the client?
>> I've tried to use ClientPropertiesBean.timeZone, but that is relative /
>> guest and not real client timezone.
>>
>>
>> --
>>
>> Kind Regards,
>>
>>
>> *CALIN PAVELSoftware Engineer - consultant*
>> calin.pa...@tvh.com
>>
>> *TVH PARTS HOLDING NV*
>> Vichtseweg 129 • BE-8790 WAREGEM
>> T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com
>>
>> 
>>
>> --
>>
>>
>>  DISCLAIMER
>>  
>>
>> This
>> message is delivered to all addressees subject to the conditions set
>> forth
>> in the attached disclaimer, which is an integral part of this message.
>>
>>
>> When you communicate with us via e-mail, telephone, fax or via our
>> website,
>> we process your personal data. For more information on how we process
>> your
>> personal data, please consult our Privacy Policy
>> . By communicating with us, you
>> unambiguously consent to our use of your personal data as explained in
>> the
>> Privacy Policy.
>>
>
>
> --
> WBR
> Maxim aka solomax
>


-- 
WBR
Maxim aka solomax


Re: Client browser timezone offset

2019-10-28 Thread Maxim Solodovnik
Hello,

according to stackoverflow [1]
you can use Intl.DateTimeFormat().resolvedOptions().timeZone
ClientProperties can be extended to get this info on server

[1]
https://stackoverflow.com/questions/6939685/get-client-time-zone-from-browser

On Mon, 28 Oct 2019 at 22:26, Calin Pavel  wrote:

> I'm trying to detect what is the current timezone offset for a client
> browser accessing my Wicket application.
> I found out that BrowserInfoForm.ClientPropertiesBean contains details
> about:
> - utcOffset
> - utcDstOffset
> but these are calculated at 1.Jan and 1.June.
>
> Is there any way to determine on server side what is the CURRENT timezone
> offset of the client?
> I've tried to use ClientPropertiesBean.timeZone, but that is relative /
> guest and not real client timezone.
>
>
> --
>
> Kind Regards,
>
>
> *CALIN PAVELSoftware Engineer - consultant*
> calin.pa...@tvh.com
>
> *TVH PARTS HOLDING NV*
> Vichtseweg 129 • BE-8790 WAREGEM
> T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com
>
> 
>
> --
>
>
>  DISCLAIMER
>  
>
> This
> message is delivered to all addressees subject to the conditions set forth
> in the attached disclaimer, which is an integral part of this message.
>
>
> When you communicate with us via e-mail, telephone, fax or via our
> website,
> we process your personal data. For more information on how we process your
> personal data, please consult our Privacy Policy
> . By communicating with us, you
> unambiguously consent to our use of your personal data as explained in the
> Privacy Policy.
>


-- 
WBR
Maxim aka solomax


Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT timezone
offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


-- 

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com



-- 


 DISCLAIMER 
 

This 
message is delivered to all addressees subject to the conditions set forth 
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our website, 
we process your personal data. For more information on how we process your 
personal data, please consult our Privacy Policy 
. By communicating with us, you 
unambiguously consent to our use of your personal data as explained in the 
Privacy Policy.


Client browser timezone offset

2019-10-28 Thread Calin Pavel
I'm trying to detect what is the current timezone offset for a client
browser accessing my Wicket application.
I found out that BrowserInfoForm.ClientPropertiesBean contains details
about:
- utcOffset
- utcDstOffset
but these are calculated at 1.Jan and 1.June.

Is there any way to determine on server side what is the CURRENT timezone
offset of the client?
I've tried to use ClientPropertiesBean.timeZone, but that is relative /
guest and not real client timezone.


-- 

Kind Regards,


*CALIN PAVELSoftware Engineer - consultant*
calin.pa...@tvh.com

*TVH PARTS HOLDING NV*
Vichtseweg 129 • BE-8790 WAREGEM
T +32 56 43 42 11 <+3256434211> • F +32 56 43 44 88 • www.tvh.com



-- 


 DISCLAIMER 
 

This 
message is delivered to all addressees subject to the conditions set forth 
in the attached disclaimer, which is an integral part of this message.


When you communicate with us via e-mail, telephone, fax or via our website, 
we process your personal data. For more information on how we process your 
personal data, please consult our Privacy Policy 
. By communicating with us, you 
unambiguously consent to our use of your personal data as explained in the 
Privacy Policy.