WicketTester and https
hi, is there a way to test Pages that have the @RequireHttps annotation? currently the code getTester().startPage(RegisterPage.class); getTester().assertRenderedPage(RegisterPage.class); results in this Exception: junit.framework.AssertionFailedError: page was null at org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:621) at org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:569) (using wicket 1.4.10) I suppose this is due to the redirect it performs. 1 is there a way to test @RequireHttps pages and 2 wouldn't make a WicketTester.assertRedirect or WicketTester.assertHttpsRedirect would make sense for such scenarios? cheers, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Shouldn't an IConverter also work for StringResourceModels?
Hi, I've got an entry in a properties file that looks like this: text=I'll pay ${moneyAmount} where moneyAmount is an Object like the one below public class MoneyAmount { long amount; // getters and setters } I registered a converter in the Application that does the formatting depending on locale whenever I use a PropertyModel or a simple Model (i.e. whenever getModelObjectAsString gets invoked). However when using a StringResourceModel, or Component#getString() the IConverter won't be invoked and a simple MoneyAmount.toString will show up as replacement of ${moneyAmount} (on PropertyVariableInterpolator on line 90 btw.). Shouldn't there be a lookup for the converter or am I missing something and there's an easier way? cheers, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Shortening a wicket:message
Hey, I have a component that constructs a wicket:message just like Erik does in his blog post (http://day-to-day-stuff.blogspot.com/2008/05/wicket-internationalization.html) the .html is as follows: wicket:message key=sentence wicket:container wicket:id=userComponent/wicket:container wicket:container wicket:id=actionComponent/wicket:container wicket:container wicket:id=targetComponent/wicket:container wicket:container wicket:id=donationTarget/wicket:container /wicket:message the .properties file is the following: sentence=${userComponent}: I'll ${actionComponent} if ${targetComponent} ${donationTarget}. # replaces ${userComponent} in 'sentence' userComponentText=${user.firstname} ${user.lastname} # replaces ${actionComponent} in 'sentence' actionComponentText.action=${sentenceActionText} # replaces ${targetComponent} in 'sentence' targetComponentText=${targetGroup} pay ${sum} Euros to ${target} this results in nice sentences based on various cases handled in the java file - an example output might be: John Jones: I'll climb on the highest mountain if my friends pay 100 Euros to my Auntie My problem now is, that on some pages the output should be shortened, so the above sentence should be something like: John Jones: I'll climb on the highest mountain if my friends ... or John Jones: I'll climb on the highest mountain if my friends pay 100 Euros to Anyone got an idea? cheers, Michael - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Unnecessary method calls in IDataProvider?
done: https://issues.apache.org/jira/browse/WICKET-2568 regards, igor.vaynberg wrote: jira issue please -igor On Mon, Nov 9, 2009 at 5:53 AM, Michael Sparer michael.spa...@gmx.at wrote: Hey, I could have sworn that if a IDataProvider used in a DataView returns 0 as size, the iterator(int,int) method won't be called. But that assumption proved me wrong some minutes ago. Is there any specific reason why iterator gets called when the only possible result is an empty Iterator? Wouldn't it be more sensible to assume an empty iterator if size() returns 0 and leave out the method call? regards, - 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 - Michael Sparer http://techblog.molindo.at -- View this message in context: http://old.nabble.com/Unnecessary-method-calls-in-IDataProvider--tp26266771p26282885.html Sent from the Wicket - User 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
Unnecessary method calls in IDataProvider?
Hey, I could have sworn that if a IDataProvider used in a DataView returns 0 as size, the iterator(int,int) method won't be called. But that assumption proved me wrong some minutes ago. Is there any specific reason why iterator gets called when the only possible result is an empty Iterator? Wouldn't it be more sensible to assume an empty iterator if size() returns 0 and leave out the method call? regards, - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: passing a session to a wizard
sounds like a detached object. the interesting part would be where you got the object from. if you're using OpensessionInViewFilter (and therefore a session is during the whole request), it's likely that the object stays in the session between requests - you should use LoadableDetachableModels then ... Steve Olara wrote: Hello All, I have been trying to design functionality of a webapp using wizard. I need to pass a object (Questionnaire) to the wizard page, the object contains a set of questions. on passing the object, when I try to pick the set of questions using q.getqn() where q is the object, a null set is returned and I get a error saying: LazyInitializationException:19 - failed to lazily initialize a collection of role: questionnaire.model.Questionnaire.qn, no session or session was closed I have searched and found lots of articles about this error but I guess my programming is still imature cause I seem not to get this to work yet. Below is my code is there a way of passing the previous session to this class. public final class AnswerWizard extends Wizard { public AnswerWizard(String id, Questionnaire q) { super(id); // create a model with a couple of custom panels // still not that spectacular, but at least it // will give you a hint of how nice it is to // be able to work with custom panels WizardModel model = new WizardModel(); Set questions = q.getQn(); Iterator iter = questions.iterator(); System.out.println(Testing55: ); for (;iter.hasNext();) { Question qn = (Question) iter.next(); if (qn instanceof QuestionShortAns) { model.add(new StepQSA((QuestionShortAns) qn)); } else if (qn instanceof QuestionSingleSelect) { model.add(new StepQSS((QuestionSingleSelect) qn)); } else if (qn instanceof QuestionMatch) { model.add(new StepQm((QuestionMatch) qn)); } } // initialize the wizard init(model); } private static final class StepQSS extends WizardStep { /** * Construct. */ public StepQSS(QuestionSingleSelect qn) { super(One, The first step); } } private static final class StepQSA extends WizardStep { /** * Construct. */ public StepQSA(QuestionShortAns qn) { super(Two, The second step); } } private static final class StepQm extends WizardStep { /** * Construct. */ public StepQm(QuestionMatch qn) { super(Three, The third step); } } public void onCancel() { //setResponsePage(Index.class); } /** * @see org.apache.wicket.extensions.wizard.Wizard#onFinish() */ public void onFinish() { // setResponsePage(Index.class); } } Any Help will be highly appreciated - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Re%3A-passing-a-session-to-a-wizard-tp24569201p24572534.html Sent from the Wicket - User 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: Getting a JS confirmation when uploading via Ajax
I hope you're aware of the fact that File transfer by means of ajax won't work and you're using something like an iframe. to get rid of the confirmation, add the following: add(new HeaderContributor(new IHeaderContributor() { private static final long serialVersionUID = 1L; public void renderHead(final IHeaderResponse response) { response.renderOnDomReadyJavascript(Wicket.Window.unloadConfirmation = false;); } })); regards, Michael HHB wrote: Hey, I'm uploading a file via Ajax, I literally copied the Wicket sample application. The uploading form is included in a modal window. Upon clicking on the upload button, I got a JavaScript dialog: ++ Are you sure you want to navigate from this page? Reloading this page will cause the modal window to disappear. Press Ok to continue, or Cancel to stay on the current page. ++ Why I'm getting this JavaScript confirmation dialog? Is there a way to get ride of it? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Getting-a-JS-confirmation-when-uploading-via-Ajax-tp24167696p24186854.html Sent from the Wicket - User 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
Ajax components on error pages
I stumbled across a tiny problem today - i have an ajax LoginForm on each page which either displays an error message or performs a redirect after login. this works on all pages - except on errorpages the Ajax-debug console throws an error (Received Ajax response with code: 404) after correctly performing the login process on server side. I'm not sure if a 404 should be returned there and if it wouldn't be better if a 200 was returned if it's an ajax request. To make things short: is this behaviour intended, should more options be offered (e.g. a flag on ajaxcomponents where a 200 gets returned anyway) and/or should I raise a JIRA issue for that? regards, Michael PS: As a workaround I did the following in the onSubmit of my ajaxform: if (page instanceof IErrorPage) { final BufferedWebResponse res = (BufferedWebResponse) RequestCycle.get().getResponse(); if (res.isAjax()) { res.getHttpServletResponse().setStatus(HttpServletResponse.SC_OK); } } - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Ajax-components-on-error-pages-tp22741192p22741192.html Sent from the Wicket - User 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: AutoCompleteTextField and accentuated characters
it isn't the 'wrong character' it's é in UTF8 which is perfectly fine -so you end up with an é at the end of the line - so what's the problem again? :-) regards, Michael tleveque wrote: Hi, I have a problem AutoCompleteTextField and accentuated characters. When I type characters within the us-ascii set, there is no problem, but as soon as I use other characters (like 'é'), it doesn't work. The wrong character is received. With the Ajax debugger I can see that what is sent is wrong (or maybe encoded?). For a 'é', it sends is '%C3%A9'. That what is received as the parameter of the getChoices method. Is there something I can do about that? I am using Wicket 1.3.5 Thanks... - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/AutoCompleteTextField-and-accentuated-characters-tp22637037p22661278.html Sent from the Wicket - User 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: AutoCompleteTextField and accentuated characters
i can't reproduce your problem, if I send café up to the server caf%C3%A9 gets send and I receive café at the end of the line ... tleveque wrote: The problem is that with any other form fields, what is saved in my models is fine. All the accentuated characters are fine. If I output (in a log file for example) the content of a string field, I can see the accentuated character. But with the AutocompleteTextField, if I try to do that in the getChoice method, the input parameter output is still encoded. So I am unable to compare the string with what I have in my db. You say that it is actually UTF-8 in the request. Good that is what I thought first, but why in the java code it is not interpreted correctly? From what I remember, Java string are always in UTF-8. No? Thierry On Mon, Mar 23, 2009 at 10:30, Michael Sparer michael.spa...@gmx.at wrote: it isn't the 'wrong character' it's é in UTF8 which is perfectly fine -so you end up with an é at the end of the line - so what's the problem again? :-) regards, Michael tleveque wrote: Hi, I have a problem AutoCompleteTextField and accentuated characters. When I type characters within the us-ascii set, there is no problem, but as soon as I use other characters (like 'é'), it doesn't work. The wrong character is received. With the Ajax debugger I can see that what is sent is wrong (or maybe encoded?). For a 'é', it sends is '%C3%A9'. That what is received as the parameter of the getChoices method. Is there something I can do about that? I am using Wicket 1.3.5 Thanks... - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/AutoCompleteTextField-and-accentuated-characters-tp22637037p22661278.html Sent from the Wicket - User 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 - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/AutoCompleteTextField-and-accentuated-characters-tp22637037p22662019.html Sent from the Wicket - User 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: paging in wicket
somehow wicketstuff got problems, but the same examples are also on wicket-library.com - have a look at the ajax pager http://www.wicket-library.com/wicket-examples/ajax/pageables.1 ... and everything should be clear :-) regards, michael Douglas Ferguson-2 wrote: I was hunting for docs on how to do paging and discovered this: http://www.wicketstuff.org/wicket13/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.PagingPage Also, Anybody know of any good resources on the topic? - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/paging-in-wicket-tp22428753p22429970.html Sent from the Wicket - User 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: Button onSubmit not called, instead page reloads
the page reloading itself is expected behaviour as the form gets submitted, the onSubmit() method should however be called. if you provided us some more code (and the wicket version you're using)? regards, Michael Edwin Ansicodd wrote: Have a page that extends another page that in turn extends org.apache.wicket.markup.html.WebPage. Have added a form that extends org.apache.wicket.markup.html.form.Form to this page. In this form, I have a org.apache.wicket.markup.html.form.Button Button searchButton = new Button(searchButton){ @Override public void onSubmit() { super.onSubmit(); System.out.println(in searchButton); SearchPage.this.updateList(); } in the html for the button: input type=submit wicket:id=searchButton value=submit/ but when I click the button, instead of calling the onSubmit(), the page itself is reloaded. Would anyone have any ideas what might be wrong? - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Button-onSubmit-not-called%2C-instead-page-reloads-tp22350921p22351127.html Sent from the Wicket - User 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: Button onSubmit not called, instead page reloads
alright, then show us more code :-) ... and I'd recommend upgrading to 1.3.5 anyway ... Edwin Ansicodd wrote: I'm using Wicket 1.3.0 Michael Sparer wrote: the page reloading itself is expected behaviour as the form gets submitted, the onSubmit() method should however be called. if you provided us some more code (and the wicket version you're using)? regards, Michael - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Button-onSubmit-not-called%2C-instead-page-reloads-tp22350921p22351487.html Sent from the Wicket - User 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: Button onSubmit not called, instead page reloads
i just tested your code and it worked for me. maybe there's something wrong in the basepage? or in the markup? Edwin Ansicodd wrote: Some more code: public class SearchPage extends BasePage { private String name = ; public SearchPage(PageParameters parameters) { super(parameters); // TODO Auto-generated constructor stub init(); } private void init() { Form form = new SearchForm(searchForm); getContentContainer().addOrReplace(form); getContentContainer().addOrReplace(new Label(result,).setVisible(false)); } class SearchForm extends Form{ public SearchForm(String id){ super(id); TextField Name = new TextField(search.tf.name, new PropertyModel(SearchPage.this, name)); add(Name); Button searchButton = new Button(searchButton){ @Override public void onSubmit() { super.onSubmit(); System.out.println(in searchButton); SearchPage.this.updateList(); } }; add( searchButton ); } public void onSubmit(){ //do nothing extra } @Override public boolean isVersioned() { return false; } } ´ public String getPageTitleKey() { return searchpage.pagetitle; } public String getPageContextKey() { return searchpage; } @Override public String getContentWidth() { return 850px; } public String getname() { return name; } public void setname(String name) { this.name = name; } } Michael Sparer wrote: the page reloading itself is expected behaviour as the form gets submitted, the onSubmit() method should however be called. if you provided us some more code (and the wicket version you're using)? regards, Michael - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Button-onSubmit-not-called%2C-instead-page-reloads-tp22350921p22354350.html Sent from the Wicket - User 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: Switching between markup files for borders
http://cwiki.apache.org/WICKET/newuserguide.html#Newuserguide-LocaleandStyle regards Anton Veretennikov wrote: Hi! I have a problem with theme support for borders. I want to exchange real markup of border depending on theme name, for example: RoundedCornerBorder_black.html RoundedCornerBorder_white.html How to do this in Wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Switching-between-markup-files-for-borders-tp22206100p22207458.html Sent from the Wicket - User 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: AW: Avoid serialization troubles with static members
if the org.apache is missing, you're using an old version of wicket. check your dependencies for 1.2 versions (the version before wicket moved to apache) for the DI stuff: I'm using the annotation approach throughout my applications and never had any problems regards, Michael christian.helmbold wrote: Thanks for your answer. Wouldn't it be sufficient to use a static member to hold a reference to a service? i.e. public class SomeWicketComponent{ private static MyService service; // ... } How would you intialize these? Would you have a static getter, and force yourself to remember to always use it? Or would you have a static setter and centralize the initialization code somewhere else? Either way sounds ugly to me. This is the DI problem, but in this step I only regarded the serialization problem. I wanted to fetch object as you described it: MyService svc = (MyService) MyApp.getBean(myService); Let's see, where to start... - it's ugly - the cast and the bean name can fail in a way that is only detectable at runtime - it ties all your components to your application class - it's difficult to test, since you need to mock up a MyApp instance for your component to work You're right. My solution is like a solution without DI and with all the dependency troubles DI should avoid. What don't you like about them? Annotations are often missused and they bring a declarative programming style to Java. Sometimes you don't know what happens in the background. A programm can better be understood if you can follow the instruction instead of guessing how annotions will be interpreted. I think of Spring MVC where a @Controller exists. It indicates that you want the class to be a controller. But you don't see how the controller must look like, you don't see that you need other annotations to get your controller working. The old style with extendig some framework classes are much more readable but a bit more verbose. But there are also some good use cases for annotations like JPA and maybe the mentonioned annotation to integrate Spring in Wicket. I tried to use Spring integration but failed. I wonder about the class org.apache.wicket.spring.injection.annot.SpringComponentInjector mentioned in the API doc. This class does not exist! I've only found wicket.spring.injection.annot.SpringComponentInjector. The missing org.apache should be irrelevant, but the following example doesn't work: package some.package; import org.apache.wicket.Page; import org.apache.wicket.protocol.http.WebApplication; import wicket.spring.injection.annot.SpringComponentInjector; public class WickiApplication extends WebApplication { @Override public void init() { addComponentInstantiationListener(new SpringComponentInjector(this)); } // ... } The compiler says: cannot find symbol. symbold: constructor SpringComponentInjector(...) SpringComponentInjector is on the classpath, the import is correct, but it doesn't work. Have you any idea why? Thanks. Christian -- http://www.groovy-forum.de - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles-with-static-members-tp22082899p22097988.html Sent from the Wicket - User 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: AW: AW: Avoid serialization troubles with static members
then I'd recommend using maven (or similar) :-) managing all dependencies manually seems to me quite masochistically and yepp, you're using an old version of spring integration then ... christian.helmbold wrote: if the org.apache is missing, you're using an old version of wicket. I use Wicket 1.4 RC2. Maybe I use an old version (1.2.7) of the Spring integration. Where can I get the current version? http://cwiki.apache.org/WICKET/spring.html says nothing about where to download it (without maven).. Regards, Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Avoid-serialization-troubles-with-static-members-tp22082899p22098368.html Sent from the Wicket - User 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: Making an invisible panel visible via AjaxLink
put the panel in an additional container and add this container WebmarkupContainer div = new WebmarkupContainer(cont); div.setOutputMarkupId(true); div.add(registeredUserPanel.setVisible(false)); then in the onclick stuff registeredUserPanel.setVisible(true); target.addComponent(div); that should do the trick hth, michael rjilani wrote: Hi: Gurus I am trying to make an invisible panel visible via Ajax link, but got stuck at a point where I don't know how to proceed further. Please see the code snipet below final RegisteredUserPanel registeredUserPanel = new RegisteredUserPanel(registrationPanel); add(registeredUserPanel); registeredUserPanel.setOutputMarkupId(true); registeredUserPanel.setVisible(false); add(new AjaxLink(registerLink) { @Override public void onClick(AjaxRequestTarget target) { registeredUserPanel.setVisible(true); target.addComponent(registeredUserPanel); } }); the problem is that when I call registeredUserPanel.setVisible(false), becuase by defualt I don't want this pannel to be visible; the wicket don't render the html markup for the pannel at all and hence the ajax calls fails becuase it don't find the markup to render the panel. Any suggestions how to tackle a situation like this. Regards, RJ - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Making-an-invisible-panel-visible-via-AjaxLink-tp22103906p22104028.html Sent from the Wicket - User 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: Making an invisible panel visible via AjaxLink
uff. yeah right :-) igor.vaynberg wrote: setoutputmarkupplaceholdertag that ernesto mentioned is the non-trick solution to your problem. -igor On Thu, Feb 19, 2009 at 8:39 AM, rjilani jil...@lifebiosystems.com wrote: Thanks Michael the trick worked like a charm. Best Regards, RJ. Michael Sparer wrote: put the panel in an additional container and add this container WebmarkupContainer div = new WebmarkupContainer(cont); div.setOutputMarkupId(true); div.add(registeredUserPanel.setVisible(false)); then in the onclick stuff registeredUserPanel.setVisible(true); target.addComponent(div); that should do the trick hth, michael rjilani wrote: Hi: Gurus I am trying to make an invisible panel visible via Ajax link, but got stuck at a point where I don't know how to proceed further. Please see the code snipet below final RegisteredUserPanel registeredUserPanel = new RegisteredUserPanel(registrationPanel); add(registeredUserPanel); registeredUserPanel.setOutputMarkupId(true); registeredUserPanel.setVisible(false); add(new AjaxLink(registerLink) { @Override public void onClick(AjaxRequestTarget target) { registeredUserPanel.setVisible(true); target.addComponent(registeredUserPanel); } }); the problem is that when I call registeredUserPanel.setVisible(false), becuase by defualt I don't want this pannel to be visible; the wicket don't render the html markup for the pannel at all and hence the ajax calls fails becuase it don't find the markup to render the panel. Any suggestions how to tackle a situation like this. Regards, RJ -- View this message in context: http://www.nabble.com/Making-an-invisible-panel-visible-via-AjaxLink-tp22103906p22104436.html Sent from the Wicket - User 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 - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Making-an-invisible-panel-visible-via-AjaxLink-tp22103906p22104792.html Sent from the Wicket - User 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
exception handling for session dependent URLs
I recently came across a link to one of my projects where a user linked to a session dependent URL such as /?wicket:interface=:0::IBehaviorListener:2:3 when clicking on that URL, a PageExpiredException gets thrown and a redirect to the SessionExpiredPage takes place. So far so good - that's the way it should be. However this works only for the first request (as long as the user doesn't have a session). If the user has a session and clicks on that link different exceptions might get thrown. with the URL mentioned above I've seen either a IllegalStateException (when it couldn't find a IBehaviorListener with the corresponding ID) or a ClassCastException (when it tried to cast a HeaderContributor to an IBehaviorListener in BehaviorRequestTarget). I must admit I didn't look into the code that thoroughly as I wanted to ask you first how you go about this problem (or it may be already fixed in 1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session dependent URLs in blogs etc. shouldn't result in server errors ... would it be save to throw e.g. a PageExpiredException instead of IllegalStateExceptions? Michael - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html Sent from the Wicket - User 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: exception handling for session dependent URLs
aye aye captain :-) https://issues.apache.org/jira/browse/WICKET-2107 igor.vaynberg wrote: please create a jira issue. -igor On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at wrote: I recently came across a link to one of my projects where a user linked to a session dependent URL such as /?wicket:interface=:0::IBehaviorListener:2:3 when clicking on that URL, a PageExpiredException gets thrown and a redirect to the SessionExpiredPage takes place. So far so good - that's the way it should be. However this works only for the first request (as long as the user doesn't have a session). If the user has a session and clicks on that link different exceptions might get thrown. with the URL mentioned above I've seen either a IllegalStateException (when it couldn't find a IBehaviorListener with the corresponding ID) or a ClassCastException (when it tried to cast a HeaderContributor to an IBehaviorListener in BehaviorRequestTarget). I must admit I didn't look into the code that thoroughly as I wanted to ask you first how you go about this problem (or it may be already fixed in 1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session dependent URLs in blogs etc. shouldn't result in server errors ... would it be save to throw e.g. a PageExpiredException instead of IllegalStateExceptions? Michael - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html Sent from the Wicket - User 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 - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22042612.html Sent from the Wicket - User 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: Adding/Replacing links in Panels
personally I'm no fan of conditional adding components with the same id. e.g. if (user.isSignedIn() { add(new SignedInPanel(foo)); else { add(new SignedOutPanel(foo)); } I rather add all panels and make them invisible or visible add(new SignedInPanel(foo).setVisible(user.isSignedIn()); // or override isvisible if that may change ... add(new SignedOutPanel(bar).setVisible(!user.isSignedIn()); this way you always know which panels are added to the page and what they are ... regards, Michael ashtek wrote: Hey All, I apologize for the long content - I have a navigation bar on the side that contains links to add Users, Permissions, Roles, etc... When a user clicks on a navigation link (say Users), a Users home page is displayed that contains a link to add users, and a list of all available users. The link to add users is a panel that contains wicket:link td # Add Users /td /wicket:link In each of the home pages I add the panel like this - On the User home page I add, add(new AddPanel(addPanel, AddPanel.USER)); On the Roles home page I add, add(new AddPanel(addPanel, AddPanel.ROLES)); And this is what I have in the AddPanel.class public AddPanel(String id, int addWhat) { super(id); switch (addWhat) { case USER: add(new BookmarkablePageLink(addLink, EditUsers.class)); case ROLES: case PERMISSIONS: add(new BookmarkablePageLink(addLink, EditPermissions.class)); default: } The Problem is, when I click on the Users homepage, and then I click on the Permissions home page, I get an error saying addLink already exists in the markup. Is there a better way to handle links than this? Thanks! - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Adding-Replacing-links-in-Panels-tp21989041p21995364.html Sent from the Wicket - User 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: What is the best way to handle Undefined attribute name (wicket:id) warnings from Eclipse Ganymede?
I'd say as currently there are no new tags in wicket 1.4 but there might be later on - so it's best to keep the versions apart ... michael Kent Larsson-3 wrote: On Tue, Feb 3, 2009 at 4:55 AM, Timo Rantalaiho timo.rantala...@ri.fiwrote: Nowadays there's also http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd Best wishes, Timo But those two are exactly the same (same size and same content, only the file names differ). Why are there two identical files? Best regards, Kent - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/What-is-the-best-way-to-handle-%22Undefined-attribute-name-%28wicket%3Aid%29%22--warnings-from-Eclipse-Ganymede--tp2179p21807039.html Sent from the Wicket - User 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: Google Adsense.
as the two others, I've never experienced problems using adsense code within a wicket app. But as you're saying that it only occurrs when deployed - maybe it's got to do something with development/deployment mode. Try switching to deployment mode when running on localhost, if it doesn't work then, you might be stripping something that shouldn't get stripped. (take a look at WebApplication#getMarkupSettings() http://www.wicketstuff.org/wicket13doc/org/apache/wicket/settings/IMarkupSettings.html) regards, Michael ej595 wrote: Hi all, im not sure if anyone else has any experience of using google adsense within your wicket html, but i seem to be finding that it interferes with the rendering of the wicket pages. By that i mean, if i include the adsense code in the html, when wicket renders the page i get this intermittent 'unable to find component X' error. It seems to be something to do with the time it takes to retrieve the actual advert and the rendering of the page via wicket. It never happens on localhost, but once the war has been deployed to a web environment, the logs are littered with this error and the html stack traces. Im not entirely sure what to do other than to remove the ad. Once i remove the ad, the page is fine. Id appreciate if anyone has any experience in this area of adsense and wicket. - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Google-Adsense.-tp21764673p21807132.html Sent from the Wicket - User 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: Implementing the cwiki's Calling Wicket from Javascript
if you fix the NullPointerException in your ErrorPage the original RuntimeException (which would possibly tell you what you were doing wrong) might had a chance to get through regards, Michael insom wrote: I'm trying to apply the concepts found here: http://cwiki.apache.org/confluence/display/WICKET/Calling+Wicket+from+Javascript . The code for my very simple test case is below. When I load the page, I expect to see hi printed to my console. Instead I get a NullPointerException (also shown below). What am I doing wrong? public class AjaxTestPage extends WebPage implements IHeaderContributor { final AbstractDefaultAjaxBehavior behave = new AbstractDefaultAjaxBehavior() { @Override protected void respond(AjaxRequestTarget target) { System.out.println(hi); } }; public AjaxTestPage() { add(behave); } @Override public void renderHead(IHeaderResponse response) { response.renderOnLoadJavascript( wicketAjaxGet(' + behave.getCallbackUrl() + ', function() { }, function() { }); ); } } java.lang.NullPointerException at com.insom.ErrorPage.init(ErrorPage.java:19) at com.insom.MyWebRequestCycle.onRuntimeException(MyWebRequestCycle.java:24) at org.apache.wicket.request.AbstractRequestCycleProcessor.onRuntimeException(AbstractRequestCycleProcessor.java:217) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:119) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1302) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:497) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:387) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Implementing-the-cwiki%27s-%22Calling-Wicket-from-Javascript%22-tp21815652p21816483.html Sent from the Wicket - User 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: CSS Arrangement Order
I'd say just write in in there ;-) Other possiblities are the use of HeaderContributors (see class HeaderContributor) also have a look at http://techblog.molindo.at/2008/08/wicket-interface-speed-up-merging-resources-for-fewer-http-requests.html which might interest you if a lot of your pages/panels come up with their own css regards, Michael TH Lim wrote: Hi, How do I arrange my CSS declaration order? For example, the current order is ... head ... some script tags removed link rel=stylesheet type=text/css href=css/style.css / link rel=stylesheet type=text/css href=resources/com.acme/box.css / link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css / /head body ... resources/com.acme/box.css and resources/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css are CSS included with the libraries / components I used in my web application. How do I make my own CSS,css/style.css, to be placed after these CSS in head? Thanks /lim/ - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/CSS-Arrangement-Order-tp21776162p21788633.html Sent from the Wicket - User 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: Unable to find resource: global.application.title for component
(LoadableDetachableModel.java:114) at org.apache.wicket.Component.getModelObject(Component.java:1510) at org.apache.wicket.Component.getModelObjectAsString(Component.java:1532) at org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:111) at org.apache.wicket.Component.renderComponent(Component.java:2419) ... 40 more - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Unable-to-find-resource%3A-global.application.title-for-component-tp21743684p21745201.html Sent from the Wicket - User 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: Ajaxified Notification
just wanted to add some starting points on cometd with wicket, as it isn't that easy to find: - how to get including sample app: http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-dojo-1.1 - matt raible on cometd: http://raibledesigns.com/rd/entry/dojo_comet_support_in_java - suggestion of providing in-depth examples for a small donation: http://techblog.molindo.at/2009/01/talk-on-tech-now-molindo-techblog.html (yes the last one was a bit of self-promotion, hope you don't mind ;-)) regards, Michael reiern70 wrote: Hi, On Fri, Jan 30, 2009 at 11:04 AM, PSkarthic kart...@touchpointindia.comwrote: Thank you for your reply. Ok i will try AbstractAjaxTimerBehavior but tell me can server notify the client on particular situation. With AJAX timer behavior is the client that periodically makes a round trip to the server to ask for something. What you want is a (comet/reverse AJAX) like thing. I have been using DWR (see 1 bellow) for such things but I think there is also support for dojo cometd (see 2) on dojo wicket stuff project. References 1-http://directwebremoting.org/ 2-http://cometdproject.dojotoolkit.org/ Best, Ernesto That is many browser(many client logged in) may opened and accessing the wicket application, at some when event occurs for particular client time the server has send the details to particular client browser can this be done. Thanks in advance Karthic -- View this message in context: http://www.nabble.com/Ajaxified-Notification-tp21742197p21744321.html Sent from the Wicket - User 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 - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Ajaxified-Notification-tp21742197p21745293.html Sent from the Wicket - User 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: DataView and increasing session size
the objects shouldn't be serialized into the session if you're using loadabledetachable models, please show us some code regards, Michael Jürgen Lind-2 wrote: Hi, I have a question on how the DataView component is supposed to work. In my application, I have to show quite large list of entities and so I am using a DataView together with LoadableDetachableModels to read the data on demand. However, when looking at the serialized sessions, I can observe that the session size constantly increases by a fairly large amount although I am just using the navigator to page through the list. Also, when looking into the serialized session, I can see that the objects that are supposed to be reloaded on demand are serialized into the session as well. Is this the behavior that I would expect from the DataView or am I making some mistake here? Regards, J. -- 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/DataView-and-increasing-session-size-tp21723557p21724558.html Sent from the Wicket - User 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: AW: getRequest().getPage() always null
sounds as if you want to implement your own authorization stuff - I'd suggest to have a look into wicket-auth-roles (and the examples). there's a lot already implemented and you don't have to hook into the requestcycle too much ... regards, Michael Arthur Leigh Allen wrote: Hello people, any explanation or suggestion? Is there a possible way to retrieve the page from the request cycle? There is the getPage() method but the result is always null. Why? I would appreciate any answers. Thx a lot Leigh Von: Dipu dipu@googlemail.com An: users@wicket.apache.org Gesendet: Mittwoch, den 21. Januar 2009, 17:46:38 Uhr Betreff: Re: getRequest().getPage() always null I think setting this get().getApplicationSettings().setPageExpiredErrorPage(StartPage.class) in your application's init method will solve your problem if i understand it correctly. regards Dipu On Wed, Jan 21, 2009 at 3:18 PM, Arthur Leigh Allen arthurleigh.al...@yahoo.de wrote: Hello wicket community, there is a second issue I don't know how to solve. Imagine the following situation: -User visits page -User logs in -User clones the browser window by pressing Strg+N (2 browser windows with logged-in-panels are shown now) -User logs out in second page -User closes second page -User calls a use case function for logged-in-users in a panel in first page (*) The aim is to navigate to the start page when the user tries the last action (*). My idea is to override the onBeginRequest method of the WebRequestCycle in the application class. Then check if the boolean member wasLoggedIn in my page is set to true and the boolean member isLoggedIn in the session is set to false. When this constellation happens, I would call the setResponsePage(StartPage.class) etc. The problem is: When I call getRequest().getPage() in the onBeginRequest method, the result is always null. Do you know how to get the page the request was initiated from? Best regards Leigh - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/getRequest%28%29.getPage%28%29-always-null-tp21585241p21724628.html Sent from the Wicket - User 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: DataView and increasing session size
DetachablePartnerAuftragModel(PartnerAuftrag auftrag, AuftragBA auftragBA) { this(auftrag.getAuftragsId(), auftragBA); } public DetachablePartnerAuftragModel(Long id, AuftragBA auftragBA) { this.id = id; this.auftragBA = auftragBA; } @Override protected Object load() { return this.auftragBA.findAuftragByAuftragsId(this.id); } @Override protected void onDetach() { super.onDetach(); } } Michael Sparer wrote: the objects shouldn't be serialized into the session if you're using loadabledetachable models, please show us some code regards, Michael Jürgen Lind-2 wrote: Hi, I have a question on how the DataView component is supposed to work. In my application, I have to show quite large list of entities and so I am using a DataView together with LoadableDetachableModels to read the data on demand. However, when looking at the serialized sessions, I can observe that the session size constantly increases by a fairly large amount although I am just using the navigator to page through the list. Also, when looking into the serialized session, I can see that the objects that are supposed to be reloaded on demand are serialized into the session as well. Is this the behavior that I would expect from the DataView or am I making some mistake here? Regards, J. -- 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 - Michael Sparer http://talk-on-tech.blogspot.com -- 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/DataView-and-increasing-session-size-tp21723557p21725913.html Sent from the Wicket - User 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: Focus on component
use target.(pre|append)Javascript if you want additional JS executed before/after doing the wicket-ajax stuff if you only want to set the focus (without any ajax involved), don't use ajaxlink, use e.g. a simple WebmarkupContainer hth, michael Philipp Daumke-2 wrote: Dear all, I try to show and focus on a text field when clicking on a link. The focus however doesn't work. I tried to follow an example in cwiki (http://cwiki.apache.org/WICKET/calling-javascript-function-on-wicket-components-onclick.html) but I somehow do something wrong. I tried to add some javascript attribute via AttributeAppender, but then I get a null pointer exception in onClick (target is null). When I comment that line out (so don't add the Attribute), everything works fine except that focus doesn't work. Any help appreciated. Thanks a lot Philipp Here's my code: in a WebMarkupContainer: link.add(new AttributeAppender(onClick, new Model(getElementById('+textfield.getMarkupId()+ ').onFocus();), ;)); in my custom Link Class: public void onClick(AjaxRequestTarget target) { showFormThatContainsTextField(target); } void showFormThatContainsTextField(AjaxRequestTarget target) { // toggle the visibility ... // redraw the add container. target.addComponent(this); } -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://techblog.molindo.at -- View this message in context: http://www.nabble.com/Focus-on-component-tp21727553p21730148.html Sent from the Wicket - User 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: QuickStart not finding Wicket classes
...@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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/QuickStart-not-finding-Wicket-classes-tp21669263p21681186.html Sent from the Wicket - User 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: Unexpected RuntimeException: RestartResponseException in onBeforeRender of cached page
which version are you using? for me it sounds like this problem, see the (solved) jira issue: https://issues.apache.org/jira/browse/WICKET-1478 but I'm sure you don't mean that behaviour as you certainly searched the list and the jira before posting, am I right? ;-) regards Michael ckuehne wrote: I have the following use case: I go from Page A to Page B passing an instance of A as return page to B. In B I click a link which brings me back to the (cached(?)) instance of A. In the onBeforeRender-method of a child component of A I want to redirect if some condition is protected void onBeforeRender() { if(condition){ throw new RestartResponseException(RedirectPage.class); } super.onBeforeRender(); } This fails with the following: WicketMessage: Error attaching this container for rendering: [MarkupContainer [Component id = tabs]] Root cause: org.apache.wicket.RestartResponseException Complete stack: org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [MarkupContainer [Component id = tabs]] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1601) at org.apache.wicket.Component.onBeforeRender(Component.java:3682) at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:205) at org.apache.wicket.Component.internalBeforeRender(Component.java:1002 I use wicket 1.3.5 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Unexpected-RuntimeException%3A-RestartResponseException-in-onBeforeRender-of-cached-page-tp21683689p21690192.html Sent from the Wicket - User 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: Getting an error when trying to install via Maven
Looks like you're mixing up different wicket versions. wicket.Initializer was before the move to apache. Check your pom if you're using different wicket versions - or perform a clean if you did an update recently hth, Michael HHB wrote: Hey, I created a Wicket skeleton project via Maven. When trying to install the project, I got this error: java.lang.ClassCastException: wicket.Initializer cannot be cast to org.apache.wicket.IInitializer at org.apache.wicket.Application.addInitializer(Application.java:755) at org.apache.wicket.Application.load(Application.java:829) at org.apache.wicket.Application.initializeComponents(Application.java:608) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:575) at org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:157) at org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:204) at org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308) at org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291) at com.eldorado.TestHomePage.setUp(TestHomePage.java:15) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:155) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) ... Removed 18 stack frames Please note, that I didn't code anything at all, I just tried to test the basic skeleton. Is this error intentional or something is going wrong? Thanks. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Getting-an-error-when-trying-to-install-via-Maven-tp21651202p21663793.html Sent from the Wicket - User 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: Pagination in wicket
Check out the wicket examples (especially those on repeaters on http://www.wicketstuff.org/wicket13/repeater/) - they'll help you getting started regards, Michael PSkarthic wrote: Hi I worked on wicket for a month only, i want pagination to be done in wicket. Can anybody guide me or provide some samples, it would be big help for me. I have tried googling Pagination in wicket but not yet get the solution. I have also tried Pagenavigator but don't know how to use it correctly(Stuck in creating the dataview Thanks in advance Karthic - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Pagination-in-wicket-tp21620591p21620701.html Sent from the Wicket - User 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: Re: Why you should not override isVisible
Nope, the problem is that the model object *possibly* gets reloaded if isVisible is called after the cached object got detached - and that's what started the whole bunch of messages Michael svenmeier wrote: What's taking so long in your isVisible() method? The model object should be cached, and is isPositive() so expensive? Sven - Ursprüngliche Nachricht - Von: Scott Swank Gesendet: 16.01.09 02:06 Uhr An: users@wicket.apache.org Betreff: Re: Why you should not override isVisible We have implemented this, perhaps a dozen times or more across our application. For example, there are several payment options whose relevance is determined by whether the customer owes any money on their purchase (e.g. as opposed to using a gift card). These total the order and determine visibility methods were particular hot spots. @Override public boolean isVisible() { if (visible == null) visible = ((Money) getModelObject()).isPositive(); return visible; } While this is an idiosyncratic example, I can vouch for the fact that performance woes in isVisible() show up in profiling. On Thu, Jan 15, 2009 at 4:56 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: oh i suppose you also need to reset the value in onBeforeRender(). it's a small pain, but how often does this really become a quantifiable problem and not just a worry? Jonathan Locke wrote: sure, that's the clean way to do it, but it comes at the expense of possibly breaking user code by surprise. i'm not sure how big of a deal this is. i've heard people talk about it, but i'd be interested in some examples of how performance of this method has been a problem for people. i've never run into it myself and if i did see it in a profiler, i'd probably just cache the value in a Boolean. it's literally just this little bit in your anonymous class: Boolean visible = null; public isVisible() { if (visible == null) { visible = // whatever boolean computation } return visible; } and then it disappears from the profiler and who cares about the rest. Scott Swank wrote: My idea what an inversion of that one: Add a method to Component, such as isVisibleInternal() [no I don't love the name] that would cache the results of isVisible(). Then all code that currently calls isVisible() would be changed to call isVisibleInternal() instead. Someone who really wanted non-cached visibility (seemingly the 1% case) could override isVisibleInternal(), but everyone else would get caching for free with their current code. On Thu, Jan 15, 2009 at 2:35 PM, Jonathan Locke jonathan.lo...@gmail.com wrote: well, one simple design that would avoid the reuse problem is: Boolean Component#isCachedVisible() { return null; } then override to use visibility caching and return true or false. if you don't override you get the current functionality. of course you need two more bits in Component to support this... one for whether isCachedVisible returned non-null and another for the value it returned. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21490479.html Sent from the Wicket - User 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21496352.html Sent from the Wicket - User 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: Where to process PageParameters
Jeremy, I used to do some business logic in the overriden isVisible() method too but changed that and used setVisible in onBeforeRender. Erik summed that issue up in his presentation on http://www.grons.nl/~erik/pub/20081112%20Effective%20Wicket.pdf (4MB) - slide 100 is the one containing the isVisible stuff. regards, Michael Jeremy Thomerson-5 wrote: Yes - typically it is a good idea to do things like service-layer / database access inside the model or inside onBeforeRender / isVisible, etc, rather than doing your business logic and calling setVisible(), etc. One of the main reasons for this is that if you don't, your page won't work properly when you click a link that modifies something on the page - because it doesn't reconstruct the page, and therefore you don't refresh the data in your components. On Wed, Jan 14, 2009 at 11:09 AM, behrica carsten.behr...@efsa.europa.euwrote: Hello, I do something similar in a page constructor, even with accessing the service layer. I have the same concerns, if this is correct. In general I do not like if a constructor does any significant (eventually time consuming) work like database access or other. But I did not find an other solution neither. Maybe it could be postponed by using a model which executes the needed calls to the service layer in an lazy fashion. Carsten Jonas505 wrote: Thank you for the quick reply. It's already working fine, I was just wondering if it is best practice to call business logik from the constructor: public PageB(PageParameters p) { // can throw an exception: DataSet result = callMyBusinessLogik(p.getString(param1), p.getString(param2)); preparePageBComponents(result); } Jonas From: Martijn Dashorst 14 Jan 2009 14:24:21 +0100 Subject: Re: Where to process PageParameters setResponsePage(PageB.class, parameters); or use a bookmarkablepagelink Martijn On Wed, Jan 14, 2009 at 1:06 PM, Jonas505 jonas.hoepf...@iteratec.de wrote: Hello, I would like to know, where in my WebPage class PageParameters should be processed. I have a page A where you can fill in certain parameters (or select a predefined set of parameters). Then you submit those parameters which are given to the business logic to prepare some data. The resulting data is shown on page B. I would like that the user can bookmark page B with those parameters encoded in the URL. This works fine with page B having a constructor taking PageParameters. However, right now I call the Business-Logik from the constructor of page B, which seems strange. Am I missing something or is this the way to go? Thank you! Jonas -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21454742.html Sent from the Wicket - User 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - 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 -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21460425.html Sent from the Wicket - User 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 -- Jeremy Thomerson http://www.wickettraining.com - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21474018.html Sent from the Wicket - User 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: Where to process PageParameters
Yepp, I also didn't have problems with it as - you're right - I took it at face value without thinking about it too much. I thought to avoid problems when the traffic of our apps grows and/or explodes I'll do it the save way :-) wasn't much effort to change the stuff anyway. But now I'd be interested in hearing Erik's opinion about that - he obviously must have had problems with it Michael Martijn Dashorst wrote: I don't agree with Erik that one shouldn't override isVisible. I haven't seen problems with it in my 4 years of Wicket development. The problem with these types of rules is that they tend to be taken at face value without even thinking about it. Having to maintain the state of the visible flag manually is an anti-pattern in my book. Martijn On Thu, Jan 15, 2009 at 10:21 AM, Michael Sparer michael.spa...@gmx.at wrote: Jeremy, I used to do some business logic in the overriden isVisible() method too but changed that and used setVisible in onBeforeRender. Erik summed that issue up in his presentation on http://www.grons.nl/~erik/pub/20081112%20Effective%20Wicket.pdf (4MB) - slide 100 is the one containing the isVisible stuff. regards, Michael Jeremy Thomerson-5 wrote: Yes - typically it is a good idea to do things like service-layer / database access inside the model or inside onBeforeRender / isVisible, etc, rather than doing your business logic and calling setVisible(), etc. One of the main reasons for this is that if you don't, your page won't work properly when you click a link that modifies something on the page - because it doesn't reconstruct the page, and therefore you don't refresh the data in your components. On Wed, Jan 14, 2009 at 11:09 AM, behrica carsten.behr...@efsa.europa.euwrote: Hello, I do something similar in a page constructor, even with accessing the service layer. I have the same concerns, if this is correct. In general I do not like if a constructor does any significant (eventually time consuming) work like database access or other. But I did not find an other solution neither. Maybe it could be postponed by using a model which executes the needed calls to the service layer in an lazy fashion. Carsten Jonas505 wrote: Thank you for the quick reply. It's already working fine, I was just wondering if it is best practice to call business logik from the constructor: public PageB(PageParameters p) { // can throw an exception: DataSet result = callMyBusinessLogik(p.getString(param1), p.getString(param2)); preparePageBComponents(result); } Jonas From: Martijn Dashorst 14 Jan 2009 14:24:21 +0100 Subject: Re: Where to process PageParameters setResponsePage(PageB.class, parameters); or use a bookmarkablepagelink Martijn On Wed, Jan 14, 2009 at 1:06 PM, Jonas505 jonas.hoepf...@iteratec.de wrote: Hello, I would like to know, where in my WebPage class PageParameters should be processed. I have a page A where you can fill in certain parameters (or select a predefined set of parameters). Then you submit those parameters which are given to the business logic to prepare some data. The resulting data is shown on page B. I would like that the user can bookmark page B with those parameters encoded in the URL. This works fine with page B having a constructor taking PageParameters. However, right now I call the Business-Logik from the constructor of page B, which seems strange. Am I missing something or is this the way to go? Thank you! Jonas -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21454742.html Sent from the Wicket - User 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - 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 -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21460425.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h
Re: PropertyModel that add/read element from collection
sure about that? did you try it? I'm using the Palette component exactly that way (also backed with a Set) and it just works regards, Michael Gohan wrote: Hi, Is there a good way to add an element to a collection using a PropertyModel? What I'd like to do is this: .. form.add(new DefaultValueDropDownChoice(id, new PropertyModel(model, categories), jobTypes)); .. This obviously doesn't work since categories is mapped to a java.util.Set. /Johan - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/PropertyModel-that-add-read-element-from-collection-tp21432582p21432878.html Sent from the Wicket - User 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,How to download all files in one folder ?
http://www.google.com/search?q=java+zip ;-) wch2001 wrote: thanks , Pills. How can I zip it ? thanks Pills wrote: Zip them on the fly, then download the zip. wch2001 a écrit : in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt, cc.txt, how can i download it ? if it possible that when clicking button/link and so on to download those 3 files? thanks PSkarthic wrote: I am also a newbie but i will try could u be please more specific or elabrate - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html Sent from the Wicket - User 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,How to download all files in one folder ?
didn't know that one - thanks Vitek. now I know the answer to 90% of the questions I get asked everyday :-D Vit Rozkovec wrote: Sorry, but: http://letmegooglethatforyou.com/?q=java+zip+files Vitek wch2001 wrote: thanks , Pills. How can I zip it ? thanks Pills wrote: Zip them on the fly, then download the zip. wch2001 a écrit : in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt, cc.txt, how can i download it ? if it possible that when clicking button/link and so on to download those 3 files? thanks PSkarthic wrote: I am also a newbie but i will try could u be please more specific or elabrate - 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21412353.html Sent from the Wicket - User 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: Why Named Wicket
same questions, 3 months later ;-) have a look at: http://www.nabble.com/Why-is-Wicket-called-Wicket--to20106097.html#a20106097 or at http://letmegooglethatforyou.com/?q=why+is+wicket+called+wicket but I'd prefer the first link ;-) PSkarthic wrote: Hi to all Actually i am working with wicket for one month and suddenly a thought came why it is named wicket.:working: So anybody know the reason why wicket is named so. Thanks in advance Karthic - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Why-Named-Wicket-tp21413514p21414031.html Sent from the Wicket - User 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:link - how to configure the markup of the current page.
in your application: getMarkupSettings().setDefaultBeforeDisabledLink() and getMarkupSettings().setDefaultAfterDisabledLink() regards, Michael Thorsten Scherler-3 wrote: Hi all, I am looking into customizing the way the current page is marked up. I have wicket:link SummaryAdd.html wicket:message key=summary.add.a / DispositionEditHub.html wicket:message key=dispositionEdit.h / Finish.html wicket:message key=finish.h / /wicket:link Now if I request SummaryAdd.html it get transformed to: emInsertar sumario/em ... Where can I configure that instead em something else got rendered? TIA for any information. salu2 -- Thorsten Scherler thorsten.at.apache.org Open Source Java consulting, training and solutions Sociedad Andaluza para el Desarrollo de la Sociedad de la Información, S.A.U. (SADESI) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket%3Alink---how-to-configure-the-markup-of-the-current-page.-tp21329712p21329835.html Sent from the Wicket - User 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: [announce]Wicketstuff the Movie!
I always dreamed of being part of a movie ... maybe that's the start of my movie star career - I'll certainly thank wicket when I get my Academy Award ;-) Nino Martinez-2 wrote: Proud to present from the comitters at wicketstuff Wicketstuff The Movie! Go here to see http://vimeo.com/2748657 I might be doing a similar one for Wicket if theres any interest..? Ps the movie are created with the codeswarm project.. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-announce-Wicketstuff-the-Movie%21-tp21329704p21329883.html Sent from the Wicket - User 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: error messages due to hack/search-bots
the thing is that 404 is a client error. I'd only log server errors (i.e. errors in the code) as Error. Of course a 404 can also happen due to a error in the code, but logging 404 as errors will flood your log file ... just my two cents Jeremy Thomerson-5 wrote: A 404 is an error - so on the one hand you say it is an error, but on the other, you say it isn't. I think it should remain an error. Just my 0.02 though. On Mon, Dec 22, 2008 at 7:56 AM, Sebastiaan van Erk sebs...@sebster.comwrote: Pointbreak wrote: Not an answer to your question, but why fight this kind of stuff? It's an invalid request, so it should result in an error. I actually prefer it would result in a 404 for the client and nothing more. Perhaps, when enabling DEBUG, it can log the message + exception it is currently logging as ERROR. If you don't want these entries in your log, you could just add a filter to your logger (e.g. filtering out error messages from org.apache.wicket.request.target.resource.SharedResourceRequestTarget where the message equals unable to lazily register shared resource). It is annoying (and dangerous) to filter your log in this way. The problem is that you may accidentally filter too much and miss real errors. Also, it requires you to know a lot about wicket internals (is this a real error, or should this be considered a warning?). And it is cumbersome (every time a new exception appears, you have to go through this process again). To the Wicket developers: why is this logged using log.error and not using log.debug (in SharedResourceRequestTarget#respond? It's not really an error, it's a reference to a resource that does not exist, and a 404 should be sufficient (without ERRORs in the log). Regards, Sebastiaan On Mon, 22 Dec 2008 14:05 +0100, Antoine van Wel antoine.van@gmail.com wrote: Heya, we're trying to catch all errors caused by hack search-bots on our wicket-app. AFAIK these bots take existing links, chop 'em up in smaller chunks and try to append all kind of . We've caught most of the errors which result due to these bots, but this one still stands: XXX.XXX.XXX.XXX - - [22/Dec/2008:00:03:37 +0100] GET /resources/org.apache.wicket.markup.html.WicketEventReference_false_61497/ HTTP/1.1 404 952 - - - Causing errors such as 2008-12-22 00:03:41,654 ERROR - [TP-Processor7][org.apache.wicket.request.target.resource.SharedResourceRequestTarget:172] unable to lazily register shared resource org.apache.wicket.ajax.WicketAjaxReference_false_61497/ java.lang.ClassNotFoundException: org.apache.wicket.ajax.WicketAjaxReference_false_61497 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) [...snip...] So... any ideas to catch these errors? Antoine -- We don't see things as they are, we see things as we are. - Anais Nin Whether you think you can or whether you think you can't, you're right. - Henry Ford - 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 -- Jeremy Thomerson http://www.wickettraining.com - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/error-messages-due-to-hack-search-bots-tp21127488p21132409.html Sent from the Wicket - User 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: Localization - problem with refreshing page
Please show us some code. ... sounds like a improper use of models regards, Michael Milan Křápek wrote: Hi, I found this problem and I cannot find any sollution by myself. So I ask you for a help. I localized my application to two languages. To all pages I added links for changing localization. The onClick() methods of those links contain just getSession.setLocale(requestedLocalization). That works great after click on the links all texts in my page are localized to the right language. The problem occurs when I need to style my page by CSS. I need to add class to the generated links for localization to know which language is active. So I added new AttributeModifier to those links. But when setLocale() is called, the page refreshs only text and I need to reload the localization links component too. I tried to change my localization links to AjaxLinks and in onClick() methos add the component to AjaxRequestTarget and then call setLocale(). But when I do this the localization links are rerendered as I expected and CSS classes are set correctly but the texts are not localized. Please help, how can I do these two things together? thanks for any advice Milan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Localization---problem-with-refreshing-page-tp21085928p21088004.html Sent from the Wicket - User 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: Localization - problem with refreshing page
Yep, right. Better. James Carman-3 wrote: You don't have to use onBeforeRender() here. You can have your model calculate what class to use based on the currently selected locale: new ModelString() { public String getObject() { if(toSwitch.equals(Session.get().getLocale())) { return active; } else { return inactive; } } } On Fri, Dec 19, 2008 at 6:10 AM, Michael Sparer michael.spa...@gmx.at wrote: I see where the problem lies. Try to do the following: private final class LocaleSwitchLink extends Link { private Locale toSwitch; @Override protected void onBeforeRender() { if (Session.get().getLocale().equals(toSwitch)) { add(new AttributeModifier(class, true, new Model(yourActiveClass))); } else { add(new AttributeModifier(class, true, new Model(yourInactiveClass))); } super.onBeforeRender(); } public LocaleSwitchLink (String s, Locale toSwitch) { super (s); this.toSwitch = toSwitch; } @Override public void onClick() { getSession().setLocale (toSwitch); } } that should work - i just tested it ... well similar code, not the exact one. I did it with an ajaxlink :-) Milan Křápek wrote: well here are some code snippets: Links without classes - everything is OK private void addLocaleSwitchers() { // add english link enLink = new LocaleSwitchLink (english, Locale.ENGLISH); add (enLink); // add czech link czLink = new LocaleSwitchLink (czech, new Locale (cs)); add (czLink); } private final class LocaleSwitchLink extends Link { private Locale toSwitch; public LocaleSwitchLink (String s, Locale toSwitch) { super (s); this.toSwitch = toSwitch; } @Override public void onClick() { getSession().setLocale (toSwitch); } } -- Links with classes - I do not know how to refresh locales in AjaxLink private void addLocaleSwitchers() { Locale currentLocale = this.getSession().getLocale(); // add english link enLink = new LocaleSwitchLink (english, Locale.ENGLISH); if (currentLocale.equals(Locale.ENGLISH)) { enLink.add (new AttributeModifier (class, true, new Model (activeLanguage))); } //enLink.setOutputMarkupId(true); add (enLink); // add czech link czLink = new LocaleSwitchLink (czech, new Locale (cs)); if (currentLocale.equals(new Locale(cs))) { czLink.add (new AttributeModifier (class, true, new Model (activeLanguage))); } //czLink.setOutputMarkupId(true); add (czLink); } private final class LocaleSwitchLink extends AjaxLink { private Locale toSwitch; public LocaleSwitchLink (String s, Locale toSwitch) { super (s); this.toSwitch = toSwitch; } @Override public void onClick (AjaxRequestTarget target) { target.addComponent (enLink); target.addComponent (czLink); getSession().setLocale (toSwitch); } } I think that the problem is that I do not know how to set locale via ajaxRequestTarget. Again thanks for any advices Milan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Localization---problem-with-refreshing-page-tp21085928p21089579.html Sent from the Wicket - User 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Localization---problem-with-refreshing-page-tp21085928p21090097.html Sent from the Wicket - User 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: updating text in labels using ajax?
Sure, use a simple Label and an AjaxButton, set setOutputMarkupId = true on the label and add it in the onSubmit method to the ajaxrequesttarget (target.addComponent(label)). But I'd also recommend taking a look at the Progressbar (search the mailinglist) - that might suits you better lizz wrote: Hi, I need to add end user information (progress information) after submit button is pressed and before being redirected to a new page. I would like to add this information by updating some labels. When the user presses the submit button 4 web services are called before I am redirecting to a new page. Since each of these calls takes a long time I would like to change the text (progress info) in a label when each web service call is finished. (So that the user sees what happends.) Is there a label with an ajax behevior that can be used? Use case: User presses the submit button web service method 1 is called when method 1 is finished i will update the text on a label component then web service method 2 is called when method 2 is finished i will update the text on the label etc etc when all web service methods are finished: setResponsePage - a new page Any idea? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/updating-text-in-labels-using-ajax--tp21072083p21072177.html Sent from the Wicket - User 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: updating text in labels using ajax?
alright, so the label should either update itself or updates should be pushed to the client, right? did you have a look at how ProgressBar works? http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-progressbar i haven't tried it myself, but AFAIK it uses the approach to updateitself. I did a lot of stuff however with pushing data from the server to the client using cometd, but that seems a bit overhead to me for your usecase. but if you're interested in cometd either take a look at wicketstuff-push and/or wicketstuff-dojo-1.1 hope that helps lizz wrote: But the problem is that the user shouldnt have to press any button to update the labels... Michael Sparer wrote: Sure, use a simple Label and an AjaxButton, set setOutputMarkupId = true on the label and add it in the onSubmit method to the ajaxrequesttarget (target.addComponent(label)). But I'd also recommend taking a look at the Progressbar (search the mailinglist) - that might suits you better lizz wrote: Hi, I need to add end user information (progress information) after submit button is pressed and before being redirected to a new page. I would like to add this information by updating some labels. When the user presses the submit button 4 web services are called before I am redirecting to a new page. Since each of these calls takes a long time I would like to change the text (progress info) in a label when each web service call is finished. (So that the user sees what happends.) Is there a label with an ajax behevior that can be used? Use case: User presses the submit button web service method 1 is called when method 1 is finished i will update the text on a label component then web service method 2 is called when method 2 is finished i will update the text on the label etc etc when all web service methods are finished: setResponsePage - a new page Any idea? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/updating-text-in-labels-using-ajax--tp21072083p21072506.html Sent from the Wicket - User 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: indicating AjaxFallbackDefaultDataTable
Create your own, it's quite easy. Extend from AjaxFallbackDefaultDataTable and let it implement IAjaxIndicatorAware, add an WicketAjaxAppender (see e.g. IndicatingAjaxLink how to do that) and you're done regards, Michael miro wrote: I am looking for indicating AjaxFallbackDefaultDataTable , do we have any ? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/indicating---AjaxFallbackDefaultDataTable-tp21074747p21074864.html Sent from the Wicket - User 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: DOJO Debug messages written in the html document
I don't know how to redirect them to the Ajax Debug, but you could install firebug and the debug messages will be caught there ... if you just want to avoid the messages messing up your document. regards, Michael Emanuele Gesuato-2 wrote: Hi all, I began using DOJO Context Menu with wicket 1.3.4. I retrieved the component from the wicketstuff branch for wicket 1.3.x. When i try to use it, i've got the following error printed (when using wicket in debug mode) on the html document itself and NOT in the ajax debug window: DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for panel in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for panel in wicket.widget registered to namespace wicket DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate widget implementation for border in wicket.widget registered to namespace wicket. Developers must specify correct namespaces for all non-Dojo widgets -- will be removed in version: 0.5 DEBUG: dojo.widget.Parse: error:Error: Could not locate widget implementation for border in wicket.widget registered to namespace wicket I would like to have them printed to the ajax debug window or there is a way to avoid them printed in the html document ? I've got the error on Firefox 2.0.0.18 and Internet Explorer 7; in Firefox 3 i've got the error only one time, after refreshed the browser it never happened again. The html and java are taken from the example of wicketstuff. HTML: ... body wicket:extend div wicket:id=container / /wicket:extend /body ... JAVA: ... DojoSimpleContainer container = new DojoSimpleContainer(container); container.setHeight(500px); DojoMenu menu = new DojoMenu(menu); menu.addChild(new DojoMenuItem(about, About)); menu.addChild(new DojoMenuItem(edit, Edit)); container.add(new DojoContextualMenuBehavior(menu)); add(container); ... I would like to have printed the error messages in the ajax debug window or found a way to resolve this deprecated messages or at least having them not printed at all. Thanks for any help, Emanuele - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/DOJO-Debug-messages-written-in-the-html-document-tp21050887p21050966.html Sent from the Wicket - User 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: [Announce] wicketstuff-push ported to use wicket 1.4 jetty 6.1.14
AFAIK jquery started something, but I just heard of that and didn't look into it. If dojo seems too bloated to you you can easily build your own dojo with just the modules you need - then it isn't bloated at all (except you're using too many components). There's a post announcing wicketstuff-dojo-1.1. somewhere on the mailinglist that explained (or at least offered to explain ;-)) how to build your own dojo - on the wiki it's described with 0.4 if I remember correctly regards, michael Peter Ertl-3 wrote: concerning the proper javascript client for comet... is there anything reasonable except dojo-cometd-client to use? The dojo stuff feels really bloated for me Am 11.12.2008 um 15:00 schrieb Michael Sparer: Alright, I'll keep an eye on changes of your project. Maybe we can merge some useful stuff in the future, but for now I'm of the same opinion as you. Let's keep them seperate for now. greetings from ice-cold austria, Michael Rodolfo Hansen-2 wrote: Yeah, I think we might just want to separate them, the goals will start becoming a bit different as well.. Especially since push has other options other than cometd / dojo for the general notion of getting push to web clients... So its better to separate those concerns and have push with its own mindset, no? On Tue, Dec 9, 2008 at 9:40 AM, Michael Sparer michael.spa...@gmx.atwrote: Rodolfo, so you finally decided to stick with your initial idea ;-) did you at least have a look at the cometd stuff in the new wicketstuff-dojo-1.1. project? I'm still against the idea to split up wicketstuff-push completely from the dojo project, but we had the discussion before without result ... regards, Michael Rodolfo Hansen-2 wrote: Hi, a new version of wicketstuff-push was moved to the wicketstuff-core group of projects, as push-parent (as was specified in the wiki) A couple of new things were done: It is no longer compatible with java 1.4, is built for wicket 1.4 and requires jetty 6.1.14. The dependencies on dojo have been reduced even further, so this package is basically just a cometd client/server project for wicket. The RemoveListener is now working and is extended with a new type of WicketRemoveListener that allows access to the Wicket Application Singleton and the session that registered the singleton (i thought of a couple of ways to register them, and decided to choose the one present in the code for it) Please let me know of any suggestions, ideas for the proj. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20914877.html Sent from the Wicket - User 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20955950.html Sent from the Wicket - User 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 - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20971370.html Sent from the Wicket - User 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: [OT] wicket users around the world
Dornbirn, Austria - note that it's Austria and not Australia - there are no kangaroos hopping around here ... forgot how often I had to explain that there exists a country in Europe with that name :-) francisco treacy-2 wrote: to know a little bit more of our great (and vast) community, i was just wondering if you're keen on sharing where you come from and/or where you work with wicket... for instance, here argentinian/belgian working with wicket in antibes, france francisco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-OT--wicket-users-around-the-world-tp20962108p20971372.html Sent from the Wicket - User 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: Want a simple way to put in conditional css for IE..?
Now that you started a thread containing only a link to your blogpost, I feel less spammy when I point out that I've written a wicket-related blogpost too: http://talk-on-tech.blogspot.com/2008/12/wicket-neat-url-encoding-strategy-and.html ;-) Nino.Martinez wrote: Then check this approach out : http://ninomartinez.wordpress.com/2008/12/11/wicket-never-stops-to-impress-me/ Easy and simple - The Wicket way :) -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Want-a-simple-way-to-put-in-conditional-css-for-IE..--tp20951961p20952576.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Child page with no html
Well you'll get into trouble with your component IDs. if you simply call addToRepeater, your component has already an ID which might not be suitable. We use a callback for such situations. e.g. interface IComponent() { Component getComponent(String id); } in the base page: private RepeatingView view = new RepeatingView(foo); protected void addToRepeater(IComponent comp) { view.add(comp.getComponent(view.newChildId()); } and in the sub page: addToRepeater(new IComponent() { public Component getComponent(String id) { return new MyPanel(id); } }); you could also just request a childId from the super-class, but I think the above way is more elegant :-) regards, Michael Jeremy Thomerson-5 wrote: You can also do exactly as you mentioned In your base page, have a repeating view (i.e. ListView) that simply loops over a ListComponent childPanels. Then your method addToRepeater(Component component) will add to that list. Should work exactly as you described. What trickery is needed? I guess I miss that part. On Wed, Dec 10, 2008 at 5:20 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Scott, Think inheritance :) Just write a super which has abstract methods that returns components for c1..c4() and thats it.. no need for trickery with IMarkupResourceStreamProvider ... Should I elaborate more? You could also take a look at the wicketstuff accordion thing, it does something along these lines[1]... 1= http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-accordion regards smackie604 wrote: Hi, My team has adopted wicket as it's web framework and we have been busy creating a lot of interesting Panels to build pages for our product. It is turning out that most of the time all the components on the page are Panels and we end up with a situation like this: MyPage.java -- public class MyPage extends BasePage { MyPage() { add(SomePanel(c1)); add(SomePanel(c2)); add(SomePanel(c3)); add(SomePanel(c4)); } } MyPage.html --- wicket:extend wicket:container wicket:id=c1/ wicket:container wicket:id=c2/ wicket:container wicket:id=c3/ wicket:container wicket:id=c4/ /wicket:extend It would be nice if we didn't have to write html files for pages in these situations and instead just do something like this: MyPage.java -- public class MyPage extends BasePage { MyPage() { addToRepeater(SomePanel(c1)); addToRepeater(SomePanel(c2)); addToRepeater(SomePanel(c3)); addToRepeater(SomePanel(c4)); } } Where BasePage will have a method called addToRepeater which just adds the component to the repeater. I see we could do some trickery by implementing IMarkupResourceStreamProvider on the BasePage to force the template of it's child classes to always use BasePage.html. I'm not sure this is the best way of doing this, does anyone have any comments on using this approach? Thanks, Scott -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jeremy Thomerson http://www.wickettraining.com - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Child-page-with-no-html-tp20945577p20952952.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Announce] wicketstuff-push ported to use wicket 1.4 jetty 6.1.14
Alright, I'll keep an eye on changes of your project. Maybe we can merge some useful stuff in the future, but for now I'm of the same opinion as you. Let's keep them seperate for now. greetings from ice-cold austria, Michael Rodolfo Hansen-2 wrote: Yeah, I think we might just want to separate them, the goals will start becoming a bit different as well.. Especially since push has other options other than cometd / dojo for the general notion of getting push to web clients... So its better to separate those concerns and have push with its own mindset, no? On Tue, Dec 9, 2008 at 9:40 AM, Michael Sparer [EMAIL PROTECTED]wrote: Rodolfo, so you finally decided to stick with your initial idea ;-) did you at least have a look at the cometd stuff in the new wicketstuff-dojo-1.1. project? I'm still against the idea to split up wicketstuff-push completely from the dojo project, but we had the discussion before without result ... regards, Michael Rodolfo Hansen-2 wrote: Hi, a new version of wicketstuff-push was moved to the wicketstuff-core group of projects, as push-parent (as was specified in the wiki) A couple of new things were done: It is no longer compatible with java 1.4, is built for wicket 1.4 and requires jetty 6.1.14. The dependencies on dojo have been reduced even further, so this package is basically just a cometd client/server project for wicket. The RemoveListener is now working and is extended with a new type of WicketRemoveListener that allows access to the Wicket Application Singleton and the session that registered the singleton (i thought of a couple of ways to register them, and decided to choose the one present in the code for it) Please let me know of any suggestions, ideas for the proj. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20914877.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20955950.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Asynchron push/update/redirect
take a look at wicketstuff-push or wicketstuff-dojo-1.1. (which also includes cometd that provides your desired push behaviour) regards, Michael alexander.elsholz wrote: Hi, i need a possibility to refresh parts of view, when data on the server changed. there is no synchron ajax-event, where i can use the requesttarget, because i use a thread to ask an other service for the result. actually i use the ajaxSelfUpdateBehavior, but i think its too much traffic. also i want to switch the side in a asynchron event. when the event is occured i want to redirect the user to previews page. here i can also use a modal window, which displays two buttons (yes i want and no, i won't) thanks alex - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Asynchron-push-update-redirect-tp20934629p20935238.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Announce] wicketstuff-push ported to use wicket 1.4 jetty 6.1.14
Rodolfo, so you finally decided to stick with your initial idea ;-) did you at least have a look at the cometd stuff in the new wicketstuff-dojo-1.1. project? I'm still against the idea to split up wicketstuff-push completely from the dojo project, but we had the discussion before without result ... regards, Michael Rodolfo Hansen-2 wrote: Hi, a new version of wicketstuff-push was moved to the wicketstuff-core group of projects, as push-parent (as was specified in the wiki) A couple of new things were done: It is no longer compatible with java 1.4, is built for wicket 1.4 and requires jetty 6.1.14. The dependencies on dojo have been reduced even further, so this package is basically just a cometd client/server project for wicket. The RemoveListener is now working and is extended with a new type of WicketRemoveListener that allows access to the Wicket Application Singleton and the session that registered the singleton (i thought of a couple of ways to register them, and decided to choose the one present in the code for it) Please let me know of any suggestions, ideas for the proj. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/-Announce--wicketstuff-push-ported-to-use-wicket-1.4-jetty-6.1.14-tp20914051p20914877.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
Hmm Im using auth roles now.. Are there an way to integrate the two..? hey nino, take a look at http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html - it's a bit older but I think it might still work. as acegi is now called spring security. regards, Michael Nino.Martinez wrote: Hmm Im using auth roles now.. Are there an way to integrate the two..? Another thing though, I need to either use sreg or AX to pull some values (only email and name) to my system is that possible with the spring security thing( I know this should probably go to the spring forum)? Jan Kriesten wrote: Hi Nino, I have something working only partially though, cant get email and name attribute back from the openid provider properly.. Seems to work with openid.org, but not claimid.com or myopenid.com why not using spring-security and don't have any more hassle at all? Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Openid-integration--tp20778841p20810761.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
Looks pretty empty, doesn't it? :-) Nino.Martinez wrote: Hmm just saw this : http://code.google.com/p/wicket-auth-openid/ Nino Saturnino Martinez Vazquez Wael wrote: Hi Guys Have any of you tried to do a openid integration ? -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Openid-integration--tp20778841p20790787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hand on session code
the first possibility that comes to my mind is overriding the following method in your application: @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected Page onRuntimeException(final Page page, final RuntimeException e) { // do the default handling on pageexpiredexceptions if (e instanceof PageExpiredException || e instanceof AuthorizationException) { return null; } return new InternalServerError(page, e); // e.getCause for your NPE } }; } egolan74 wrote: Hi, In deployment, we set our own internal error page: getApplicationSettings().setInternalErrorPage(InternalErrorPage.class); and getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); Is there a quick way to get the type of the exception and show a different message in our internal error page accordingly? For example: if we get NullPointerException, show a message: You developer coded null !!! . And ArrayIndexOutOfBoundException will show: oops.. the array is too small . Thanks Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - Eyal Golan [EMAIL PROTECTED] Visit: JVDrums LinkedIn: LinkedIn - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Hand-on-session-code-tp20719154p20719327.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hand on session code
What do you mean by saying you didn't see onRuntimeException in WebRequestCycleProcessor? If you didn't find it there it's because it's a method of its base class ;-) What I didn't mention when providing the code was that it's actually returning a Page (our internal server error page) and gets the Exception that caused the pain in the constructor. I might be misunderstanding you, but wasn't that the thing you wanted? Displaying different stuff in your error page based on what Exception was thrown? regards, Michael egolan74 wrote: Thanks, but looking at WebRequestCycleProcessor I didn't see onRuntimeException method. We use 1.3.4 version Looking at AbstractRequestCycleProcessor:respond, I see the call: if (responseClass != internalErrorPageClass settings.getUnexpectedExceptionDisplay() == IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE) { throw new RestartResponseException(internalErrorPageClass); } And I also see that RestartResponseException has a constructor with PageParameters. Is there a nice way to call the constructor with the parameters in respond ? Without overriding all this method? Thanks Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Nov 27, 2008 at 3:31 PM, Michael Sparer [EMAIL PROTECTED]wrote: the first possibility that comes to my mind is overriding the following method in your application: @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected Page onRuntimeException(final Page page, final RuntimeException e) { // do the default handling on pageexpiredexceptions if (e instanceof PageExpiredException || e instanceof AuthorizationException) { return null; } return new InternalServerError(page, e); // e.getCause for your NPE } }; } egolan74 wrote: Hi, In deployment, we set our own internal error page: getApplicationSettings().setInternalErrorPage(InternalErrorPage.class); and getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); Is there a quick way to get the type of the exception and show a different message in our internal error page accordingly? For example: if we get NullPointerException, show a message: You developer coded null !!! . And ArrayIndexOutOfBoundException will show: oops.. the array is too small . Thanks Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - Eyal Golan [EMAIL PROTECTED] Visit: JVDrums LinkedIn: LinkedIn - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Hand-on-session-code-tp20719154p20719327.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Eyal Golan [EMAIL PROTECTED] Visit: JVDrums LinkedIn: LinkedIn - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Hand-on-session-code-tp20719154p20720178.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hand on session code
Nicer? Well it's quite the same with the difference that I overrode the cycle processor and Dipu just the cycle ... I suspect you didn't find the right method to override ;-) regards, Michael egolan74 wrote: Thanks Dipu and Michael, Michael, you understood correctly. I used Dipu's solution as it looks nicer (no offend Michael :) ) However, I added a check for development / deployment. And this is my (almost) final method. /** * @see org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request, * org.apache.wicket.Response) */ @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) { if (PageExpiredException.class.isAssignableFrom(e.getClass())) { return null; } return new InternalErrorPage(); } else { // In development we want to see the exception return null; } } }; } All I need now is to work on the InternalErrorPage to get parameters and add the information. I have noticed one thing. Overriding this method caused the getExceptionSettings().setUnexpectedExceptionDisplay to be overridden. Thanks again, that was very much helpful. Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Nov 27, 2008 at 4:27 PM, Michael Sparer [EMAIL PROTECTED]wrote: What do you mean by saying you didn't see onRuntimeException in WebRequestCycleProcessor? If you didn't find it there it's because it's a method of its base class ;-) What I didn't mention when providing the code was that it's actually returning a Page (our internal server error page) and gets the Exception that caused the pain in the constructor. I might be misunderstanding you, but wasn't that the thing you wanted? Displaying different stuff in your error page based on what Exception was thrown? regards, Michael egolan74 wrote: Thanks, but looking at WebRequestCycleProcessor I didn't see onRuntimeException method. We use 1.3.4 version Looking at AbstractRequestCycleProcessor:respond, I see the call: if (responseClass != internalErrorPageClass settings.getUnexpectedExceptionDisplay() == IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE) { throw new RestartResponseException(internalErrorPageClass); } And I also see that RestartResponseException has a constructor with PageParameters. Is there a nice way to call the constructor with the parameters in respond ? Without overriding all this method? Thanks Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Nov 27, 2008 at 3:31 PM, Michael Sparer [EMAIL PROTECTED]wrote: the first possibility that comes to my mind is overriding the following method in your application: @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected Page onRuntimeException(final Page page, final RuntimeException e) { // do the default handling on pageexpiredexceptions if (e instanceof PageExpiredException || e instanceof AuthorizationException) { return null; } return new InternalServerError(page, e); // e.getCause for your NPE } }; } egolan74 wrote: Hi, In deployment, we set our own internal error page: getApplicationSettings().setInternalErrorPage(InternalErrorPage.class); and getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); Is there a quick way to get the type of the exception and show a different message in our internal error page accordingly? For example: if we get NullPointerException, show a message: You developer coded null !!! . And ArrayIndexOutOfBoundException will show: oops.. the array is too small . Thanks Eyal Golan [EMAIL
Re: Is there any other way? DataProviders must hit the Db twice for (possible) large datasets
have a look at https://issues.apache.org/jira/browse/WICKET-1784 Wayne Pope-2 wrote: Ok, I was just having a bit of code clean up and I realized that in our IDataProviders we are loading all rows for a given dataset. So looking at the iterator method I see we can limit the result (and the offset). Great I thought - however I see that that the size() method is called as part of the getViewSize() in the AbstractPageableView. Thus I need to call the database here to figure out the size. Am I doing sonething wrong or have I got to hit the database twice for each DataProvider render. Obvously I don't want to hard code a size. Is there any other way ? Thanks Wayne - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Is-there-any-other-way--DataProviders-must-hit-the-Db-twice-for-%28possible%29-large-datasets-tp20701684p20702476.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mount outside init
Do you really have different Pages (= Classes) for each customer? If not, then just mount the customer page with e.g. IndexedParamUrlCodingStrategy, add the customer name to the PageParameters and retrieve it then in the pages constructor. e.g. PageParameters params = new PageParameters(); params.put(0, customer.getName()); setResponsePage(CustomerPage.class, params) -- will be /customer/customerOneName and then in the pageconstructor final String customerName = params.getString(0); makes sense? michael Mathias P.W Nilsson wrote: Hi! I'm building an application where I want to set variation and other settings determined by the path lets say a user request myapplication/customer1 I want to mount /customer1 to Base.class. I can do this in init by what if I add another customer via admin. How can I mount /customer2 outside of the init method of the wicket application class? Another question would be to keep the /customer1 or /customer2 in every request so if I call setResponsePage( new Login() ) then I would like to keep /customer1/login. Any suggestions? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/mount-outside-init-tp20619679p20620259.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model never called
you should rather add an IModel to the link e.g. new Link(foobar, myModel); than letting a component implement IModel. the way you did it, the model is never recognised as a model, as it wasn't set as a model of a component. hope that makes sense regards, Michael Leucht, Axel wrote: Hi, I do have a link class which should render different icons when clicked. So I decided to implement IModel and return different icons depending on the state of the object. But to my surprise getObject() never get called! Does anyone give me a clue where to look next or give me a hint as to how to render the object with a different icon? The object is used in a 10x10 board game where a player can shoot at different squares which are rendered as links in the output. The board is constructed as: ListView listview = new ListView(rows, list) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem item) { Row row = (Row) item.getModelObject(); final Square[] squares = new Square[10]; for (int col=0; col10; col++) { squares[col] = row.getCells(col); } Square square = row.getCells(0); item.add(new Label(row,new Model(square.getRow(; for (int col=0; col10; col++) { final Square aSquare = row.getCells(col); item.add(aSquare); } } }; And the Square-Object is: public class Square extends Link implements IModel { @Override public void onClick() { System.out.println(Click: + ident); } @Override public Object getObject() { System.out.println(GetObject); if (someState) return icon1; return icon2; } } /Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Model-never-called-tp20577931p20578051.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax busy indicator never stops in IE
, but it is not easy to understand it. I will compare it with firefox generated logs... igor.vaynberg wrote: why dont you check *why* it is not hiding. ajax console should give you a clue. -igor On Fri, Nov 14, 2008 at 6:43 AM, miro [EMAIL PROTECTED] wrote: did nobody faced this problem whats the solution for this ? miro wrote: My page has IndicatingAjaxLinkWhen user clicks on this link the busy indicator never stops , it works fine in firefox here some html tbody wicket:id=auditInfoContainer style=width:100%;height:556;overflow:auto; wicket:container wicket:id=auditInfos tr wicket:id=auditInfo height=10 td /td td /td td /td td /td td /td td /td td /td td /td td /td /tr /wicket:container /tbody auditInfo is the link . I am using wicket 1.3.5 -- View this message in context: http://www.nabble.com/ajax-busy-indicator-never-stops-in-IE-tp20485948p20501752.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/ajax-busy-indicator-never-stops-in-IE-tp20485948p20577814.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: on click on a link in a listview works with td but but not with div or span
/div - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/on-click-on-a-link-in-a-listview--works-with-td-but-but-not-with-div-or-span-tp20474916p20476991.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: on click on a link in a listview works with td but but not with div or span
Ah, alright. batchInfos is the listview, so you get a new table for each listitem and that's not what you want. Either apply batchInfos to the tr or use wicket:container i.e. [table] [wicket:container wicket:id=batchInfos] [tr wicket:id=batchInfo] miro wrote: the problem with this is div style=width:100%;height:556;overflow:auto; wicket:id=batchInfoContainer table border=1 width=100% wicket:id=batchInfos tr wicket:id=batchInfo td width=15 /td td width=50 label wicket:id=name/label /td td width=35 label wicket:id=date/label /td /tr /table /div batchInfos is a listview so If i my listitem are 4 all the html for batchInfos gets repeated so creating a new table for each list item which means different tables sizes for each listitem and i want to avoid that and one table and tr for batchinfos which menas each listitem will be in a new row and all listitems are in one table , how to have this ? Michael Sparer wrote: I don't quite get what you're trying to achieve. A table inside a table cell? That shouldn't be a problem if you add/replace your components inside the table cell and not the row. But what I see in your markup is that you're nesting a div inside a tr - and that's not allowed. Maybe your browser gets confused with that one ... miro wrote: my component hirearchy batchInfoContainer batchInfos (listview) batchInfo(link) batchStatusImg name date html code div style=width:100%;height:556;overflow:auto; wicket:id=batchInfoContainer table border=1 width=100% wicket:id=batchInfos tr wicket:id=batchInfo td width=15 /td td width=50 label wicket:id=name/label /td td width=35 label wicket:id=date/label /td /tr /table /div /code the code above works for onclick but the problem is i open a new table inside
Re: Meet the Wicket community: Bruno Borges and Jeremy Thomerson
following the WIA blog should be a prerequisite to get permission to post on this list anyway ;-) Martijn Dashorst wrote: While spending a whopping week in the Big Easy (New Orleans) eating gumbo, burgers and fried seafood, and attending ApacheCon US I was in the fortunate circumstances to meet with a lot of great folks. Amongst these folks were long time Wicket supporters Bruno Borges and Jeremy Thomerson. I already had sent interviews to these guys (and Bruno was very quick to answer) so all we needed to do was socialize and enjoy the beer. You can get to know these guys a bit better too: their interviews are available online in my continuing series of interviews with the Wicket community: http://wicketinaction.com/2008/11/meet-the-wicket-community-jeremy-thomerson/ http://wicketinaction.com/2008/10/meet-the-wicket-community-bruno-borges/ Enjoy the interviews and don't hesitate to follow up with questions—I know both are reading the blog too :) Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Meet-the-Wicket-community%3A-Bruno-Borges-and-Jeremy-Thomerson-tp20469125p20480072.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bugs in wicket
google for wicket jira regards, Michael jensiator wrote: Hi I have noticied something in wicket-datetime that might be a bug. (DatePicker in a ModalWindow with IE7) Where can I registrate unknown Issues and check existing Issues in the wicket framework? Jens - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Bugs-in-wicket-tp20377171p20377250.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicketstuff-push is over, wickestuff-dojo-1.1 is born ???
Hi Julien, we're doing our last tests today and tomorrow and will put wicketstuff-dojo-1.1 into production by Monday. If no issues arise, we'll share it as a wicketstuff project next week. Please note that so far, we only ported some components to 1.1. (includes wiper, slider, drag and drop and cometd). We're also making extensive use of cometd, which is quite a bit better than in dojo 0.4 by the way, and it is also included in the wicketstuff-dojo-1.1 project then. Then it's your turn to give recommendations, improvements and, most important, help to get the same functionality working for 1.1. as for the corrupted push project: rodolfo made some changes, so I don't know what's going on there. A version of wicketstuff-push before rodolfo started with the makeover is available as a branch. Just check out wicketstuff's branches, if you can't wait till next week. regards, Michael julien Graglia wrote: Hi, I have read some posts (1) that seems to say that wicketstuff-push will be replaced by a new wicketstuff-dojo-1.1 artifact. The post says that this artifact is in a private SVN repo, but will be available shortly.. Do you have any informations about that? I need to do reverse ajax with wicket (cometd...) ie. push event from a server thread at the server initiative. It works with an old (rev 4245) version of wicketstuff-push. The trunk seems corrupted : a dojo folder is missing.. 1 : http://www.nabble.com/New-wicketstuff-dojo-project-td19070145.html -- Julien Graglia NetCeler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicketstuff-push-is-over%2C-wickestuff-dojo-1.1-is-born-tp20356751p20357888.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: get method defined for class
nope that's not true, they don't expect Strings correct me if i'm wrong, but i think the problem most likely lies here: add(new DropDownChoice(ddArtikel, new PropertyModel(artikel, name), artikelList, new ChoiceRenderer(name, id))); -- the choicerenderer looks for the path id on the model object, which is a string in your case (new PropertyModel(artikel, name)), use e.g. new Model(artikel) Jurrie Overgoor-3 wrote: Björn-Peter Tietjens wrote: Hi all, i keep getting tis strange error:* WicketMessage: No get method defined for class: class java.lang.String expression: id** Root cause:** org.apache.wicket.WicketRuntimeException: No get method defined for class: class java.lang.String expression: id*** when executing this line: *add(new DropDownChoice(ddArtikel, new PropertyModel(artikel, name), artikelList, new ChoiceRenderer(name, id))); *in my class Artikel the id property is of type long, when i chang it to String then it works... how do i need to do that to make it work as long? I think that PropertyModels (and models in general) expect string return values for the POJO's getXXX() methods. You can try to override the getIdValue() method. Something like this: ChoiceRenderer c = new ChoiceRenderer(name, id) { public String getIdValue(Object object, int index) { return + (long)object; } }; Note that this code is untested, and intended as explanation. -- With kind regards, Jurrie Overgoor 2go-mobile b.v. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/get-method-defined-for-class-tp20357843p20358584.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Design question : accessing components between panels
Whenever getPage() returns null it's most likely that the component isn't added to a page yet. Just a guess: you're calling getPage() in the constructor of your panel right? Try calling it in the onBeforeRender method and page won't return null hope that helps Michael Arun Wagle wrote: Hi, I had tried getPage() but it returns null to me. Is it because the panel in which I am trying to access the other panel component is a modal dialog? Any suggestions. igor.vaynberg wrote: component#getPage() -igor On Tue, Nov 4, 2008 at 9:28 PM, Arun Wagle [EMAIL PROTECTED] wrote: Hello , I have an application which renders a page. This page has two panels , panel A and panel B Each panel has some components in it. Now I want to access some component in panel B from panel A. Can someone tell me how do I get a handle to panel B in panel A ? If I have an instance of the page, then I can do a *get(id of panel B)* to get the instance of panel B But how do I get the instance of the home page in panel A ? How can I acheive this scenarion in the best possible way? Can someone please help me as I have lot of cases with these scenarious ? Regards, Arun Wagle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Design-question-%3A-accessing-components-between-panels-tp20336382p20343221.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: attribute modifier on onclick
show us some code miro wrote: I have a linkthis contains a label , now I want to change the style of the label whenever user clicks on the link , to do this I override the method onClick() in link component I am retrieving the label and adding simpleattributemodifier to the label , but there is no change , when I see the generated html it does not include the added style , can I change the style of a component in any of the events of a component ? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/attribute-modifier-on-onclick-tp20310246p20318681.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxFallbackButton and setDefaultFormProcessing(false)
you could try nesting two forms - the inner form would then be the username that gets submitted by the ajaxbutton. if you then submit the outer form eventually the inner form gets resubmitted as well ... AFAIK and in case you're wondering: wicket supports nested forms (HTML doesn't) and converts the inner form into a div ... hope that helps, Michael jpswain wrote: I'm building a registration page for my wicket app, and I'm having trouble getting an AjaxFallbackButton to work the way I would like it to. I have several fields for the user to fill out on my registration page, including email, password, desired-username, etc. What I want is to have an AjaxFallbackButton next to desired-username to see if it is available and then display a label saying whether it is or isn't available. This works fine when AjaxFallbackButton's setDefaultFormProcessing is set to true (as by default). However, this runs the onSubmit() of the form, not just the onSubmit() of the button itself as I want it to. If I do ajaxFallbackButton.setDefaultFormProcessing(false) then it gets nothing from the model. When I have used non-Ajax buttons in the past with Wicket, I called textField.updateModel() and then called textField.getModelObject(), which made it possible to retrieve values with defaultFormProcessing set to false and therefore did not run the form's onSubmit() method. However when I do this with AjaxFallbackButton I get a null pointer execption :(. If this is too incomprehensible, I can try to make a quickstart demonstrating the problem. I'm really not sure what appropriate behavior with these forms/buttons is to begin with though, so I would really appreciate help. I have pasted my class which may help. Thanks! Jamie - package com.musictramp.wicket.pages.tests; import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxFallbackButton; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; @SuppressWarnings(unchecked) public class TestPage extends WebPage{ private static final long serialVersionUID = 1L; // *** INSTANCE VARS *** private TextField textField; private Label label; // *** CONSTRUCTOR *** public TestPage () { this(null); } public TestPage(PageParameters params) { Form form = new Form(form){ @Override protected void onSubmit() { System.out.println( form onSubmit()); } }; textField = new TextField(textField, new Model()); textField.setOutputMarkupId(true); label = new Label(label, new Model()); label.setOutputMarkupId(true); AjaxFallbackButton ajaxFallbackButton = new AjaxFallbackButton(button, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { System.out.println( Ajax button submit:); String s1 = textField.getModelObject().toString(); System.out.println(s1= + s1); label.setDefaultModelObject(s1); if (target != null) { target.addComponent(label); } } }; // If this is uncommented, then s1 comes out blank: //ajaxFallbackButton.setDefaultFormProcessing(false); form.add(textField); form.add(label); form.add(ajaxFallbackButton); add(form); } } // CLOSE CLASS. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/AjaxFallbackButton-and-setDefaultFormProcessing%28false%29-tp20316060p20318750.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:link - no automatic italicizing behavior needed
actually there are two: - use CSS to disable it or - set getMarkupSettings().setDefaultBeforeDisabledLink(); and getMarkupSettings().setDefaultAfterDisabledLink(); in your webapp's init() regards, Michael unka_hahrry wrote: Hello! Is there any possibility to disable the automatic italicizing behavior when using wicket:link-tags? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/%3Cwicket%3Alink%3E---no-automatic-italicizing-behavior-needed-tp20269389p20271491.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: no title in ExternalLink
I always go for accessibility and each of my links do have a title and I'd be the last one to say that accessibility (and usability) isn't important. But I think the footprint of the components should be kept as small as possible. It isn't hard to extend them anyway. If you only use titled externallinks (like I do) just subclass externallink and add an abstract method to return the title. This way you're forced to come up with a decent title - which in turn improves accessibility/usability. then you're not tempted to use a default constructor ... well just my two cents - if the JIRA goes through, I'll be fine with it too :-) Michael Steve Swinsburg-2 wrote: Hi all, I've just noticed a deficiency in the ExternalLink component that doesn't allow a 'title' field to be set in its constructor. This is a basic HTML attribute that all links should have (for accessibility and expected behaviour). Currently this is only achieved by using AttributeAppender and setting the title attribute onto the link component. I propose a new construcotr that takes the title attribute as a parameter (or the ExternalLink set a title by default). I have filed a Jira ticket here: https://issues.apache.org/jira/browse/WICKET-1878 cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Editable drop down component
something like the AutoCompleteTextField? Alexander Shopov wrote: There are several drop down components in wicket and wicket extensions, but I did not find an editable drop down (something that would compose a text input + some java script for the functionality). Is there such a component or do I need to write on on my own? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Editable-drop-down-component-tp20189222p20189533.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What's the difference between Check and CheckBox
the main difference is that checks belong to a checkgroup (useful in repeaters) and checkbox is convenient when used alone check out http://www.wicketstuff.org/wicket13/forminput/ ;-) regards, Michael Minto van der Sluis wrote: Messing around with unittesting a CheckBox, I discovered Check as well: org.apache.wicket.markup.html.form.Check; org.apache.wicket.markup.html.form.CheckBox; To me it's not very clean what the difference is, since they are both attached to the same markup: input type=checkbox ... Can anyone enlighten me ? regards, Minto van der Sluis - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/What%27s-the-difference-between-Check-and-CheckBox-tp20125256p20126224.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FireFox 3.x.x issue with wicket
well, make the searchbox wider? ;-) no honestly, i don't believe this is a wicket related issue, sounds like plain html after all ... or do you mean that only half of the text gets submitted? swapnil.wadagave wrote: Respected sir, When I am writing in the search boxes I only see half of the text. This happens with FireFox 3.x.x What can i do in this case?This is happening in some pcs. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105053.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FireFox 3.x.x issue with wicket
what do you mean by saying But Actually half text is not gets submitted.? If there's a problem on the wicket site it would be helpful to see some code swapnil.wadagave wrote: Thanks For Reply, But Actually half text is not gets submitted.Only pbm is with view.same is working fine with IE and mozila backward version like mozila 2.x.x..So where can i get help for this kind of issues. Regards, swapnil swapnil.wadagave wrote: Respected sir, When I am writing in the search boxes I only see half of the text. This happens with FireFox 3.x.x What can i do in this case?This is happening in some pcs. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105728.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to redirect wicket pages using javascript
looks like something's wrong in your service, check the random stuff at com.ccti.digibanker.arcot.service.ArcotUserQAServiceImpl.get3QA(ArcotUserQAServiceImpl.java:72) ;-) ... don't think it's anything related to the headercontributor freak182 wrote: Hello, I have a project which uses mostly javascript because it is a client base part. My problem is when i cannot redirect wicket pages in javascript. I already try this in behavior: . init.js function clientReady() { location.href = '${url}'; } in behavior... final Map params = map.put(url , RequestCycle.get().urlFor(new TestPage()); component.add(TextTemplateHeaderContributor.forJavaScript(InitBehavior.class, init.js, params)); super.bind(component); i get an error: Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149) ... 29 more Caused by: java.lang.IllegalArgumentException: Upper bound for nextInt must be positive at org.apache.commons.lang.math.JVMRandom.nextInt(JVMRandom.java:104) at org.apache.commons.lang.math.RandomUtils.nextInt(RandomUtils.java:88) at org.apache.commons.lang.math.RandomUtils.nextInt(RandomUtils.java:74) at com.ccti.digibanker.arcot.service.ArcotUserQAServiceImpl.get3QA(ArcotUserQAServiceImpl.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy20.get3QA(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy23.get3QA(Unknown Source) at com.ccti.digibanker.arcot.process.ArcotNoIdPage.init(ArcotNoIdPage.java:49) ... 34 more any idea...Thanks a lot...Cheers. - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/how-to-redirect-wicket-pages-using-javascript-tp20083835p20084307.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A wicket gathering?
i think i know what you're talking about ... not much talk then, ey? ;-) Martin Funk-3 wrote: the london guys are already crouching together at google regularly. i´d love frankfurt :) Yeah, I wouldn't mind that either :-) Though I think Wickets center of gravity on the continent is closer to Amsterdam. And I'm not sure if Frankfurts places to hold a conference at, are as nice as Amsterdams places. mf -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/A-wicket-gathering--tp19967487p19974743.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieveing page parameters
getPageParameters()? Didn't you look at the API before posting? ;-) miro wrote: I am using setRedirect(true); setResponsePage(MyPage.class,pageParameters); in Mypage how can I retrieve pageParameters ? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/retrieveing-page-parameters-tp19956410p19956420.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieveing page parameters
then there either weren't any pageparams or you missed to call super(params) regards, Michael miro wrote: I tried that , getPageParameters() was returning null . Michael Sparer wrote: getPageParameters()? Didn't you look at the API before posting? ;-) miro wrote: I am using setRedirect(true); setResponsePage(MyPage.class,pageParameters); in Mypage how can I retrieve pageParameters ? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/retrieveing-page-parameters-tp19956410p19956431.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieveing page parameters
Yepp you need one if you want your mounting strategies work ... and for getPageParameters not returning null ;-) miro wrote: I dont have a constructor with PageParameters.Do I need one? , becasue if itr appended to the url I can retrieve it from request or getPageParameters() Pills wrote: in your constructor that has a parameter PageParameters... miro a écrit : where should I call super(params) ? Michael Sparer wrote: then there either weren't any pageparams or you missed to call super(params) regards, Michael miro wrote: I tried that , getPageParameters() was returning null . Michael Sparer wrote: getPageParameters()? Didn't you look at the API before posting? ;-) miro wrote: I am using setRedirect(true); setResponsePage(MyPage.class,pageParameters); in Mypage how can I retrieve pageParameters ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/retrieveing-page-parameters-tp19956410p19957601.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: prepulating a form and changing behaviour
What about trying out first and then ask if something doesn't work as desired? miro wrote: I have a Page which has a form , I assume prepopulating is just setting model object to my form which has the same properties as the form is this right ? Second If I want to change the construction of the page with extending this class and overriding some methods in this case do I have to create a new bookmark ? - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/prepulating-a--form--and-changing-behaviour-tp19923467p19952321.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieveing page parameters
yepp, use the setResponsePage(Page page) instead of setResponsePage(Class pageClass) method - but be aware that the resulting page is bound to the session and not reusable for other sessions, aka bookmarkable miro wrote: now are there ways to hide parameters from url ie I want to pass parameters but wont show them in url ? also I doing a redirect from the caller. Michael Sparer wrote: Yepp you need one if you want your mounting strategies work ... and for getPageParameters not returning null ;-) miro wrote: I dont have a constructor with PageParameters.Do I need one? , becasue if itr appended to the url I can retrieve it from request or getPageParameters() Pills wrote: in your constructor that has a parameter PageParameters... miro a écrit : where should I call super(params) ? Michael Sparer wrote: then there either weren't any pageparams or you missed to call super(params) regards, Michael miro wrote: I tried that , getPageParameters() was returning null . Michael Sparer wrote: getPageParameters()? Didn't you look at the API before posting? ;-) miro wrote: I am using setRedirect(true); setResponsePage(MyPage.class,pageParameters); in Mypage how can I retrieve pageParameters ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/retrieveing-page-parameters-tp19956410p19958393.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
you mean changing each property of an existing object by means of ajax? if the object is serializable, clone the object and perform the changes on that object ... if it isn't set the properties in your form and apply them onsubmit ... or am I missing the point completely? Lutz Müller wrote: It might work if you dont have any ajax on your page. otherwise each ajax call happens in a new request and causes your domain object to be retrieved from the database. this way you lose every change made to your object. writing all changes to database before detaching can be an option, but then you might persist something to your datastore that is in the midst of being edited. i would be glad to offer a solution to the problems i just brought up, but i am struggling with this problem ever since i started using wicket. On Tuesday 30 September 2008 08:40:11 Nino Saturnino Martinez Vazquez Wael wrote: Yup the way that I do it too almost down to every line:) Michael Sparer wrote: When using the OSIV-filter the lazyload exception may only happen if the same entity is used among different requests ... sothat it gets detached from hibernate. have a look at http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetacha blemode.html ... that's the way we're doing it regards, Michael Korbinian Bachl - privat wrote: I think it could be something about missing usage of loadabledetachable model..? not for me, as the original entity is pulled using an loadabledetachableModel via a SortedDataProvider :/ if you look around, the all called solution for this is the OpenSessionInViewFilter and the usage of bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager for that (latter one is used by me, too) However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Best, Korbinian Nino Saturnino Martinez Vazquez Wael schrieb: Hi Korbinian Im facing the same problems... I also use extended.. So gonna be great to see the outcome of this thread.. I think it could be something about missing usage of loadabledetachable model..? Korbinian Bachl - privat wrote: Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19899635.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxPagingNavigator and IndicatingAjaxLink
alright, but that's more CSS fiddling than wicket related have fun tweaking your styles ;-) regards, Michael Reinout van Schouwen-4 wrote: Op woensdag 08-10-2008 om 02:56 uur [tijdzone -0700], schreef Michael Sparer: why not just let your IndicatingPagingNavigator implement IAjaxIndicatorAware - then you got your feedback and also have it at one place (only one indicator) instead of multiple indicators as each ajaxlink would have its own ... Thanks, that worked. However I'm now trying to figure out how to make the indicator be displayed next to the navigator, instead of below. In other words, how to make the indicator's tag appear inside of the div instead of outside it. regards, -- Reinout van Schouwen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/AjaxPagingNavigator-and-IndicatingAjaxLink-tp19875656p19876572.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxPagingNavigator and IndicatingAjaxLink
why not just let your IndicatingPagingNavigator implement IAjaxIndicatorAware - then you got your feedback and also have it at one place (only one indicator) instead of multiple indicators as each ajaxlink would have its own ... e.g. public class IndicatingAjaxPagingNavigator extends AjaxPagingNavigator implements IAjaxIndicatorAware { private final WicketAjaxIndicatorAppender _indicatorAppender = new WicketAjaxIndicatorAppender(); public IndicatingAjaxPagingNavigator(String id, /* snip */) { super(id, /* snip */); add(_indicatorAppender); // snip } public String getAjaxIndicatorMarkupId() { return _indicatorAppender.getMarkupId(); } } regards, Michael Reinout van Schouwen-4 wrote: Hi all, I tried extending the AjaxPagingNavigator class to provide some feedback while loading the next page using IndicatingAjaxLink. The (not-compiling) code I wrote is below. I couldn't make it work because the protected methods in AjaxPagingNavigator return a Link, as AjaxLink is a sibling of Link instead of a subclass. Why doesn't the AjaxPagingNavigator use an AjaxLink in the first place? Suggestions welcome. /* this doesn't work because IndicatingAjaxLink is not a subclass of Link class IndicatingAjaxPagingNavigator extends AjaxPagingNavigator { public IndicatingAjaxPagingNavigator(String id, IPageable pageable) { super(id, pageable); } @Override protected Link newPagingNavigationLink(String id, IPageable pageable, int pageNumber) { final Link result = super.newPagingNavigationIncrementLink(id, pageable, pageNumber); return new IndicatingAjaxLink(id) { @Override public void onClick(AjaxRequestTarget target) { result.onClick(); } }; } } */ regards, -- Reinout van Schouwen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/AjaxPagingNavigator-and-IndicatingAjaxLink-tp19875656p19875773.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RadioChoice with Ajax
just a guess: from the AjaxFormComopnentUpdatingBehavior's javadoc: NOTE: This behavior does not work on Choices or Groups use the AjaxFormChoiceComponentUpdatingBehavior for that. regards, Michael radovan wrote: Hallo, I have this code: private static final ListString Orders = Arrays.asList(new String[] { asc, desc }); private final IModelString model = new ModelString(Orders.get(0)); RadioChoice radioChoice = new RadioChoice(orders, model, Orders); radioChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println(model); } }); I expected, that model contains selected choice, but this print null. How I can get value of selected choice? - with Ajax (no submit button) - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/RadioChoice-with-Ajax-tp19855494p19856377.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more than one html file accessible
mount your pages: http://cwiki.apache.org/WICKET/pages.html Björn-Peter Tietjens wrote: Hi, i am absolutly new to wicket... i did the quickstart, and even got an app running including a form and hibernate access to mysql saving the filled in data with it... ...but... At the moment I have exactly one HomePage.html alongside the HomePage.java in my app and the config bit in the public class WicketApplication extends WebApplication: ... public Class getHomePage() { return HomePage.class; } ... Now I want to have another page, something like StatisticPage.html with StatisticPage.java with in the same app. Changing the getHomePage-Method to: public Class getHomePage() { return StatisticPage.class; } does the job... but then I don't get to HomePage.html anymore :-( What do i need to do, that i can define HomePage.html as default reachable under: http://localhost:8080/MYAPP/; and at the same time http://localhost:8080/MYAPP/stats; to get to the StatisticPage.html ??? Thanx for some help!!! Cheers B - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/more-than-one-html-file-accessible-tp19742743p19743279.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722473.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket + spring + jpa/ hibernate = lazy load exception
When using the OSIV-filter the lazyload exception may only happen if the same entity is used among different requests ... sothat it gets detached from hibernate. have a look at http://talk-on-tech.blogspot.com/2008/05/custom-reuseable-loadabledetachablemode.html ... that's the way we're doing it regards, Michael Korbinian Bachl - privat wrote: I think it could be something about missing usage of loadabledetachable model..? not for me, as the original entity is pulled using an loadabledetachableModel via a SortedDataProvider :/ if you look around, the all called solution for this is the OpenSessionInViewFilter and the usage of bean id=transactionManager class=org.springframework.orm.jpa.JpaTransactionManager for that (latter one is used by me, too) However, the OpenSessionInViewFilter will not work with wicket, even if mapped to /* in the web.xml Best, Korbinian Nino Saturnino Martinez Vazquez Wael schrieb: Hi Korbinian Im facing the same problems... I also use extended.. So gonna be great to see the outcome of this thread.. I think it could be something about missing usage of loadabledetachable model..? Korbinian Bachl - privat wrote: Hi, I'm currently struggling with the famous lazy load exception under spring + jpa with wicket. The problem is, in my case, that i pull an entity from the database using a spring-bean (@SpringBean) and JPA (hibernate). Then in the wicket class i need to walk the entity tree a bit, based on the needs of the user (preloading wont work, as i dont know the direction the user wants to walk and the whole entity tree is too complex to grab it all at once). If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy load exception (transaction already closed). So I tried to use the OpenSessionInViewFilter to solve this, but it just won't work - no reason why, as the error stays exactly the same. Currently I ended up using this: @PersistenceContext(type = PersistenceContextType.EXTENDED) private EntityManager em; However, I'm not sure if this is the way it is supposed to be? ( I read so far that this disables a big part of springs-transaction handling support but didnt see any impacts so far) Has anyone a different aproach/ solution for this using wicket + spring with JPA? Best, Korbinan PS: im on wicket 1.4-m3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-%2B-spring-%2B-jpa--hibernate-%3D-lazy-load-exception-tp19721199p19722521.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket panels and parent class
possible yes, recommended, no i'd say :-) if you need specific values from MyPanel then pass it via constructor, if you need values/attributes on component (e.g. isVisible) level use getParent() Steve Swinsburg-2 wrote: I guess I am used to the jsp:include method of including panel type objects since I am originally a JSP developer and then anything in the panel instantly has access to the variables defined in the surrounding parent. I guess I could pass along a HashMap of data to the Panel when its constructed, is this possible/recommended? cheers, Steve On 29 Sep 2008, at 12:58, Thies Edeling wrote: And then have to cast it to the class of the parent.. which kinda kills the independent component based idea of reusable panels. Why not pass along the userid when constructing? Or fetch it from the session. Michael Sparer wrote: getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel(myInfoPanel)); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722714.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need to open the Link in another window
or simply add it to the markup ;-) Pills wrote: Try: Link lk = new ExternalLink(lk, http://...;) { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(target, _blank); } }; ;) newbie_to_wicket a écrit : hi, I am using ExternalLink , I'd like to open in another window, but it is opening in the same window. have you any idea. thanks J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Need-to-open-the-Link-in-another-window-tp19666989p19667118.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket sample application
@wicket.apache.org Betreff: Re: Wicket sample application http://cwiki.apache.org/WICKET/documentation-index.html#DocumentationIndex-Codeasdocumentation On Fri, Sep 19, 2008 at 7:00 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: Phonebook has db access. And one of the examples that come with Wicket In Action has that too. Eelco On Fri, Sep 19, 2008 at 10:54 AM, [EMAIL PROTECTED] wrote: But none with database access ? Original-Nachricht Datum: Thu, 18 Sep 2008 05:05:21 -0700 (PDT) Von: Michael Sparer [EMAIL PROTECTED] An: users@wicket.apache.org Betreff: Re: Wicket sample application just go a click further and you'll find plenty http://www.wicketstuff.org/wicket13/ http://www.wicketstuff.org/wicket13/ajax/ http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-examples http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook superoverdrive wrote: Hi there! I am looking for a Wicket sample application (e.g. something like a Petshop) - ideally once that includes things such as: User registration, Admin area, editing data (e.g. with Ajax auto-complete) and an example of displaying data in a table that is read incrementally from the database (e.g. displaying huge database tables without crashing) On the Wicket homepage there are just small examples, but no complete websites done in Wicket Something like: http://bakery.cakephp.org/categories/view/3 would be good for Wicket: Thanks! Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Wicket-sample-application-tp19549890p19551321.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Wicket-sample-application-tp19549890p19602968.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]