Static images and ResourceMapper in Wicket 1.5
I'm wondering what is the preferred way to include static image resources to my web application. Instead of having a directory like "images" in my root web container (WEB-INF) with all the static images used in my application it is advised (so far I can remember) to have a directory next to the Application class and mount these image resources with the ResourceMapper. At the moment I refer to images in my root web container from a Panel's markup file like This works for me but I wanna go the "wicketzed" way. If I would use the ResourceMapper in my Application class I would mount just one image resource the following way: What is the preferred way to mount all resources at ones in one directory? How can these changes be applied to the corresponding markup files of my Panels without creating an Image (or ContextImage?) component? Thanks for your hints. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Static-images-and-ResourceMapper-in-Wicket-1-5-tp4570016p4570016.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!
Nice one! No worries! :D -Original Message- From: kshitiz [mailto:k.agarw...@gmail.com] Sent: Thursday, 19 April 2012 4:10 AM To: users@wicket.apache.org Subject: RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!! Your guess is rightthank you for the help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4568555.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
There are a lot more threads that are running within a Weblogic container. The thread you are showing is not the thread that is creating the lock. It is the thread that is indicating the page map is locked. Also, I don't believe there is a way to kill a particular thread in weblogic. It only shows the threads in use with little or no management capability. Consequently, not sure how you would be able to "kill" a thread -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4569113.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
here is stack trace , with this please help me identify the thread causing the lock, my applciation is deployed in weblogic. I assume once the thread is identified I have to use weblogic admin console to kill this particular thread ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568715.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
behaviour and busy indicator
Hello, I'm trying get Ajax Indicator working for my form validating behaviour. Basically I have a thing that takes time to check on server. Meanwhile I'd like to show user a busy indicator. I tried to do following thing: *This is page class, with basic form input:* //...omitted some not revelant code AjaxIndicatorAppender indicator = new AjaxIndicatorAppender(); final RequiredTextField nickField = new RequiredTextField( "nick", new PropertyModel( this, "nickValue" ) ); formContainer.add( nickField ); indicator.bind(nickField); nickField.add( new MyValidatingBehaviour( (Form) formContainer, "onkeyup", Duration.ONE_SECOND, indicator ) ); //... *And this is my validating behaviour:* private class MyValidatingBehaviour extends AjaxFormValidatingBehavior implements IAjaxIndicatorAware { AjaxIndicatorAppender indicator; private MyValidatingBehaviour( Form form, String event, final Duration throttleDelay, AjaxIndicatorAppender indicator ) { super( form, event ); this.setThrottleDelay( throttleDelay ); this.indicator = indicator; } @Override public String getAjaxIndicatorMarkupId() { return indicator.getMarkupId(); } } Of course there are some other validators than "required" one, I just ommited 'em here. The thing is, that I dont have any indicator sign anywhere. Docs says that it appeds "span", yet I couldnt find any in HTML. The HTML looks simple as this: Any help whats wrong? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/behaviour-and-busy-indicator-tp4568683p4568683.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
We got some of these because of: - database deadlocks (unsorted race situation) - non-threadsafe access to hashmaps (hashmap/treemap has cool possibility to hang when used from multiple threads without synchronization) - excplicit lock bugs (reentrantlocks) I recommend to debug by displaying the stacktrace of the hanged thread. This can be achieved manually or via kill -3. ** Martin 2012/4/18 Igor Vaynberg : > its a servlet container thread, probably not safe to kill... > > maybe we can have implement a hard-evict from the store, and some > strategy to handle these cases. > > -igor > > On Wed, Apr 18, 2012 at 11:42 AM, Martin Makundi > wrote: >> You can kill it in Session but killing a thread will leave it in unknown >> state. >> >> ** >> Martin >> >> 2012/4/18 fachhoch : >>> If a page is stuck with this error , is there any way I can identify this >>> and >>> throw a RestartResponseAtInterceptPageException exception to error page ? >>> >>> I am using wicket 1.4.12 >>> >>> >>> -- >>> View this message in context: >>> http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.html >>> Sent from the Users forum mailing list archive at Nabble.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 >> > > - > 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
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
its a servlet container thread, probably not safe to kill... maybe we can have implement a hard-evict from the store, and some strategy to handle these cases. -igor On Wed, Apr 18, 2012 at 11:42 AM, Martin Makundi wrote: > You can kill it in Session but killing a thread will leave it in unknown > state. > > ** > Martin > > 2012/4/18 fachhoch : >> If a page is stuck with this error , is there any way I can identify this and >> throw a RestartResponseAtInterceptPageException exception to error page ? >> >> I am using wicket 1.4.12 >> >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.html >> Sent from the Users forum mailing list archive at Nabble.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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
You can kill it in Session but killing a thread will leave it in unknown state. ** Martin 2012/4/18 fachhoch : > If a page is stuck with this error , is there any way I can identify this and > throw a RestartResponseAtInterceptPageException exception to error page ? > > I am using wicket 1.4.12 > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.html > Sent from the Users forum mailing list archive at Nabble.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
Re: After 1 minute the Pagemap null is still locked by: Thread how to kill this request ?
If a page is stuck with this error , is there any way I can identify this and throw a RestartResponseAtInterceptPageException exception to error page ? I am using wicket 1.4.12 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-how-to-kill-this-request-tp4565091p4568619.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!
Your guess is rightthank you for the help -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-cannot-find-id-in-inner-enclosure-but-has-no-problem-in-outer-one-tp4559666p4568555.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help I need to understand page locking
I am having this same issue. Have you figured out what the issue was? Thanks, Josh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Help-I-need-to-understand-page-locking-tp3543950p4568549.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: AbstractAjaxBehavior and ModalWindow
Hi, if you are inside an Ajax-Request you can simply do AjaxRequestTarget.get() cheers Hans -Ursprüngliche Nachricht- Von: Brian Mulholland [mailto:blmulholl...@gmail.com] Gesendet: Mittwoch, 18. April 2012 18:34 An: users@wicket.apache.org Betreff: AbstractAjaxBehavior and ModalWindow I have a page where I show a javascript widget. Based on events in said widget, I may fire one of five different ajax events. On some of them, I am required to show a modal window with a form in it. I am using, based on advice found while googling, AbstractAjaxBehavior to handle the ajax events, which is working swell for the non-modal window events. But ModalWindow (the wicket extension) wants an AjaxRequestTarget passed to the show() method. Unlike the example which uses a link to trigger the modal window, AbstractAjaxBehavior does not pass an AjaxRequestTarget for me to pass along to the show() method. I tried to pass along the request from the RequestCycle, but that got me the following ClassCastException: java.lang.ClassCastException: org.apache.wicket.request.target.component.listener.BehaviorRequestTarget incompatible with org.apache.wicket.ajax.AjaxRequestTarget Brian Mulholland - 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
Re: Unable to find error during hello World
Martin, thanks for your test. This allowed me to deduce that the cause is elsewhere: I found it now: I did not stopped the embedded Jetty server before trying my changes. Regards, Marc > > From: Marc Marc > Sent: Sun Apr 15 08:47:21 CEST 2012 > To: > Subject: Unable to find error during hello World > > > Hello, > > I am a new user. I succeeded the quickstart but can not run the "Hello World" > example. I get the following error: > Unable to find component with id 'message' in [Page class = > com.modelandgo.HomePage, id = 0, render count = 1]Expected: '.message'. > > I searched in the mailing list but did not found the solution. > I add my simple code hereunder. > > Thanks! > Marc > __ > > my application: > public class WicketApplication extends WebApplication > { > @Override > public Class getHomePage() > { > return HomePage.class; > } > > } > > my page: > public class HomePage extends WebPage { > private static final long serialVersionUID = 1L; > > public HomePage(final PageParameters parameters) { > > add(new Label("message", "I am a newbie")); > > } > } > > my html: > > http://wicket.apache.org";> > > Message goes here > > > > > > - > Mail.be, WebMail and Virtual Office > http://www.mail.be > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - Mail.be, WebMail and Virtual Office http://www.mail.be - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5)
As expected KB2675157 fixed this IE9 issue, nice timing though. -Original Message- From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] Sent: 12. huhtikuuta 2012 10:18 To: users@wicket.apache.org Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5) Ok, it seems that time takes care of this problem and leak is not wicket-ajax problem: Tests with IE 10 (consumer preview) shows no leaking, gc seems to work and browser refresh clears the memory. There were no leaking with Opera, Firefox and Chrome. Furthermore previous JS debugging did not show that anything was piling in dom, so it must be IE9 inner problem. Only leaking is this IE9 in IE9 document mode, can't see any point filing a ticket. Anyway quickstart is available at http://uploading.com/files/51fc2bcb/ie9memory.zip/ Easy way to check Process Explorer -> "select iexplore.exe"-> Properties..-> Performance Graph -> Private bytes -Original Message- From: Heikki Uotinen [mailto:heikki.uoti...@syncrontech.com] Sent: 11. huhtikuuta 2012 14:38 To: users@wicket.apache.org Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5) Hi, 1) Process Explorer and IE developer tools 2) ok -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: 11. huhtikuuta 2012 14:14 To: users@wicket.apache.org Subject: Re: IE9 Memory leak when updating component with Ajax (Wicket 1.5.5) Hi, From your mails I still don't understand how exactly you measure the memory consumption. You have two options: 1) google for "javascript memory leak". You can add "Internet explorer" in the search term too I'm not sure whether IE has tools to deal with that but you can use and see whether it helps somehow 2) create a ticket in Wicket Jira with a quickstart and detailed description how to reproduce and how to measure and let someone else to debug it for you. On Wed, Apr 11, 2012 at 1:50 PM, Heikki Uotinen wrote: > Hi, > > I tested against apache-wicket-6.0.0-beta1 with that simple example in the > first mail. > > Application still leaked memory on IE9 document mode, same behavior as with > 1.5.5. > > Confirmed that it is using jQuery: > > src="../resource/org.apache.wicket.resource.JQueryResourceReference/jq > uery/jquery-ver-1334139767559.js"> > > src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re > s/js/wicket-event-jquery-ver-1334139767559.js"> > > src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/re > s/js/wicket-ajax-jquery-ver-1334139767559.js"> > > Suggestions ? > > > -Original Message- > From: Chris Colman [mailto:chr...@stepaheadsoftware.com] > Sent: 11. huhtikuuta 2012 11:47 > To: users@wicket.apache.org > Subject: RE: IE9 Memory leak when updating component with Ajax (Wicket > 1.5.5) > >>> how exactly did you solve it with jQuery ? >> >>Since this leak seems to be caused by wicket-ajax calls then solution > would >>be bypassing >>those, this would be the last resort. > > Wicket 6 uses jQuery for its AJAX backhauling. I wonder if, therefore, if > your app were ported to Wicket 6 if the IE9 problem goes away. > > > - > 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 > -- 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AbstractAjaxBehavior and ModalWindow
I have a page where I show a javascript widget. Based on events in said widget, I may fire one of five different ajax events. On some of them, I am required to show a modal window with a form in it. I am using, based on advice found while googling, AbstractAjaxBehavior to handle the ajax events, which is working swell for the non-modal window events. But ModalWindow (the wicket extension) wants an AjaxRequestTarget passed to the show() method. Unlike the example which uses a link to trigger the modal window, AbstractAjaxBehavior does not pass an AjaxRequestTarget for me to pass along to the show() method. I tried to pass along the request from the RequestCycle, but that got me the following ClassCastException: java.lang.ClassCastException: org.apache.wicket.request.target.component.listener.BehaviorRequestTarget incompatible with org.apache.wicket.ajax.AjaxRequestTarget Brian Mulholland - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to prevent linebreaks after radio input ?
org.apache.wicket.markup.html.form.RadioChoice#setPrefix , #setSuffix On Wed, Apr 18, 2012 at 6:48 PM, heikki wrote: > hello, > > Wicket inserts after radio input elements generated by RadioChoice. > > How can I prevent that ? > > My code: > > RadioChoice optionsRadioChoice = new RadioChoice("option", > new PropertyModel(this, "option"), optionsList); > add(optionsRadioChoice ); > > > > This generates this HTML: > > > id="options-0"/> > some value > > > another value > > Obviously I want to control my HTML layout and I don't want automatically > generated elements. How can I do that ? > > thanks in advance > Heikki Doeleman > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-linebreaks-after-radio-input-tp4568121p4568121.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > 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
How to prevent linebreaks after radio input ?
hello, Wicket inserts after radio input elements generated by RadioChoice. How can I prevent that ? My code: RadioChoice optionsRadioChoice = new RadioChoice("option", new PropertyModel(this, "option"), optionsList); add(optionsRadioChoice ); This generates this HTML: some value another value Obviously I want to control my HTML layout and I don't want automatically generated elements. How can I do that ? thanks in advance Heikki Doeleman -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-prevent-linebreaks-after-radio-input-tp4568121p4568121.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Close Pop-up Window From Server?
Hi, I am not sure if I understood it correctly, but my first idea would have been to add a javascript to the popup window which fires AJAX calls and if the response from your server contains some code the window will close itself. To be honest, I have never tried anything like that and have no idea if that will work, but one should always go after first hunches ;-) Bye Dominik Am 18.04.2012 16:06, schrieb eugenebalt: Maybe this isn't strictly a Wicket question, but I have a link from the main page which opens a pop-up window. The pop-up has a form handled by a servlet (in my case, a Wicket page mounted to a servlet-like URL). Upon completing the form in the pop-up, I need to close the pop-up window *from the server*. There is no way to do it in the client. The client form is a "black-box" Adobe container which only sends HTTP request params to my servlet. After closing the popup, I also need to refresh the main page, which shows a listing of all user records (including the new one just entered in the popup). Is there a way to accomplish that? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Close-Pop-up-Window-From-Server-tp4567812p4567812.html Sent from the Users forum mailing list archive at Nabble.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
Close Pop-up Window From Server?
Maybe this isn't strictly a Wicket question, but I have a link from the main page which opens a pop-up window. The pop-up has a form handled by a servlet (in my case, a Wicket page mounted to a servlet-like URL). Upon completing the form in the pop-up, I need to close the pop-up window *from the server*. There is no way to do it in the client. The client form is a "black-box" Adobe container which only sends HTTP request params to my servlet. After closing the popup, I also need to refresh the main page, which shows a listing of all user records (including the new one just entered in the popup). Is there a way to accomplish that? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Close-Pop-up-Window-From-Server-tp4567812p4567812.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using @font-face css rules
Thanks. I go for the 2nd approach and it seems to be working except the access to static packages resources with an unknown file ending. What did you mean with > The problem is that '..' escapes from the package name. > See > org.apache.wicket.settings.def.ResourceSettings#parentFolderPlaceholder > Replace '..' with whatever you use for parentFolderPlaceholder > The parentFolderPlaceholder String is currently set to "::". Does this mean, if I would replace the ".." in my css file with "::" this would work as well? I assume I have to add some kind of pattern to the PackageResourceGuard though. As I get the following messages now: What is the preferred way to do this? I assume this will solve my problem: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567770.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with page refresh
Hi Ale. I had a very similar problem, and I was able to get the behavior I expected by changing the render strategy to ONE_PASS_RENDER in Application.init(). Have a look at this http://apache-wicket.1842946.n4.nabble.com/refresh-and-AjaxFallbackDefaultDataTable-td4384935.html On Wed, Apr 18, 2012 at 7:12 AM, alezx wrote: > Hi guys, I ran into a problem lately, > > I have an instance variable in my panel and an ajax behaviour > > public final class ScrollLoader extends Panel implements IHeaderContributor > { > > int number = 0; > private AbstractDefaultAjaxBehavior b; > .. > > //constructor > public Scrolloader (...){ > b = new AbstractDefaultAjaxBehavior() { >@Override >protected void respond(AjaxRequestTarget target) { >System.out.println("number is "+number); >number++; >} > } > .. > } > } > > when I click a button on the page, with ajax I call this behaviour and the > number is incremented. > > if I click on the buttons 5 times, the number increments to 0,1,2,3,4, > then if I refresh the page and than click on the button other 5 times, the > number goes to 9 (5,6,7,8,9) > > //so far, so good! > > but now if I refresh the page again, and I click on the button the number > starts incrementing from 4 and not from 9!! (so If I press the button 5 > times I see again 5,6,7,8,9 and not 10,11,12..) > > > same problem when I load the page for the first time: > > If I *refresh * the page before incrementing the value, the number starts > incrementing from 0 > so i get 0,1,2,3,4 > if I refresh again, the number starts incrementing from 0 again.. > > in other words when I refresh the page 2, 3, 4 times, the number starts > incrementing from the value reached before the first refresh, after that > first refresh any change to the number is lost.. > > so what do I do wrong? > > sorry if this is a bit confusing, > > and thanks for your help! > > ale > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Using @font-face css rules
Another approach is to put the resources in an inner folder like /com/foo/wicket/behavior/res/css/font_face.css /com/foo/wicket/behavior/res/fonts/sansation_regular-webfont.eot /com/foo/wicket/behavior/res/FontFaceCssResourceReference.java On Wed, Apr 18, 2012 at 3:52 PM, Martin Grigorov wrote: > Hi, > > The problem is that '..' escapes from the package name. > See org.apache.wicket.settings.def.ResourceSettings#parentFolderPlaceholder > Replace '..' with whatever you use for parentFolderPlaceholder > > On Wed, Apr 18, 2012 at 3:45 PM, Dirk Forchel wrote: >> I have a problem loading my fonts defined in my css file with the @font-face >> css rule which allows me to download the fonts from my server. >> Initally I define the rules in my css file the following way: >> >> >> >> The css-file is references by a CssResourceReference and contributed to the >> header with a Behavior: >> >> >> >> After loading my sample page with the Behavior, I've got the following >> Exception: >> >> >> >> Unfortunately, something with the resource mapping is wrong or does it mean, >> that the file type is not supported? >> >> >> >> The directory structure is like this: >> >> /com/foo/wicket/behavior/css/FontFaceCssHeaderContributor.java >> /com/foo/wicket/behavior/css/FontFaceCssResourceReference.java >> /com/foo/wicket/behavior/css/font_face.css >> /com/foo/wicket/behavior/fonts/sansation_regular-webfont.eot >> >> Does somebody have any idea? >> Thanks >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567586.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> 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 -- 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
Re: Using @font-face css rules
Hi, The problem is that '..' escapes from the package name. See org.apache.wicket.settings.def.ResourceSettings#parentFolderPlaceholder Replace '..' with whatever you use for parentFolderPlaceholder On Wed, Apr 18, 2012 at 3:45 PM, Dirk Forchel wrote: > I have a problem loading my fonts defined in my css file with the @font-face > css rule which allows me to download the fonts from my server. > Initally I define the rules in my css file the following way: > > > > The css-file is references by a CssResourceReference and contributed to the > header with a Behavior: > > > > After loading my sample page with the Behavior, I've got the following > Exception: > > > > Unfortunately, something with the resource mapping is wrong or does it mean, > that the file type is not supported? > > > > The directory structure is like this: > > /com/foo/wicket/behavior/css/FontFaceCssHeaderContributor.java > /com/foo/wicket/behavior/css/FontFaceCssResourceReference.java > /com/foo/wicket/behavior/css/font_face.css > /com/foo/wicket/behavior/fonts/sansation_regular-webfont.eot > > Does somebody have any idea? > Thanks > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567586.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > 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
Using @font-face css rules
I have a problem loading my fonts defined in my css file with the @font-face css rule which allows me to download the fonts from my server. Initally I define the rules in my css file the following way: The css-file is references by a CssResourceReference and contributed to the header with a Behavior: After loading my sample page with the Behavior, I've got the following Exception: Unfortunately, something with the resource mapping is wrong or does it mean, that the file type is not supported? The directory structure is like this: /com/foo/wicket/behavior/css/FontFaceCssHeaderContributor.java /com/foo/wicket/behavior/css/FontFaceCssResourceReference.java /com/foo/wicket/behavior/css/font_face.css /com/foo/wicket/behavior/fonts/sansation_regular-webfont.eot Does somebody have any idea? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567586.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: problem with page refresh
Hi, I see you use 1.4.x (implementing IHeaderContributor). Which url coding strategy is used for this page ? I'd recommend you to use HybridUrlCodingStrategy because it keeps the page id in the url (something like: my/page.4) This is the reason why urls for stateful pages in Wicket 1.5 also keep the pageId in the url (my/page?4). This way even the refresh keeps the last state of the page. Without the page id Wicket would create a new instance of the page. On Wed, Apr 18, 2012 at 2:12 PM, alezx wrote: > Hi guys, I ran into a problem lately, > > I have an instance variable in my panel and an ajax behaviour > > public final class ScrollLoader extends Panel implements IHeaderContributor > { > > int number = 0; > private AbstractDefaultAjaxBehavior b; > .. > > //constructor > public Scrolloader (...){ > b = new AbstractDefaultAjaxBehavior() { > @Override > protected void respond(AjaxRequestTarget target) { > System.out.println("number is "+number); > number++; > } > } > .. > } > } > > when I click a button on the page, with ajax I call this behaviour and the > number is incremented. > > if I click on the buttons 5 times, the number increments to 0,1,2,3,4, > then if I refresh the page and than click on the button other 5 times, the > number goes to 9 (5,6,7,8,9) > > //so far, so good! > > but now if I refresh the page again, and I click on the button the number > starts incrementing from 4 and not from 9!! (so If I press the button 5 > times I see again 5,6,7,8,9 and not 10,11,12..) > > > same problem when I load the page for the first time: > > If I *refresh * the page before incrementing the value, the number starts > incrementing from 0 > so i get 0,1,2,3,4 > if I refresh again, the number starts incrementing from 0 again.. > > in other words when I refresh the page 2, 3, 4 times, the number starts > incrementing from the value reached before the first refresh, after that > first refresh any change to the number is lost.. > > so what do I do wrong? > > sorry if this is a bit confusing, > > and thanks for your help! > > ale > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > 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
problem with page refresh
Hi guys, I ran into a problem lately, I have an instance variable in my panel and an ajax behaviour public final class ScrollLoader extends Panel implements IHeaderContributor { int number = 0; private AbstractDefaultAjaxBehavior b; .. //constructor public Scrolloader (...){ b = new AbstractDefaultAjaxBehavior() { @Override protected void respond(AjaxRequestTarget target) { System.out.println("number is "+number); number++; } } .. } } when I click a button on the page, with ajax I call this behaviour and the number is incremented. if I click on the buttons 5 times, the number increments to 0,1,2,3,4, then if I refresh the page and than click on the button other 5 times, the number goes to 9 (5,6,7,8,9) //so far, so good! but now if I refresh the page again, and I click on the button the number starts incrementing from 4 and not from 9!! (so If I press the button 5 times I see again 5,6,7,8,9 and not 10,11,12..) same problem when I load the page for the first time: If I *refresh * the page before incrementing the value, the number starts incrementing from 0 so i get 0,1,2,3,4 if I refresh again, the number starts incrementing from 0 again.. in other words when I refresh the page 2, 3, 4 times, the number starts incrementing from the value reached before the first refresh, after that first refresh any change to the number is lost.. so what do I do wrong? sorry if this is a bit confusing, and thanks for your help! ale -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/problem-with-page-refresh-tp4567392p4567392.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket And Multi-threaded Business Object
Hi, These objects should not be serialized is they are referenced only by the Application instance, so remove " implements Serializable" and all 'transient's from their fields. Hopefully this will show the problem why the timer doesn't re-schedule. On Tue, Apr 17, 2012 at 7:38 PM, cmagnollay wrote: > So I have somewhat limited experience with serialization, Wicket, and multi > thread projects so bear with me. > > Essentially my web application class is instantiating a POJ (parentObject) > which creates a starts a new timer and instantiates several POJs > (childObjects) that also have timers in them. These childObjects are stored > in a list in the parentObject class. Pages in my wicket application need to > access parentObject, so I made it accessible as so: > > public Object getParentObject > { > return this.parentObject; > } > > And it is retrieved in each page like so: > > ((MyApplication)Application.get()).getParentObject() > > The problem currently is that the timertask for both the parentObject and > childObjects are no longer being called every minute as they should be. My > logs pick up the first start of the parentObject, but the logging message is > never outputted again signalling that the run() method of parent Object's > timertask is not being executed every minute. The same holds true for the > child Objects. It seems like the timers are only being executed once. Below > is some pseudocode for what I have > > public class childObject implements Serializable > { > private transient NamedParameterJdbcTemplate njt; > private transient Timer timer; > > public childObject(DataSource ds) > { > this.njt = new NamedParamterJdbcTemplate(ds); > } > > public void start() > { > timer = new Timer(); > > timer.schedule(new TimerTask(){ > > public void run() > { > //do some stuff that is never happening > } > > }, 0, 6); > } > } > > public class ParentObject implements Serializable > { > private DataSource ds; > private List childObjects; > private transient Timer; > > public ParentObject(DataSource ds) > { > this.ds = ds; > //add some stuff to childObjects > > timer = new Timer(); > > timer.schedule(new TimerTask(){ > > public void run() > { > for(some condition) > { > //Do some stuff > > if(/*condition is met*/) > { > //starts the child's timer to do stuff > childObjects.get(i).start(); > } > } > } > > }, 0, 6); > } > } > > public MyApplication extends WebApplication > { > private ParentObject object; > private DataSource ds; > > public void init() > { > super.init(); > > ApplicationContext context = new > ClassPathXmlApplicationContext("/applicationContext.xml"); > ds = (DataSource) context.getBean("dataSource"); > > parentObject = new ParentObject(ds); > } > } > > Do I even need to make these objects Serializable? The objects themselves > are never being attached to wicket components, although String, integer, > Date sorts of variables that are members of their classes are. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket-And-Multi-threaded-Business-Object-tp4565337p4565337.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > 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
Re: wicktTester.getLastResponseAsString() returns strange result in starting a Component
Hi, There is a bug. Please file a ticket with a simple quickstart. Thanks! On Wed, Apr 18, 2012 at 12:55 AM, carsten behring wrote: > Dear all, > > This following test : > > @Test > public void test() throws Exception { > WicketTester tester=new WicketTester(); > tester.startComponentInPage(new Label("lableId", "content") { > @Override > protected void onComponentTag(ComponentTag tag) { > super.onComponentTag(tag); > tag.put("test","123"); > } > }); > tester.assertResultPage("icket:id=\"lableId\" test=\"123\">content"); > assertEquals("icket:id=\"lableId\" test=\"123 > \">content",tester.getLastResponseAsString()); > assertEquals("",tester.getResponse().getDocument()); > } > > > > > > expose IMHO a very strange result. As you can see, the page content > returned by getPastResponseAsString() is > "icket:id=\"lableId\" test=\"123\">content" , so somehow cut in the > middle. > > I want to use a similar test, testing a extension of Label. > > Do I do something wrong by starting a component (without explicit page) > like > > tester.startComponentInPage(new Label("lableId", "content"): > > > Thanks for any help, > > Carsten -- 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
Re: Message piggybacking vs polling
Hi, You can also check Wicket-Atmosphere integration for Wicket6. For now it is in a separate Git branch but if you find it useful for your use case then you can send your feedback. On Wed, Apr 18, 2012 at 10:33 AM, Jürgen Lind wrote: > Hi Martin, > > thank you for the quick response. The onEvent Method was the part I was > looking for... A > quick check showed me that this should work as I would like it to... > > BTW: I think Wicket is a real great piece of Software... > > Cheers, > > J. > > > > On 18.04.2012 09:15, Martijn Dashorst wrote: >> >> Reserve a hidden part of your pages to render the messages, and create >> some javascript kung fu to read those messages and display them in >> some way. Create an onEvent() handler that adds the messages container >> to the ajax request target, and calls your javascript kung fu master. >> See the wiki for the event bus mechanism of 1.5 for more information >> >> Martijn >> >> On Wed, Apr 18, 2012 at 9:08 AM, Jürgen Lind >> wrote: >>> >>> Hi, >>> >>> I am currently evaluating my options for (semi) pro-active messages to >>> the >>> user. The first >>> idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages >>> for the user. Since >>> this might put quite some unnecessary load on the server, I was thinking >>> about using the >>> current request to piggyback the messages. The idea is quite simple: >>> >>> 1. I have a component in thebase page that shows the messages (if >>> present) >>> to the user >>> >>> 2. An update of this component is added to every Ajax-request the user >>> makes. >>> >>> Now comes the tricky bit: what is the best approach to implementing this? >>> I >>> was thinking >>> about adding the code for updating the component into the >>> RequestCycleListener. That leads >>> to the fist question on how to access the current Ajax request target >>> there. >>> I found the API >>> call to check whether a request is an Ajax request, but no way to get the >>> AjaxRequestTarget... >>> >>> The second question is, how to access the component. I could either place >>> a >>> reference to it in >>> the WebSession (is that a good idea?) or I would need way to access the >>> current page to get it >>> from there. How could I do that within the RequestCycleListener? >>> >>> The third and final question is, whether all that stuff does make any >>> sense >>> at all - perhaps there >>> are even better ways to do what I want... >>> >>> Any help would be appreciated... >>> >>> Cheers, >>> >>> J. >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> >> > > > -- > Mit freundlichen Grüßen, > > Jürgen Lind > > -- > Dr. Jürgen Lind > iteratec GmbH Fon: +49 (0)89 614551-44 > Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 > 82008 Unterhaching Web: www.iteratec.de > > Sitz und Registergericht der iteratec GmbH: München HRB 113 519 > Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel > > > - > 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
Re: Message piggybacking vs polling
Hi Martin, thank you for the quick response. The onEvent Method was the part I was looking for... A quick check showed me that this should work as I would like it to... BTW: I think Wicket is a real great piece of Software... Cheers, J. On 18.04.2012 09:15, Martijn Dashorst wrote: Reserve a hidden part of your pages to render the messages, and create some javascript kung fu to read those messages and display them in some way. Create an onEvent() handler that adds the messages container to the ajax request target, and calls your javascript kung fu master. See the wiki for the event bus mechanism of 1.5 for more information Martijn On Wed, Apr 18, 2012 at 9:08 AM, Jürgen Lind wrote: Hi, I am currently evaluating my options for (semi) pro-active messages to the user. The first idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages for the user. Since this might put quite some unnecessary load on the server, I was thinking about using the current request to piggyback the messages. The idea is quite simple: 1. I have a component in thebase page that shows the messages (if present) to the user 2. An update of this component is added to every Ajax-request the user makes. Now comes the tricky bit: what is the best approach to implementing this? I was thinking about adding the code for updating the component into the RequestCycleListener. That leads to the fist question on how to access the current Ajax request target there. I found the API call to check whether a request is an Ajax request, but no way to get the AjaxRequestTarget... The second question is, how to access the component. I could either place a reference to it in the WebSession (is that a good idea?) or I would need way to access the current page to get it from there. How could I do that within the RequestCycleListener? The third and final question is, whether all that stuff does make any sense at all - perhaps there are even better ways to do what I want... Any help would be appreciated... Cheers, J. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Message piggybacking vs polling
Reserve a hidden part of your pages to render the messages, and create some javascript kung fu to read those messages and display them in some way. Create an onEvent() handler that adds the messages container to the ajax request target, and calls your javascript kung fu master. See the wiki for the event bus mechanism of 1.5 for more information Martijn On Wed, Apr 18, 2012 at 9:08 AM, Jürgen Lind wrote: > Hi, > > I am currently evaluating my options for (semi) pro-active messages to the > user. The first > idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages > for the user. Since > this might put quite some unnecessary load on the server, I was thinking > about using the > current request to piggyback the messages. The idea is quite simple: > > 1. I have a component in thebase page that shows the messages (if present) > to the user > > 2. An update of this component is added to every Ajax-request the user > makes. > > Now comes the tricky bit: what is the best approach to implementing this? I > was thinking > about adding the code for updating the component into the > RequestCycleListener. That leads > to the fist question on how to access the current Ajax request target there. > I found the API > call to check whether a request is an Ajax request, but no way to get the > AjaxRequestTarget... > > The second question is, how to access the component. I could either place a > reference to it in > the WebSession (is that a good idea?) or I would need way to access the > current page to get it > from there. How could I do that within the RequestCycleListener? > > The third and final question is, whether all that stuff does make any sense > at all - perhaps there > are even better ways to do what I want... > > Any help would be appreciated... > > Cheers, > > J. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Message piggybacking vs polling
Hi, I am currently evaluating my options for (semi) pro-active messages to the user. The first idea was to use an AjaxSelfUpdatingTimerBehavior to poll for new messages for the user. Since this might put quite some unnecessary load on the server, I was thinking about using the current request to piggyback the messages. The idea is quite simple: 1. I have a component in thebase page that shows the messages (if present) to the user 2. An update of this component is added to every Ajax-request the user makes. Now comes the tricky bit: what is the best approach to implementing this? I was thinking about adding the code for updating the component into the RequestCycleListener. That leads to the fist question on how to access the current Ajax request target there. I found the API call to check whether a request is an Ajax request, but no way to get the AjaxRequestTarget... The second question is, how to access the component. I could either place a reference to it in the WebSession (is that a good idea?) or I would need way to access the current page to get it from there. How could I do that within the RequestCycleListener? The third and final question is, whether all that stuff does make any sense at all - perhaps there are even better ways to do what I want... Any help would be appreciated... Cheers, J. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org