Re: How to remove css class from a component?
Hi, Two alternative solutions: - If you want the CSS class be appened only in one response then set the AttributeAppender as "temporary" ...new AttributeAppender(...) { @Override isTemporary() { return true} } }... - Or disable/enable AttributeAppender as needed by overriding isEnabled() method of it: ...new AttributeAppender(...) { @Override isEnabled() { return inputComponent.getFeedbackMessage() != null } }... Cheers, Zoltan On 06/16/2010 07:48 AM, David Chang wrote: Jeremy, glad to hear from you! My situation is a little different. The CSS class is added in the following way. Please see the following code. protected void onBeforeRender() { super.onBeforeRender(); if (inputComponent.getFeedbackMessage() != null) { inputComponent.add(new AttributeAppender("class", new Model("errorField"), " ")); } else { // how to remove CSS class here?? } } Thanks! --- On Wed, 6/16/10, Jeremy Thomerson wrote: From: Jeremy Thomerson Subject: Re: How to remove css class from a component? To: users@wicket.apache.org Cc: "John Krasnay" Date: Wednesday, June 16, 2010, 1:40 AM onComponentTag(...) { tag.remove("class"); } On Wed, Jun 16, 2010 at 12:37 AM, David Changwrote: Hello, I add a CSS class to component dynamcially the following way: inputComponent.add(new AttributeAppender("class", new Model("errorField"), " ")); How can I remove this CSS class in java code? Best! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.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
Bigger sites running on wicket?
Dear All, I'm quite fond of wicket so far, but to convince my boss further using it: I would need some samples of bigger sites or portals running on wicket. If you know such - something like 100s of concurrent users, or big number of users- please send me links and information. If possible some technical details would be nice too. Thanks, Zoltan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: building tons of ajax links
Hi, Do something like this: * create a form with hidden field(s) and a hidden submit-button, and configure this button to be ajax-submitted. * on page onload scan the DOM, and attach an onclick event handler to all the "tons" of links you want to do something on ajax. I'd use some javascript framework like JQuery or YUI to bind these event handlers, but some plain js code will do too. * when such a link is clicked, then put the parameters into the hidden fields of your ajax-form, and call the "click" or "submit" method of its button. If you really have 100s/1000s of such ajax links then you may consider using event delegation for better performance in the browser. But first just do the simple stuff. See: http://developer.yahoo.com/yui/examples/event/event-delegation.html Cheers, Zoltan Douglas Ferguson wrote: well the specs are for ajax. they want the controls to not get redrawn just the data table. which looks awesome when they click on the controls and see the list change quickly. I made the links external links and applied the same behavior to all of them using "getComplent().getParent().getModel()" That seemed to make things a little better... D/ On Dec 10, 2009, at 1:49 AM, Per Lundholm wrote: ... or do not use ajax ... what happens when you click ... are you not taken to a search result ... might as well redraw the page. /Per On Thu, Dec 10, 2009 at 7:47 AM, Douglas Ferguson < doug...@douglasferguson.us> wrote: I'm supporting some code that builds an ajax link per "tag" aka. tag cloud. When there are tons of tags, this can take quite some time. My guess is all the overhead in having wicket build all the callbacks for each link. Is there a way to implement a group of ajax links that share the same callback? D/ - 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: wicket on Weblogic 10.3.1
Dear All, Solved now; describing the solutin now for future if anybody suffers from the same; the page expired exceptions are caused by the JSESSIONID, which got mixed up with the Tomcat's JSESSIONID. The best option is to use a different cookie with WebLogic when testing the same app on WebLogic and Tomcat. Just put this to weblogic.xml: WEBLOGIC_JSESSION_ID Cheers, Zoltan zoltan luspai wrote: Dear All, Thanks for the help so far; one of my problem was indeed a misconfig in the dns (hosts file), funny that tomcat worked that way. The next problem was -solved now- that the ajax requests did not work at all, because weblogic is always adding "index.jsp" into the ajax urls, so they will look like " //index.jsp?wicket:interface=..." instead of the correct " /cb/?wicket:interface=:". This happens because the wicket filter is mounted on "/*" and there is no in the web.xml. The fix is to add this to web.xml: / Now, my problem is that the ajax calls always respond with page-expired exception. Any hints on that? Thanks, Zoltan Edward Zarecor wrote: When you start up what ports and addresses does Weblogic say it's listening on: grep for "is now listening" I'd recommend capturing the headers with live headers or something similar and seeing what differs between access via localhost and 127.0.0.1. That those differ suggests a DNS/hosts issue to me. Ed. On Tue, Nov 24, 2009 at 9:06 AM, zoltan luspai wrote: I'm going directly to weblogic, which is running locally all configured to default, it is all on the same host, no apache and no proxies in between. Z Edward Zarecor wrote: Are you using Apache with the Weblogic plugin? If so, do you see the same behavior if you go directly against Weblogic? Can you confirm that subsequent requests are actually being handled by the app server? I ask because we've seen cases where URL mangling caused requests that should have mapped to our wicket app not being properly proxied by the Weblogic plugin. The result was an Apache error as it couldn't handle the request itself and wasn't forwarding it. Ed. On Tue, Nov 24, 2009 at 4:11 AM, zoltan luspai wrote: Hi All, Anybody has experience with wicket running on Weblogic 10.3.1? Any hints about? I'm having some problem with that wicket pages does not seem to handle page events properly, for example the first render of the page is fine, but if I click on a button that does not seem to go to the next page. Sorry for being foggy here; the thing is being investigated now... Thanks, Zoltan - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket on Weblogic 10.3.1
Dear All, Thanks for the help so far; one of my problem was indeed a misconfig in the dns (hosts file), funny that tomcat worked that way. The next problem was -solved now- that the ajax requests did not work at all, because weblogic is always adding "index.jsp" into the ajax urls, so they will look like " //index.jsp?wicket:interface=..." instead of the correct " /cb/?wicket:interface=:". This happens because the wicket filter is mounted on "/*" and there is no in the web.xml. The fix is to add this to web.xml: / Now, my problem is that the ajax calls always respond with page-expired exception. Any hints on that? Thanks, Zoltan Edward Zarecor wrote: When you start up what ports and addresses does Weblogic say it's listening on: grep for "is now listening" I'd recommend capturing the headers with live headers or something similar and seeing what differs between access via localhost and 127.0.0.1. That those differ suggests a DNS/hosts issue to me. Ed. On Tue, Nov 24, 2009 at 9:06 AM, zoltan luspai wrote: I'm going directly to weblogic, which is running locally all configured to default, it is all on the same host, no apache and no proxies in between. Z Edward Zarecor wrote: Are you using Apache with the Weblogic plugin? If so, do you see the same behavior if you go directly against Weblogic? Can you confirm that subsequent requests are actually being handled by the app server? I ask because we've seen cases where URL mangling caused requests that should have mapped to our wicket app not being properly proxied by the Weblogic plugin. The result was an Apache error as it couldn't handle the request itself and wasn't forwarding it. Ed. On Tue, Nov 24, 2009 at 4:11 AM, zoltan luspai wrote: Hi All, Anybody has experience with wicket running on Weblogic 10.3.1? Any hints about? I'm having some problem with that wicket pages does not seem to handle page events properly, for example the first render of the page is fine, but if I click on a button that does not seem to go to the next page. Sorry for being foggy here; the thing is being investigated now... Thanks, Zoltan - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket on Weblogic 10.3.1
I'm going directly to weblogic, which is running locally all configured to default, it is all on the same host, no apache and no proxies in between. Z Edward Zarecor wrote: Are you using Apache with the Weblogic plugin? If so, do you see the same behavior if you go directly against Weblogic? Can you confirm that subsequent requests are actually being handled by the app server? I ask because we've seen cases where URL mangling caused requests that should have mapped to our wicket app not being properly proxied by the Weblogic plugin. The result was an Apache error as it couldn't handle the request itself and wasn't forwarding it. Ed. On Tue, Nov 24, 2009 at 4:11 AM, zoltan luspai wrote: Hi All, Anybody has experience with wicket running on Weblogic 10.3.1? Any hints about? I'm having some problem with that wicket pages does not seem to handle page events properly, for example the first render of the page is fine, but if I click on a button that does not seem to go to the next page. Sorry for being foggy here; the thing is being investigated now... Thanks, Zoltan - 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: wicket on Weblogic 10.3.1
Hi, Nothing fancy like that; no replication, just a simple localhost installation for development and testing. The stack is a bit of a weird mix, mostly legacy jsp/struts pages, decorated using sitemesh, plus few wicket pages yet also decorated by sitemesh (plus some hacking to include jsp fragments; don't ask ;-). What I see now that if I use the "http://localhost:7001/x"; url then any "POST" request will just fail, for example validation of some component is not called, but if I use the ip address like "http://127.0.0.1/x"; urls then it is just fine. Any hints on that? The same stuff is fine with tomcat. Btw; I'm on linux and localhost corretly resolves to 127.0.0.1. Cheers ( and sorry if that goes off-topic ) Zoltan Doug Leeper wrote: We've had no problems on our implementation. Even session replication works as expected. What is your stack? Are you doing stick sessions? Have you enabled session replication? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket on Weblogic 10.3.1
Hi All, Anybody has experience with wicket running on Weblogic 10.3.1? Any hints about? I'm having some problem with that wicket pages does not seem to handle page events properly, for example the first render of the page is fine, but if I click on a button that does not seem to go to the next page. Sorry for being foggy here; the thing is being investigated now... Thanks, Zoltan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Tree-table css/layout problem when the label of the tree-node is long
Dear Wicketeers, I am using the wicket's "standard" tree-table widget, and it works fine; except when a tree-node has longer (wider) text which does not fit to the available space, then this text becomes invisible. Any ideas how to fix this, preferably using some css alterations? The label should appear, but it should be just clipped (no scrollbars etc...). Thanks in advance. Zoltan
Tree-table css/layout problem when the label of the tree-node is long
Dear Wicketeers, I am using the wicket's "standard" tree-table widget, and it works fine; except when a tree-node has longer (wider) text which does not fit to the available space, then this text becomes invisible. Any ideas how to fix this, preferably using some css alterations? The label should appear, but it should be just clipped (no scrollbars etc...). Thanks in advance. Zoltan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxFormSubmitBehavior throws an NullPointerException when the getForm() is overridden
Hi, I have an AjaxFormSubmitBehavior where I don't pass the form parameter in the constructor, but have overridden the getForm() method to find the related form. (The form is not parent of the button this behavior is attached to, so can not be found by the behavior itself). When I "click" on the button attached, the form is submitted nicely, but after the onSubmit call I get this exception: java.lang.NullPointerException at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:142) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:166) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:299) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:113) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) Having a look at the source it seems there is a but at this line in AjaxFormSubmitBehavior: @Override protected void onEvent(AjaxRequestTarget target) { ... if (form.findParent(Page.class) != null) ... } I think that should be : ... getForm().findParent(Page.class) unless, there is a good reason not to be so? Btw; I am using wicket version 1.4rc4. Cheers Zoltan