wicket-stuff commit rights
Hi to the wicket-stuff admins bunch, on behalf of Dan Walmsley, I'd like to ask for commit rights for him on wicket-stuff. He is especially interested in committing to the gmap2 project and I'd be very happy to welcome him to the developers group. His sourceforge account is: goldsounds (Let's) Have (more) fun, Martin Funk
Re: wicket-stuff commit rights
Done. Janne On Sat, Mar 8, 2008 at 10:09 AM, Martin Funk [EMAIL PROTECTED] wrote: Hi to the wicket-stuff admins bunch, on behalf of Dan Walmsley, I'd like to ask for commit rights for him on wicket-stuff. He is especially interested in committing to the gmap2 project and I'd be very happy to welcome him to the developers group. His sourceforge account is: goldsounds (Let's) Have (more) fun, Martin Funk
How can I update the repeatingview periodically
Hi, all, I develope a repeatingview to show some information like the clock example, updating the clock with AjaxSelfUpdatingTimerBehavior. I want to update these information periodiacally. But it takes no effect. Would anyone give me some hints? ** final RefreshingView view=new RefreshingView(view1){ protected Iterator getItemModels() { ThreadDataProvider provider=new ThreadDataProvider(); return provider.iterator(); } protected void populateItem(Item item) { ThreadInfo threadInfo=(ThreadInfo)item.getModelObject(); Label threadIdLabel=new Label(ThreadId, threadInfo.getThreadIdStr()); Label methodNameLabel=new Label(MethodName, threadInfo.getMethodName()); Label timeStampLabel=new Label(TimeStamp, threadInfo.getTimestamp().toString()); item.add(threadIdLabel); item.add(methodNameLabel); item.add(timeStampLabel); } }; view.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); -- maggie
Re: Javascript not evaluating with AbstractAutoCompleteBehavior
Oh, that sucks. That's VERY misleading because I can override respond and I have the AjaxRequestTarget or call AjaxRequestTarget.get() and get a valid object. Doesn't really make much sense that a different pipeline would be used. I guess I'll have to come up with a better solution using WicketAjaxEvent. Thanks for your help! On Fri, Mar 7, 2008 at 10:57 PM, Matej Knopp [EMAIL PROTECTED] wrote: The autocomplete component doesn't use the wicket ajax pipeline so that ajaxrequesttarget methods will not work for request invoked by the autocomplete behavior. -Matej On Sat, Mar 8, 2008 at 4:50 AM, Andrew Berman [EMAIL PROTECTED] wrote: Hello, If I have the following code: textField.add(new AbstractAutoCompleteBehavior() { /** * */ private static final long serialVersionUID = 1L; @Override protected void onRequest(final String input, RequestCycle requestCycle) { } @Override protected void respond(AjaxRequestTarget target) { target.appendJavascript(alert(\hello\);); } }); When the page renders, the textfield is calling this event and I see the response in the Wicket debug box, but the response is never being parsed and the alert never shows up. Am I missing something here? I tested using an AjaxEventBehavior with onkeypress and it works great. The only problem is that I have no way of getting the text typed into the text field, which is why I used the auto complete stuff. Any thoughts? Thanks for your help! -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-stuff commit rights
thnx 2008/3/8, Janne Hietamäki [EMAIL PROTECTED]: Done. Janne On Sat, Mar 8, 2008 at 10:09 AM, Martin Funk [EMAIL PROTECTED] wrote: Hi to the wicket-stuff admins bunch, on behalf of Dan Walmsley, I'd like to ask for commit rights for him on wicket-stuff. He is especially interested in committing to the gmap2 project and I'd be very happy to welcome him to the developers group. His sourceforge account is: goldsounds (Let's) Have (more) fun, Martin Funk
Re: How can I update the repeatingview periodically
The problem is in the models of the labels. These are statically assigned once. fix: protected void populateItem(Item item) { item.setModel(new CompoundPropertyModel(item.getModel())); ThreadInfo threadInfo=(ThreadInfo)item.getModelObject(); Label threadIdLabel=new Label(threadIdStr); Label methodNameLabel=new Label(methodName); Label timeStampLabel=new Label(timeStamp); item.add(threadIdLabel); item.add(methodNameLabel); item.add(timeStampLabel); } Regards, Erik. maggie wrote: Hi, all, I develope a repeatingview to show some information like the clock example, updating the clock with AjaxSelfUpdatingTimerBehavior. I want to update these information periodiacally. But it takes no effect. Would anyone give me some hints? ** final RefreshingView view=new RefreshingView(view1){ protected Iterator getItemModels() { ThreadDataProvider provider=new ThreadDataProvider(); return provider.iterator(); } protected void populateItem(Item item) { ThreadInfo threadInfo=(ThreadInfo)item.getModelObject(); Label threadIdLabel=new Label(ThreadId, threadInfo.getThreadIdStr()); Label methodNameLabel=new Label(MethodName, threadInfo.getMethodName()); Label timeStampLabel=new Label(TimeStamp, threadInfo.getTimestamp().toString()); item.add(threadIdLabel); item.add(methodNameLabel); item.add(timeStampLabel); } }; view.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any Wicket way to submit 2 forms with 1 submit button?
Is there a reason why you do not merge the two forms in one form? Lars On Sat, Mar 8, 2008 at 8:22 AM, Justin Morgan - Logic Sector [EMAIL PROTECTED] wrote: Here's a problem that other people may have encountered. Hopefully there's a Wicket way to solve it. The scenario... I have two forms on my Contact Us page. There is a login form at the top of the page with a submit button. There's also the contact form at the bottom of the same page, also with its own submit button. (The login form is in a panel that's shared across many pages). The problem is... If the user enters text into the contact form, then enters a username +password in the login form and submits the login, then any text in the contact us form goes away. From a development perspective this is to be expected; the contact us form was never submitted. However, that's a terrible user experience. The user could unexpectedly lose a lot of text in the contact form. Therefore, I need to submit two forms when the user clicks the login submit button. That way the user won't lose their contact text. Presumably this could be fixed via Ajax-ifying the login form. However, I'm hoping there's a non JavaScript option that would work (i.e., a Wicket way)? Thanks for any help, Justin - 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]
Re: Wicket 1.3 relative path problem
But maybe we should build in a hook (wicket filter or application) where people get the current browser url, the url part that should be made relative (or absolute) and thn let them decided what to return there Default impl is what we do now johan On Fri, Mar 7, 2008 at 10:54 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: well, we are not going to make it backwards compatible, so saying that it used to work in 1.2 isnt going to help you... -igor On Fri, Mar 7, 2008 at 1:48 PM, Renan Camponez [EMAIL PROTECTED] wrote: I know that... Thats my problem.. :) On Fri, Mar 7, 2008 at 6:47 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: wicket 1.3 is not backwards compatible with 1.2 -igor On Fri, Mar 7, 2008 at 1:45 PM, Renan Camponez [EMAIL PROTECTED] wrote: The problem is that at wicket 1.2 it works... Bcs wicket 1.2 use /myapp/wicketservlet/blabla.. On Fri, Mar 7, 2008 at 6:39 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: hrm, dont know if we support that kind of thing, or took it into consideration while testing. can you not use wicket as a filter that gets hit before your servlet? -igor On Fri, Mar 7, 2008 at 1:37 PM, Renan Camponez [EMAIL PROTECTED] wrote: Exacly.. On Fri, Mar 7, 2008 at 6:34 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: so a nonwicket /app/mainservlet servlet redirects to the wicket servlet? -igor On Fri, Mar 7, 2008 at 1:05 PM, Renan Camponez [EMAIL PROTECTED] wrote: Igor, Thanks for quick answer... My problem is a little more difficult to solve.. The problem is that I have a servlet at /app/mainservlet who handle if all requests... If i do a request to wicket Page, it redirects me to wicket servlet.. But my URL remains the same.. That means that I'm acessing for example: /app/mainservlet/getWicket1 This goes to the wicketservlet, and returns the page... With all relative images, buttons, ajaxSubmitLinks... The onclick method for ajaxSubmit links are ../../../../ too.. But as I am at /app/mainservlet, it goes wrong... Thats my real problem... Any ideia? On Fri, Mar 7, 2008 at 6:00 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: use ContextImage class also current wicket takes over contextroot/resources directory, so you might want to use something else. -igor On Fri, Mar 7, 2008 at 12:43 PM, Renan Camponez [EMAIL PROTECTED] wrote: Hi.. I have a image.. in my HTML it is img src=resources/images/ibFind.gif/.. After wicket, it is img src=../../../../resources/images/ibFind.gif But I need to have absolute path instead of ../../../ What should I override? What is responsible to do that replace? I've already tried to override the WicketFilter getRelativePath() method, but it doesn't works.. Please, help! Thanks, Renan - 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]
Re: CompoundModel based on proxies
Well, it'll be built into v1.1 if you need it. :) I took care of that yesterday. It wasn't as easy as it might seem to make sure your proxies are serializable. CGLIB didn't want to play nice. They don't make their NoOp classes serializable for some reason. I had a little easier time with Javassist and JDK proxies. I am playing now with the commons-proxy But i dont get what method to call to get the right ProxyFactory.. You dont say that i have to use at compile time one of the ProxyFactory implementations right? Because then the whole purpose of commons-proxy is gone. The thing is i want to be able to call something like this: ProxyFactory factory = ProxyFactory.getInstance() and then what ever instance i get back depends on configuration or classpath I like the SLF4J approache where you just drop you wanted implementation in the classpath and you are done. But the commons-logging also works for me where you set it in a property file which one to use. But that last one has classloading problems i think so maybe it is not a good idea to copy that... So to mimic the slf4j you should have: commons-proxy-api.jar commons-proxy-cglib.jar commons-proxy-javaassist.jar and then if you want to use cglib drop in the commons api and the commons cglib jar with the cglib jar itself. johan
Re: CompoundModel based on proxies
On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: Well, it'll be built into v1.1 if you need it. :) I took care of that yesterday. It wasn't as easy as it might seem to make sure your proxies are serializable. CGLIB didn't want to play nice. They don't make their NoOp classes serializable for some reason. I had a little easier time with Javassist and JDK proxies. I am playing now with the commons-proxy But i dont get what method to call to get the right ProxyFactory.. You dont say that i have to use at compile time one of the ProxyFactory implementations right? Because then the whole purpose of commons-proxy is gone. The thing is i want to be able to call something like this: ProxyFactory factory = ProxyFactory.getInstance() and then what ever instance i get back depends on configuration or classpath I like the SLF4J approache where you just drop you wanted implementation in the classpath and you are done. But the commons-logging also works for me where you set it in a property file which one to use. But that last one has classloading problems i think so maybe it is not a good idea to copy that... So to mimic the slf4j you should have: commons-proxy-api.jar commons-proxy-cglib.jar commons-proxy-javaassist.jar and then if you want to use cglib drop in the commons api and the commons cglib jar with the cglib jar itself. Commons Proxy has no discovery built into it. It's not really designed for that. You just need to instantiate what you want. File a JIRA for adding slf4j-like discovery and I'll post a discussion to the rest of the dev list about it. johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicketstuff Rome / RSS reader page/panel etc..
Forget the previous post Nino Saturnino Martinez Vazquez Wael wrote: Yes it was a reader/consumer I was looking for.. I'll just roll my own then.. regards Nino Ryan Sonnek wrote: Are you looking for how to *publish* RSS feeds, or consume them? the wicketstuff-rome project helps with publishing RSS feeds from within your application. If you're looking to consume rss feeds, ROME makes it pretty trivial to do. Not sure how much value there is for a generic display RSS feeds panel. BUT, if think it'd be worthwhile, let me know! I'd be happy to add it to the wicketstuff-rome project. Yes please add a RSS feeds panel.. :) Sometimes it's nice when the trivial stuff are done for you:) On Fri, Mar 7, 2008 at 2:41 PM, Sean Sullivan [EMAIL PROTECTED] wrote: Try wicketstuff-rome: http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-rome/ http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-rome-examples/ On 3/7/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Just wonder if there are such a thing(could'nt find it)? If not would it be okay if I added it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love -Jme for fun 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]
Re: Textfield length validator?
This restricts the input field to a max length, but doesn't check the input on the server side. To be sure the input is not longer than max length, you should also add the length validator. You could check that in the database layer, but somehow I find validation feedback messages easier to interpret than a SQL exception :-) Martijn On 3/5/08, Scott Swank [EMAIL PROTECTED] wrote: We have the following on our base TextField public void setMaxLength(int maxLength) { this.maxLength = maxLength; if (maxLength 0) add(new AttributeModifier(maxlength, true, new Model(maxLength))); } On Tue, Mar 4, 2008 at 11:39 AM, Michael Mehrle [EMAIL PROTECTED] wrote: Is there a validator in wicket that constrains the input length? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.1 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
On 3/8/08, James Carman [EMAIL PROTECTED] wrote: On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: Well, it'll be built into v1.1 if you need it. :) I took care of that yesterday. It wasn't as easy as it might seem to make sure your proxies are serializable. CGLIB didn't want to play nice. They don't make their NoOp classes serializable for some reason. I had a little easier time with Javassist and JDK proxies. I am playing now with the commons-proxy But i dont get what method to call to get the right ProxyFactory.. You dont say that i have to use at compile time one of the ProxyFactory implementations right? Because then the whole purpose of commons-proxy is gone. The thing is i want to be able to call something like this: ProxyFactory factory = ProxyFactory.getInstance() and then what ever instance i get back depends on configuration or classpath I like the SLF4J approache where you just drop you wanted implementation in the classpath and you are done. But the commons-logging also works for me where you set it in a property file which one to use. But that last one has classloading problems i think so maybe it is not a good idea to copy that... So to mimic the slf4j you should have: commons-proxy-api.jar commons-proxy-cglib.jar commons-proxy-javaassist.jar and then if you want to use cglib drop in the commons api and the commons cglib jar with the cglib jar itself. Commons Proxy has no discovery built into it. It's not really designed for that. You just need to instantiate what you want. File a JIRA for adding slf4j-like discovery and I'll post a discussion to the rest of the dev list about it. That should have been Please file a JIRA. :) johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicketstuff Rome / RSS reader page/panel etc..
Yes it was a reader/consumer I was looking for.. I'll just roll my own then.. regards Nino Ryan Sonnek wrote: Are you looking for how to *publish* RSS feeds, or consume them? the wicketstuff-rome project helps with publishing RSS feeds from within your application. If you're looking to consume rss feeds, ROME makes it pretty trivial to do. Not sure how much value there is for a generic display RSS feeds panel. BUT, if think it'd be worthwhile, let me know! I'd be happy to add it to the wicketstuff-rome project. On Fri, Mar 7, 2008 at 2:41 PM, Sean Sullivan [EMAIL PROTECTED] wrote: Try wicketstuff-rome: http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-rome/ http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-rome-examples/ On 3/7/08, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Just wonder if there are such a thing(could'nt find it)? If not would it be okay if I added it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love -Jme for fun 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]
Re: CompoundModel based on proxies
for wicket this is a feature it really should have now it defeats the purpose i have to make a decission in wicket which factory i use Then i can just as well directly compile against cglib. I cant make the api that way that the developer has to give that factory to use. That would be completely horrible, johan On Sat, Mar 8, 2008 at 1:15 PM, James Carman [EMAIL PROTECTED] wrote: On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: Well, it'll be built into v1.1 if you need it. :) I took care of that yesterday. It wasn't as easy as it might seem to make sure your proxies are serializable. CGLIB didn't want to play nice. They don't make their NoOp classes serializable for some reason. I had a little easier time with Javassist and JDK proxies. I am playing now with the commons-proxy But i dont get what method to call to get the right ProxyFactory.. You dont say that i have to use at compile time one of the ProxyFactory implementations right? Because then the whole purpose of commons-proxy is gone. The thing is i want to be able to call something like this: ProxyFactory factory = ProxyFactory.getInstance() and then what ever instance i get back depends on configuration or classpath I like the SLF4J approache where you just drop you wanted implementation in the classpath and you are done. But the commons-logging also works for me where you set it in a property file which one to use. But that last one has classloading problems i think so maybe it is not a good idea to copy that... So to mimic the slf4j you should have: commons-proxy-api.jar commons-proxy-cglib.jar commons-proxy-javaassist.jar and then if you want to use cglib drop in the commons api and the commons cglib jar with the cglib jar itself. Commons Proxy has no discovery built into it. It's not really designed for that. You just need to instantiate what you want. File a JIRA for adding slf4j-like discovery and I'll post a discussion to the rest of the dev list about it. johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: for wicket this is a feature it really should have now it defeats the purpose i have to make a decission in wicket which factory i use Then i can just as well directly compile against cglib. I cant make the api that way that the developer has to give that factory to use. That would be completely horrible, You could always implement your own brand of discovery for your project (perhaps by using the service discovery feature built into the jdk). I like the idea of splitting it (and doing it the slf4j way rather than the JCL way). I have actually suggested that we start an exploratory branch of JCL to make it work more like slf4j (we've been talking about this since 2005). Anyway, if you file a JIRA issue, I'll make sure we have a discussion with the other devs. For your immediate purposes, commons-discovery is available also. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Javascript not evaluating with AbstractAutoCompleteBehavior
that does suck! why would wicket use a different pipeline??? that is misleading!!! Date: Sat, 8 Mar 2008 00:21:26 -0800 From: [EMAIL PROTECTED] To: users@wicket.apache.org Subject: Re: Javascript not evaluating with AbstractAutoCompleteBehavior Oh, that sucks. That's VERY misleading because I can override respond and I have the AjaxRequestTarget or call AjaxRequestTarget.get() and get a valid object. Doesn't really make much sense that a different pipeline would be used. I guess I'll have to come up with a better solution using WicketAjaxEvent. Thanks for your help! On Fri, Mar 7, 2008 at 10:57 PM, Matej Knopp [EMAIL PROTECTED] wrote: The autocomplete component doesn't use the wicket ajax pipeline so that ajaxrequesttarget methods will not work for request invoked by the autocomplete behavior. -Matej On Sat, Mar 8, 2008 at 4:50 AM, Andrew Berman [EMAIL PROTECTED] wrote: Hello, If I have the following code: textField.add(new AbstractAutoCompleteBehavior() { /** * */ private static final long serialVersionUID = 1L; @Override protected void onRequest(final String input, RequestCycle requestCycle) { } @Override protected void respond(AjaxRequestTarget target) { target.appendJavascript(alert(\hello\);); } }); When the page renders, the textfield is calling this event and I see the response in the Wicket debug box, but the response is never being parsed and the alert never shows up. Am I missing something here? I tested using an AjaxEventBehavior with onkeypress and it works great. The only problem is that I have no way of getting the text typed into the text field, which is why I used the auto complete stuff. Any thoughts? Thanks for your help! -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
I see the JIRA, I'll go ahead and start the discussion on the dev list. On 3/8/08, James Carman [EMAIL PROTECTED] wrote: On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: for wicket this is a feature it really should have now it defeats the purpose i have to make a decission in wicket which factory i use Then i can just as well directly compile against cglib. I cant make the api that way that the developer has to give that factory to use. That would be completely horrible, You could always implement your own brand of discovery for your project (perhaps by using the service discovery feature built into the jdk). I like the idea of splitting it (and doing it the slf4j way rather than the JCL way). I have actually suggested that we start an exploratory branch of JCL to make it work more like slf4j (we've been talking about this since 2005). Anyway, if you file a JIRA issue, I'll make sure we have a discussion with the other devs. For your immediate purposes, commons-discovery is available also. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any Wicket way to submit 2 forms with 1 submit button?
You can use Wicket nested forms support for this. Just put both forms to one common form. That way the text in both forms will be preserved (though only the submitted one will actually be processed). -Matej On Sat, Mar 8, 2008 at 10:55 AM, lars vonk [EMAIL PROTECTED] wrote: Is there a reason why you do not merge the two forms in one form? Lars On Sat, Mar 8, 2008 at 8:22 AM, Justin Morgan - Logic Sector [EMAIL PROTECTED] wrote: Here's a problem that other people may have encountered. Hopefully there's a Wicket way to solve it. The scenario... I have two forms on my Contact Us page. There is a login form at the top of the page with a submit button. There's also the contact form at the bottom of the same page, also with its own submit button. (The login form is in a panel that's shared across many pages). The problem is... If the user enters text into the contact form, then enters a username +password in the login form and submits the login, then any text in the contact us form goes away. From a development perspective this is to be expected; the contact us form was never submitted. However, that's a terrible user experience. The user could unexpectedly lose a lot of text in the contact form. Therefore, I need to submit two forms when the user clicks the login submit button. That way the user won't lose their contact text. Presumably this could be fixed via Ajax-ifying the login form. However, I'm hoping there's a non JavaScript option that would work (i.e., a Wicket way)? Thanks for any help, Justin - 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] -- Resizable and reorderable grid components. http://www.inmethod.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
Couldn't you also do: ProxyFactory pf = ...; new SharedPropertyModelCustomer(pf, customer); So, the client tells you what proxy factory implementation to use. On 3/8/08, James Carman [EMAIL PROTECTED] wrote: I see the JIRA, I'll go ahead and start the discussion on the dev list. On 3/8/08, James Carman [EMAIL PROTECTED] wrote: On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: for wicket this is a feature it really should have now it defeats the purpose i have to make a decission in wicket which factory i use Then i can just as well directly compile against cglib. I cant make the api that way that the developer has to give that factory to use. That would be completely horrible, You could always implement your own brand of discovery for your project (perhaps by using the service discovery feature built into the jdk). I like the idea of splitting it (and doing it the slf4j way rather than the JCL way). I have actually suggested that we start an exploratory branch of JCL to make it work more like slf4j (we've been talking about this since 2005). Anyway, if you file a JIRA issue, I'll make sure we have a discussion with the other devs. For your immediate purposes, commons-discovery is available also. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CompoundModel based on proxies
no i really dont like that then everywhere there code they need to do that, that is not an option. and they have to program themselfs agains the proxy api. I dont want that developers also have the learn/do that This is something commons-proxy needs to do On Sat, Mar 8, 2008 at 3:29 PM, James Carman [EMAIL PROTECTED] wrote: Couldn't you also do: ProxyFactory pf = ...; new SharedPropertyModelCustomer(pf, customer); So, the client tells you what proxy factory implementation to use. On 3/8/08, James Carman [EMAIL PROTECTED] wrote: I see the JIRA, I'll go ahead and start the discussion on the dev list. On 3/8/08, James Carman [EMAIL PROTECTED] wrote: On 3/8/08, Johan Compagner [EMAIL PROTECTED] wrote: for wicket this is a feature it really should have now it defeats the purpose i have to make a decission in wicket which factory i use Then i can just as well directly compile against cglib. I cant make the api that way that the developer has to give that factory to use. That would be completely horrible, You could always implement your own brand of discovery for your project (perhaps by using the service discovery feature built into the jdk). I like the idea of splitting it (and doing it the slf4j way rather than the JCL way). I have actually suggested that we start an exploratory branch of JCL to make it work more like slf4j (we've been talking about this since 2005). Anyway, if you file a JIRA issue, I'll make sure we have a discussion with the other devs. For your immediate purposes, commons-discovery is available also. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript not evaluating with AbstractAutoCompleteBehavior
FYI: you might want to check out the wicketstuff-scriptaculous auto complete component instead. http://wicketstuff.org/confluence/display/STUFFWIKI/Script.aculo.us+AutoCompleteBehavior On Sat, Mar 8, 2008 at 6:38 AM, i ii [EMAIL PROTECTED] wrote: that does suck! why would wicket use a different pipeline??? that is misleading!!! Date: Sat, 8 Mar 2008 00:21:26 -0800 From: [EMAIL PROTECTED] To: users@wicket.apache.org Subject: Re: Javascript not evaluating with AbstractAutoCompleteBehavior Oh, that sucks. That's VERY misleading because I can override respond and I have the AjaxRequestTarget or call AjaxRequestTarget.get() and get a valid object. Doesn't really make much sense that a different pipeline would be used. I guess I'll have to come up with a better solution using WicketAjaxEvent. Thanks for your help! On Fri, Mar 7, 2008 at 10:57 PM, Matej Knopp [EMAIL PROTECTED] wrote: The autocomplete component doesn't use the wicket ajax pipeline so that ajaxrequesttarget methods will not work for request invoked by the autocomplete behavior. -Matej On Sat, Mar 8, 2008 at 4:50 AM, Andrew Berman [EMAIL PROTECTED] wrote: Hello, If I have the following code: textField.add(new AbstractAutoCompleteBehavior() { /** * */ private static final long serialVersionUID = 1L; @Override protected void onRequest(final String input, RequestCycle requestCycle) { } @Override protected void respond(AjaxRequestTarget target) { target.appendJavascript(alert(\hello\);); } }); When the page renders, the textfield is calling this event and I see the response in the Wicket debug box, but the response is never being parsed and the alert never shows up. Am I missing something here? I tested using an AjaxEventBehavior with onkeypress and it works great. The only problem is that I have no way of getting the text typed into the text field, which is why I used the auto complete stuff. Any thoughts? Thanks for your help! -- Resizable and reorderable grid components. http://www.inmethod.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]
Re: Textfield length validator?
and thats why it would be nice to look into that a Validator can also be a Behavior so that it can set the max length attribute of a text input.. johan On Sat, Mar 8, 2008 at 1:30 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: This restricts the input field to a max length, but doesn't check the input on the server side. To be sure the input is not longer than max length, you should also add the length validator. You could check that in the database layer, but somehow I find validation feedback messages easier to interpret than a SQL exception :-) Martijn On 3/5/08, Scott Swank [EMAIL PROTECTED] wrote: We have the following on our base TextField public void setMaxLength(int maxLength) { this.maxLength = maxLength; if (maxLength 0) add(new AttributeModifier(maxlength, true, new Model(maxLength))); } On Tue, Mar 4, 2008 at 11:39 AM, Michael Mehrle [EMAIL PROTECTED] wrote: Is there a validator in wicket that constrains the input length? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.1 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxFormSubmitBehavior not working in Safari
I created a JIRA issue for this a couple weeks back... https://issues.apache.org/jira/browse/WICKET-1362 ...but it hasn't been touched yet. Anyone else seen this problem? Thanks, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sort order in DataView with ListDataProvider
Any idea as to why my sort order is out of whack? Michael -Original Message- From: Michael Mehrle [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 2:44 PM To: users@wicket.apache.org Subject: RE: Sort order in DataView with ListDataProvider Okay - some needed input first: - addComments is called inside the constructor of a Panel. - FooCommentComparator sorts on a java.util.Date field inside of FooComment - FooComment has a user, date, and message field - For some reason the panel shows the comments sorted by the comment's message field private void addComments() { ListFooComment comments = getComments(); IDataProvider dataProvider = new ListDataProvider(comments); DataView commentPanels = new DataView(fooPanels, dataProvider, PAGE_LENGTH) { private static final long serialVersionUID = -3952819461137344195L; protected void populateItem(Item item) { item.add(new FooCommentPanel(commentPanel, item.getModel())); } }; add(commentPanels); PagingNavigator navigator = new PagingNavigator(navigator, commentPanels); add(navigator); // if there aren't too few comments hide the navigator if (comments.size() = PAGE_LENGTH) { navigator.setVisible(false); } } private ListFooComment getComments() { ListFooComment list = new ArrayListFooComment(((Foo) CommentFormPanel.this.getModelObject()).getComments()); Collections.sort(list, new FooCommentComparator()); if (list == null) { list = new ArrayListFooComment(); } int size = list.size(); if (LOG.isDebugEnabled()) { String singPlur = size == 1 ? comment. : comments.; LOG.debug(Foo has + size + singPlur); } return list; } -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2008 2:07 PM To: users@wicket.apache.org Subject: Re: Sort order in DataView with ListDataProvider paste your code -igor On Fri, Mar 7, 2008 at 2:03 PM, Michael Mehrle [EMAIL PROTECTED] wrote: I'm passing a ListDataProvider when creating a DataView that shows rows of comments. Each comment has a name, a date, and a message. I am creating the ListDataProvider with an ArrayList, which also has been sorted with a Comparator on the date. For whatever reason on the final page my comments are however sorted alphabetically by the message. What am I doing wrong here? I thought that sorting the list passed into the ListDataProvider was sufficient. Any help would be appreciated. Michael - 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]
The old setOutputMarkupId() problem
I'm getting that error although all my panels that are being updated have the id set. I assume I don't have to add call setOutputMarkupId() on any components inside of the parent panel that I am updating? This stuff keeps happening often and is a huge timesink - wished there was a more elegant way... Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript not evaluating with AbstractAutoCompleteBehavior
I'm doing a custom autocomplete and simply wanted to use AbstractAutoCompleteBehavior to at least pass me back the search term. I want to return a JavaScript call with the results which opens up a custom results panel. I'm not looking to pass back HTML with the results. I think Wicket should either change the behavior to use the same pipeline as Ajax event or make the respond method final and make sure that AjaxTargetRequest.get() returns null or an exception. On Sat, Mar 8, 2008 at 7:35 AM, Ryan Sonnek [EMAIL PROTECTED] wrote: FYI: you might want to check out the wicketstuff-scriptaculous auto complete component instead. http://wicketstuff.org/confluence/display/STUFFWIKI/Script.aculo.us+AutoCompleteBehavior On Sat, Mar 8, 2008 at 6:38 AM, i ii [EMAIL PROTECTED] wrote: that does suck! why would wicket use a different pipeline??? that is misleading!!! Date: Sat, 8 Mar 2008 00:21:26 -0800 From: [EMAIL PROTECTED] To: users@wicket.apache.org Subject: Re: Javascript not evaluating with AbstractAutoCompleteBehavior Oh, that sucks. That's VERY misleading because I can override respond and I have the AjaxRequestTarget or call AjaxRequestTarget.get() and get a valid object. Doesn't really make much sense that a different pipeline would be used. I guess I'll have to come up with a better solution using WicketAjaxEvent. Thanks for your help! On Fri, Mar 7, 2008 at 10:57 PM, Matej Knopp [EMAIL PROTECTED] wrote: The autocomplete component doesn't use the wicket ajax pipeline so that ajaxrequesttarget methods will not work for request invoked by the autocomplete behavior. -Matej On Sat, Mar 8, 2008 at 4:50 AM, Andrew Berman [EMAIL PROTECTED] wrote: Hello, If I have the following code: textField.add(new AbstractAutoCompleteBehavior() { /** * */ private static final long serialVersionUID = 1L; @Override protected void onRequest(final String input, RequestCycle requestCycle) { } @Override protected void respond(AjaxRequestTarget target) { target.appendJavascript(alert(\hello\);); } }); When the page renders, the textfield is calling this event and I see the response in the Wicket debug box, but the response is never being parsed and the alert never shows up. Am I missing something here? I tested using an AjaxEventBehavior with onkeypress and it works great. The only problem is that I have no way of getting the text typed into the text field, which is why I used the auto complete stuff. Any thoughts? Thanks for your help! -- Resizable and reorderable grid components. http://www.inmethod.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]
append a converter or coversion function
Hello: I wonder how to append a converter or java method to a component so that I would affect what is already defined. For example, I want camelize a TextField(or some customized subclass) so that after the converter already defined completes the conversion (regardless what has been done in the chain) , I could use the added converted/method to make the final conversion to my need. The example I am seeing appears to overide and only one can be defined for a component, unlike validators, that I could add a chain of them. Let me know if I am wrong about this. Thanks
Re: append a converter or coversion function
i think a model decorator is more appropriate here -igor On Sat, Mar 8, 2008 at 3:10 PM, [EMAIL PROTECTED] wrote: Hello: I wonder how to append a converter or java method to a component so that I would affect what is already defined. For example, I want camelize a TextField(or some customized subclass) so that after the converter already defined completes the conversion (regardless what has been done in the chain) , I could use the added converted/method to make the final conversion to my need. The example I am seeing appears to overide and only one can be defined for a component, unlike validators, that I could add a chain of them. Let me know if I am wrong about this. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: append a converter or coversion function
I could use both model or onSubmit to do what I mentioned. But this resulted in repeating coding. If I put the special conversion code in converter, it would be handily reusable by me or others without worring about the convertion logic for each model or form. Validator chaining is the example of what I meant i think a model decorator is more appropriate here -igor On Sat, Mar 8, 2008 at 3:10 PM, [EMAIL PROTECTED] wrote: Hello: I wonder how to append a converter or java method to a component so that I would affect what is already defined. For example, I want camelize a TextField(or some customized subclass) so that after the converter already defined completes the conversion (regardless what has been done in the chain) , I could use the added converted/method to make the final conversion to my need. The example I am seeing appears to overide and only one can be defined for a component, unlike validators, that I could add a chain of them. Let me know if I am wrong about this. Thanks - 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]
Re: append a converter or coversion function
a model decorator would not result in any repeated code -igor On Sat, Mar 8, 2008 at 4:30 PM, [EMAIL PROTECTED] wrote: I could use both model or onSubmit to do what I mentioned. But this resulted in repeating coding. If I put the special conversion code in converter, it would be handily reusable by me or others without worring about the convertion logic for each model or form. Validator chaining is the example of what I meant i think a model decorator is more appropriate here -igor On Sat, Mar 8, 2008 at 3:10 PM, [EMAIL PROTECTED] wrote: Hello: I wonder how to append a converter or java method to a component so that I would affect what is already defined. For example, I want camelize a TextField(or some customized subclass) so that after the converter already defined completes the conversion (regardless what has been done in the chain) , I could use the added converted/method to make the final conversion to my need. The example I am seeing appears to overide and only one can be defined for a component, unlike validators, that I could add a chain of them. Let me know if I am wrong about this. Thanks - 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]
Re: DropDownChoice getting value into the model
Hi everyone, Hi Erik, I am sorry for so late post. But am going to go back to our DropDownChoice discussion. If you suggest me to create a list of integers and use a special renderer implementation to retrieve a displayable value you should take into account that in case if we have a list of indices we can easily look up in an array or a list using an index. But if we have a list of unordered integers for example to do such a lookup we need to create a map and search this map every time we render a single option. That comes from the fact that a relationship between a value and its displayable equivalent is not obvious for a renderer. So I would ask to add an index of an options being rendered to the getDisplayValue method. Vitaly On Fri, Mar 7, 2008 at 10:33 PM, Erik van Oosten [EMAIL PROTECTED] wrote: Hello Vitaly, That is not true, you are thinking to complicated (I did in the past as well). If you want to set an integer on the model, then the choices must be a list of integers. In addition you set an IChoiceRenderer that can display the integer as a sensible string. Regards, Erik. Vitaly Tsaplin wrote: The DropDownBox component is in fact well designed in theory. But I think the way it works is a bit inconvenient in practice. Normally the main purpose of this component in to supply some value or an index for a model but a label is needed only for to be presented to a user. Unfortunately we are supposed to use either the same value (a string representation) for both pupposes or to use some kind of a wrapper and to pollute the model by some strange SelectOption object even though that the model would normally accept an integer. Vitaly - 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]
Re: Textfield length validator?
I agree. There's already a JIRA filed for this enhancement. Please vote for this issue if you want to see it fixed! hopefully it'll make it into 1.4? https://issues.apache.org/jira/browse/WICKET-1310 On Sat, Mar 8, 2008 at 10:27 AM, Johan Compagner [EMAIL PROTECTED] wrote: and thats why it would be nice to look into that a Validator can also be a Behavior so that it can set the max length attribute of a text input.. johan On Sat, Mar 8, 2008 at 1:30 PM, Martijn Dashorst [EMAIL PROTECTED] wrote: This restricts the input field to a max length, but doesn't check the input on the server side. To be sure the input is not longer than max length, you should also add the length validator. You could check that in the database layer, but somehow I find validation feedback messages easier to interpret than a SQL exception :-) Martijn On 3/5/08, Scott Swank [EMAIL PROTECTED] wrote: We have the following on our base TextField public void setMaxLength(int maxLength) { this.maxLength = maxLength; if (maxLength 0) add(new AttributeModifier(maxlength, true, new Model(maxLength))); } On Tue, Mar 4, 2008 at 11:39 AM, Michael Mehrle [EMAIL PROTECTED] wrote: Is there a validator in wicket that constrains the input length? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott Swank reformed mathematician - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.1 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1 - 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]