You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "info@flyingfischer.ch" <in...@flyingfischer.ch> on 2017/06/26 19:27:16 UTC

Re: Struts 2.5.11: js based messages not showing up, when chanching default locale [resolved]

> Very strange: values do get replaced:
>
> <script type="text/javascript">
> notif({
> msg: "Ungültige Angaben!",
> type: "info",
> position: "center",
> opacity: 0,9,
> timeout: 5000,
> multiline: true,
> autohide: true,
> clickable: false
> });
> </script>
>
> But JS box will still not show up, when not on default locale...
>
> ...any other ideas, what could trigger this difference between 2.5.10.1
> and 2.5.11?
>
> Thanks!
>
> Markus
>
Found the root cause:

The property opacity expects a value between 0 and 1, separated by DOT.

The object JSMessage uses

private BigDecimal opacity = new BigDecimal("0.9");

Now EL brings replaces

<s:property value="jsmsg.opacity" />

in locale en with 0.9 and in all other locales with 0,9 (note the COMMA).

This is related to

https://issues.apache.org/jira/browse/WW-3650

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.5.11: js based messages not showing up, when chanching default locale [resolved]

Posted by Lukasz Lenart <lu...@apache.org>.
2017-06-27 8:16 GMT+02:00 info@flyingfischer.ch <in...@flyingfischer.ch>:
> private String opacity = "0.9";
>
> This works with <s:property/>

Right, this does not depend on Number Conversion :)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.5.11: js based messages not showing up, when chanching default locale [resolved]

Posted by "info@flyingfischer.ch" <in...@flyingfischer.ch>.
Am 27.06.2017 um 08:12 schrieb Lukasz Lenart:
> 2017-06-26 21:27 GMT+02:00 info@flyingfischer.ch <in...@flyingfischer.ch>:
>> Now EL brings replaces
>>
>> <s:property value="jsmsg.opacity" />
>>
>> in locale en with 0.9 and in all other locales with 0,9 (note the COMMA).
> Oh... thanks a lot for diggin this, can you use <s:number/> instead of
> <s:property/>?
>
>
> Regards
I did switch to in JSMessage object to

private String opacity = "0.9";

This works with <s:property/>

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts 2.5.11: js based messages not showing up, when chanching default locale [resolved]

Posted by Lukasz Lenart <lu...@apache.org>.
2017-06-26 21:27 GMT+02:00 info@flyingfischer.ch <in...@flyingfischer.ch>:
> Now EL brings replaces
>
> <s:property value="jsmsg.opacity" />
>
> in locale en with 0.9 and in all other locales with 0,9 (note the COMMA).

Oh... thanks a lot for diggin this, can you use <s:number/> instead of
<s:property/>?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org