Double validation in textfield
We've seen some strange behavior with TextFieldDouble, which you can easily verify on http://www.wicket-library.com/wicket-examples/forminput In an English locale enter into the Double field: 6.5 result: 6.5 6,4 result: 64 6,4 result: 64 6,4, result: '6,4,' is not a valid Double. Why does it accept stuff like 6,4? I don't think this is expected behavior. Thanks for any insight, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Double validation in textfield
On Wednesday, July 03, 2013 4:02 PM, Sven Meier wrote: http://stackoverflow.com/questions/15809225/java-numberformat-ignoring-comma-in-us-locale i.e. a grouping separator can be at any position *between* digits. Thanks. Whoever came up with that idea... Oh well. Michael On 07/03/2013 03:45 PM, Lemke, Michael SZ/HZA-ZSW wrote: We've seen some strange behavior with TextFieldDouble, which you can easily verify on http://www.wicket-library.com/wicket-examples/forminput In an English locale enter into the Double field: 6.5 result: 6.5 6,4 result: 64 6,4 result: 64 6,4, result: '6,4,' is not a valid Double. Why does it accept stuff like 6,4? I don't think this is expected behavior. Thanks for any insight, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: ModalDialog - control the location
Hm, this from something I did (uses jquery): public class ModalDialogPanel extends ModalWindow { ... public enum Position { TR, TL, BR, BL } ... /** * @param target * @param component Element to use for position of popup. */ public void open(AjaxRequestTarget target, Component component) { open(target, component, Position.TL); } public void open(AjaxRequestTarget target, Component component, Position position) { open(target); String left = , top = ; switch (position) { case TL: left = pos.left; top = pos.top + ch/2; break; case TR: left = pos.left - ow + cw; top = pos.top + ch/2; break; case BL: left = pos.left; top = pos.top + ch/2 - oh; break; case BR: left = pos.left - ow + cw; top = pos.top + ch/2 - oh; break; } target.appendJavaScript( ( + $f( var pos = + $(component).offset(), var ch = + $(component).outerHeight(), var cw = + $(component).outerWidth(), var width = $(window).width(), var height = $(window).height(), var w = Wicket.Window.get();, var ow = w.window.offsetWidth, var oh = w.window.offsetHeight, var left = + left, var top = + top, left = Math.max(0,Math.min(left,width-ow)), top = Math.max(0,Math.min(top,height-oh)), w.window.style.left=left+'px';, w.window.style.top=top+'px'; )+)();); } } -Original Message- From: Wujek Srujek [mailto:wujek.sru...@gmail.com] Sent: Friday, October 12, 2012 8:56 AM To: users@wicket.apache.org Subject: ModalDialog - control the location Hi. We have the requirement that we need to show more than one popup at a time - this means buttons / links in a popup trigger showing other popups (whether it's good style or not is irrelevant, this is a requirement...). We are using ModalWindow for that, and it is always shown in the center of the screen. What we would like to have is to be able to 'stack' windows, where the new one is shown +20 from the top and +20 to the right from the top one: | |_ | | | | | | | | | |_| My idea is to override the center method in a way that: 1. introduces a counter of the windows 2. calls the original method 3. retrieves the top and and left styles, parses them into an integer 4. top = top + counter * 20; left = left + counter * 20 5. sets the style to these new values As I have very, very little knowledge of javascript, I'm failing to implement that. Could I get some help from you? Namely, I have trouble getting accessing the modal window, and its current styles. Regards, wujek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wiquery ajaxslider
Hi, I've a problem with AjaxSlider in wiquery-jquery-ui. Sorry if this is the wrong place to report it but I can't use Google groups. Version: Wicket 6.0.0, wiquery-jquery-ui: 6.0.0 The setAjaxStopEvent never fires. Looking at the generated js it's obvious that it can't: $('#slider11').slider({min: 0.0, max: 500.0, stop: function(event, ui) { var url = '../page?1-1.IBehaviorListener.0-sliderForm-slider1sliderEvent=ajaxStopEventsliderValue='+ui.value+'sliderValues='+ui.values; Wicket.Ajax.ajax({u:../page?1-1.IBehaviorListener.0-sliderForm-slider1,c:slider11}); }});; The variable url is never used. My code works fine with Wicket 1.5.8 and wiquery-jquery-ui 1.5.7 Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wiquery ajaxslider
On Monday, October 08, 2012 3:11 PM Martin Grigorov wrote: Hi, This is the currently active forum! :-) But you better file this problem at https://github.com/WiQuery/wiquery/issues so it got fixed for the next release. Thanks, done. Issue #6. Didn't realize it is on github. Michael On Mon, Oct 8, 2012 at 3:39 PM, Lemke, Michael SZ/HZA-ZSW lemke...@schaeffler.com wrote: Hi, I've a problem with AjaxSlider in wiquery-jquery-ui. Sorry if this is the wrong place to report it but I can't use Google groups. Version: Wicket 6.0.0, wiquery-jquery-ui: 6.0.0 The setAjaxStopEvent never fires. Looking at the generated js it's obvious that it can't: $('#slider11').slider({min: 0.0, max: 500.0, stop: function(event, ui) { var url = '../page?1-1.IBehaviorListener.0-sliderForm-slider1sliderEvent=ajaxStopEventsliderValue='+ui.value+'sliderValues='+ui.values; Wicket.Ajax.ajax({u:../page?1-1.IBehaviorListener.0-sliderForm-slider1,c:slider11}); }});; The variable url is never used. My code works fine with Wicket 1.5.8 and wiquery-jquery-ui 1.5.7 Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
TabbedPanel whitspace markup
I've encountered a layout problem with TabbedPanels. In the generated markup there is whitespace between the LI items and the anchor that switches tabs. This causes a layout problem for me with this style sheet (simplified to show the issue, not tested): .selected a { background: url(../i/bg_tab_lw_content_active.gif) repeat-x scroll center top #E8EEF1; border-right: 1px solid #CDD3D6; } a { background: none repeat scroll 0 0 transparent; border-right: 1px solid #FF; } li { display: inline; margin: 0; list-style: none outside none } The idea is to have a white border between the tabs which disappears for the selected tab. Kind of hard to explain without screenshots. Currently with Wicket there is always a small margin left or right of the white border of the A element. It is caused by whitespace in the markup. li { float:left; } would remove the undesired whitespace but would break the rest of our layout. Anyway, the root cause is the markup in TabbedPanel.html of Wicket. Current (1.5.8 and 6.0.0): wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabs a href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a /li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Should be changed in e.g. wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabsa href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a/li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Is there a Wicket way to work around this? Thanks for any insight, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: TabbedPanel whitspace markup
On Tue, Sep 18, 2012 1:51 PM Martin Grigorov wrote: On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael SZ/HZA-ZSW wrote: I've encountered a layout problem with TabbedPanels. In the generated markup there is whitespace between the LI items and the anchor that switches tabs. This causes a layout problem for me with this style sheet (simplified to show the issue, not tested): .selected a { background: url(../i/bg_tab_lw_content_active.gif) repeat-x scroll center top #E8EEF1; border-right: 1px solid #CDD3D6; } a { background: none repeat scroll 0 0 transparent; border-right: 1px solid #FF; } li { display: inline; margin: 0; list-style: none outside none } The idea is to have a white border between the tabs which disappears for the selected tab. Kind of hard to explain without screenshots. Currently with Wicket there is always a small margin left or right of the white border of the A element. It is caused by whitespace in the markup. li { float:left; } would remove the undesired whitespace but would break the rest of our layout. Anyway, the root cause is the markup in TabbedPanel.html of Wicket. Current (1.5.8 and 6.0.0): wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabs a href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a /li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Should be changed in e.g. wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabsa href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a/li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Is there a Wicket way to work around this? You can create MyTabbedPanel that extends TabbedPanel and provides MyTabbedPanel.html. The only code in .java that is needed to add is the constructor(s) you use. Thanks, I just did this. Works fine. But is there a chance it gets fixed in Wicket? Or isn't this considered a problem? Michael
RE: TabbedPanel whitspace markup
On Tue, Sep 18, 2012 2:10 PM Martin Grigorov [mailto:mgrigo...@apache.org] wrote: To: users@wicket.apache.org Subject: Re: TabbedPanel whitspace markup Create a ticket and attach the screenshots. I'm not much in CSS and I cannot imagine how this whitespace breaks the layout. But I don't see a problem to remove them too. Thanks Martin. Created https://issues.apache.org/jira/browse/WICKET-4768 On Tue, Sep 18, 2012 at 3:07 PM, Lemke, Michael SZ/HZA-ZSW lemke...@schaeffler.com wrote: On Tue, Sep 18, 2012 1:51 PM Martin Grigorov wrote: On Tue, Sep 18, 2012 at 2:29 PM, Lemke, Michael SZ/HZA-ZSW wrote: I've encountered a layout problem with TabbedPanels. In the generated markup there is whitespace between the LI items and the anchor that switches tabs. This causes a layout problem for me with this style sheet (simplified to show the issue, not tested): .selected a { background: url(../i/bg_tab_lw_content_active.gif) repeat-x scroll center top #E8EEF1; border-right: 1px solid #CDD3D6; } a { background: none repeat scroll 0 0 transparent; border-right: 1px solid #FF; } li { display: inline; margin: 0; list-style: none outside none } The idea is to have a white border between the tabs which disappears for the selected tab. Kind of hard to explain without screenshots. Currently with Wicket there is always a small margin left or right of the white border of the A element. It is caused by whitespace in the markup. li { float:left; } would remove the undesired whitespace but would break the rest of our layout. Anyway, the root cause is the markup in TabbedPanel.html of Wicket. Current (1.5.8 and 6.0.0): wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabs a href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a /li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Should be changed in e.g. wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabsa href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a/li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel Is there a Wicket way to work around this? You can create MyTabbedPanel that extends TabbedPanel and provides MyTabbedPanel.html. The only code in .java that is needed to add is the constructor(s) you use. Thanks, I just did this. Works fine. But is there a chance it gets fixed in Wicket? Or isn't this considered a problem? Michael -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org