Re: [OT] where is JPA 2.0 API spec in maven?
i just think it's strange, I'd have thought that there would have been one and only one official JPA 2 api one could depend on. But I see my suspicion was correct. Thanks to all for replying on this non wicket topic.. 2010/9/8 Korbinian Bachl - privat korbinian.ba...@whiskyworld.de: in fact the current is 2.1.1, but 2.0.0 is reference implementation and for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided here - just API); - usually one uses JPA API of the persistence provider he's using as long as he won't depend on an app server; Best, Korbinian Am 08.09.10 16:51, schrieb Jan Kriesten: Hi, JPA 2: dependency groupIdorg.eclipse.persistence/groupId artifactIdeclipselink/artifactId version2.0.0/version scopeprovided/scope /dependency AFAIK the current version is 2.0.2 Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Ajax integration
Rodolfo Hansen wrote: How can I use Wicket.Ajax.Request to post a json string to a DefaultAjaxBehaviour? Maybe this could help: http://josephonit.wordpress.com/2010/09/02/wicket-providing-json-content-through-ajax/ On the Javascript side I basically did something like this: function setupSend(xhr) { xhr.setRequestHeader(Wicket-Ajax, true); if (typeof(Wicket.Focus.lastFocusId) != undefined Wicket.Focus.lastFocusId != Wicket.Focus.lastFocusId != null) xhr.setRequestHeader(Wicket-FocusedElementId, Wicket.Focus.lastFocusId); xhr.setRequestHeader(Accept, text/xml); }; function success(data) { var xml = data; if (typeof xml == string) { xml = new ActiveXObject(Microsoft.XMLDOM); xml.async = false; xml.loadXML(data); } (new Wicket.Ajax.Call(${feedbackURL})).loadedCallback(xml); }; function call(data, revertFunc) { $.ajax({ url : ${feedbackURL}, type: 'POST', contentType: 'application/json;charset=UTF-8' ,dataType: (($.browser.msie) ? text : xml), data : $.toJSON(data) ,beforeSend : setupSend ,success : success, error : revertFunc }); }; to do something similar to what Wicket.Ajax.Request.post does, except I change the contentType to 'application/json' - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 506 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium, morgens ab 9:15 in Ihrer Mailbox. Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt unsere Redaktion unter redakt...@thomas-daily.de entgegen. Redaktionsschluss für die TD Morning News ist täglich um 8:45. Register free of charge at https://www.thomas-daily.de/user/sign-in to have the TD Morning News, a selection of the latest topics from TD Premium, delivered to your mailbox from 9:15 every morning. Our editorial department receives the latest press releases for the TD Morning News and TD Premium at redakt...@thomas-daily.de. The editorial deadline for the TD Morning News is 8.45am daily. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] where is JPA 2.0 API spec in maven?
Hi Korbinian, in fact the current is 2.1.1, but 2.0.0 is reference implementation and for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided here - just API); actually, I meant the javax.persistence-API, which can be referenced with eclipse: dependency groupIdorg.eclipse.persistence/groupId artifactIdjavax.persistence/artifactId version2.0.2/version /dependency The current version there is 2.0.2. From the release notification: The javax.persistence library has been updated in our repository and in maven. The new version, 2.0.2, should address any issues people have had related to some churn of previous versioned javax.persistence libraries in our maven repository. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Custom autocompletion event 'on selection change'
Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] where is JPA 2.0 API spec in maven?
Oh, didn't know that - thx :) in fact I haven't yet had any situation where I needed the JPA-API from maven but not any persistence library as well; Nino, for what is it good for in your case? Best Am 09.09.10 09:34, schrieb Jan Kriesten: Hi Korbinian, in fact the current is 2.1.1, but 2.0.0 is reference implementation and for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided here - just API); actually, I meant the javax.persistence-API, which can be referenced with eclipse: dependency groupIdorg.eclipse.persistence/groupId artifactIdjavax.persistence/artifactId version2.0.2/version /dependency The current version there is 2.0.2. From the release notification: The javax.persistence library has been updated in our repository and in maven. The new version, 2.0.2, should address any issues people have had related to some churn of previous versioned javax.persistence libraries in our maven repository. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom autocompletion event 'on selection change'
add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be
How to implement single-select functionality for a set of buttons?
Hi All, I just wanted to ask how to go about creating a component that would mimic radio group or dropdown choice functionality, but be displayed as a set of buttons? Basically the choices would be displayed as toggle buttons. When pressing a button, it would be activated and the model changed to that value (as with a dropdown/radio group), with the others deselected. How would I go about implementing this? I saw the AbstractSingleSelectChoice class, which I extended, but I'm a bit unclear how the component is supposed to create the buttons representing the choices and the logic for selecting and updating the model. etc. Any help would be greatly appreciated. Thanks! Regards, Ces
Re: Custom autocompletion event 'on selection change'
Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the unwanted side effect that other values will be submitted too. Then I tried with autoCompleteField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // sout here }); But this will fire only every time I change the textfield value, not the selection of the suggestions :-( Regards, Peter. add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://jetwick.com twitter search prototype - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to implement single-select functionality for a set of buttons?
http://docs.jquery.com/UI/Button? Ernesto On Thu, Sep 9, 2010 at 12:38 PM, Early Morning goodmorning...@gmail.com wrote: Hi All, I just wanted to ask how to go about creating a component that would mimic radio group or dropdown choice functionality, but be displayed as a set of buttons? Basically the choices would be displayed as toggle buttons. When pressing a button, it would be activated and the model changed to that value (as with a dropdown/radio group), with the others deselected. How would I go about implementing this? I saw the AbstractSingleSelectChoice class, which I extended, but I'm a bit unclear how the component is supposed to create the buttons representing the choices and the logic for selecting and updating the model. etc. Any help would be greatly appreciated. Thanks! Regards, Ces - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom autocompletion event 'on selection change'
Hi Peter, Looking at the code I think you'll need to touch wicket-autocomplete.js. Copy it to your project and override org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse) so that it loads your .js file. Then make org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT, AutoCompleteSettings) return your custom AutoCompleteBehavior. In the .js itself you'll need to touch function setSelected(newSelected) at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have to make your Ajax call. Good luck! On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote: Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the unwanted side effect that other values will be submitted too. Then I tried with autoCompleteField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // sout here }); But this will fire only every time I change the textfield value, not the selection of the suggestions :-( Regards, Peter. add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://jetwick.com twitter search prototype - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How can I capture the data on one panel 1 when i click submit button on panel 2
Ben benarjee_g at yahoo.com writes: Here is my panel1 ... add(new ImageQualityForm(imageQualityForm, new CompoundPropertyModel(imageQuality), aform)); } private static class ImageQualityForm extends Form { public ImageQualityForm(String id, IModel model, WicketAnalysisForm aform) { super(id, model); add(new Label(qualityQuestion, ())); add(new Label(safetyQuestion, (...))); add(new Label(locationQuestion, (...))); add(new Label(commentsQuestion, (...))); ListString options = Arrays.asList(Yes, No); add(new RadioChoice(qualityGroup, options); add(new RadioChoice(criteriaGroup, options); ... aform.setImageQuality((ImageQuality)model.getObject()); I am getting null when i try to get the model data. Thanks in anticipation Hi Ben! I've seen your code and I have a couple of questions. Why do you pass a CompoundPropertyModel to ImageQualityForm form and then you build form components assigning a specific model to each of them? How do get the model data in your code? Bye. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [OT] where is JPA 2.0 API spec in maven?
I also need a provider library, but just think it's strange that the JPA API are bound into the provider library and a independent. regards Nino 2010/9/9 Korbinian Bachl - privat korbinian.ba...@whiskyworld.de: Oh, didn't know that - thx :) in fact I haven't yet had any situation where I needed the JPA-API from maven but not any persistence library as well; Nino, for what is it good for in your case? Best Am 09.09.10 09:34, schrieb Jan Kriesten: Hi Korbinian, in fact the current is 2.1.1, but 2.0.0 is reference implementation and for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided here - just API); actually, I meant the javax.persistence-API, which can be referenced with eclipse: dependency groupIdorg.eclipse.persistence/groupId artifactIdjavax.persistence/artifactId version2.0.2/version /dependency The current version there is 2.0.2. From the release notification: The javax.persistence library has been updated in our repository and in maven. The new version, 2.0.2, should address any issues people have had related to some churn of previous versioned javax.persistence libraries in our maven repository. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Radio buttons in modal window in IE6
Unfortunately I cannot upgrade... :/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Radio-buttons-in-modal-window-in-IE6-tp2403103p2532743.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] where is JPA 2.0 API spec in maven?
On Wed, Sep 8, 2010 at 9:35 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Sorry to spam but I am wondering where the JPA 2.0 Spec are cant find it in maven... groupIdorg.apache.geronimo.specs/groupId artifactIdgeronimo-jpa_2.0_spec/artifactId version1.1/version -- Marcelo Morales - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Possible to drag tables using WicketDND?
Hi, I'm using WicketDND to allow for drag and drop in my application. How ever I have problems when trying to drag a tr that contains another table (i.e. I want to drag a component whose html contains a table). I believe the reason to be that the inner table is located on top of the tr (it fills the entire tr) and thus the dragable source is hidden underneath. Is it possible to get around this somehow? Perhaps using some css hacking if needed? /Johan -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Possible-to-drag-tables-using-WicketDND-tp2532928p2532928.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
Could not find root ajax-response element
Hello list I have a very strange problem. I have some Ajax buttons on a webpage. They switch between list and detail view and start the edit mode. All of them are replacing a form tag on the page. When clicking on them in the wrong sequence, I get this error in the Wicket Ajax Debug Window: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element And when looking at a few lines above, right after this one: INFO: Received ajax response (11438 characters) I first get some HTML tags and then in the middle of the response I get the ajax-response tag: INFO: span id=detail70 ...some snipped HTML tags... /span?xml version=1.0 encoding=UTF-8?ajax-response header-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org; ...well formatted ajax response... /component/ajax-response Which means, I get the ajax-response as expected, but there is some text right in front of it, breaking the frontend-script which tries to parse the result. I switched to the latest version of Wicket (1.4.10) but I still have the problem. And only when clicking in the wrong order. Normally everything works. Now I am not expecting anybody having the answer to this, but probably there is somebody out there who can point me into the right direction? I guess I need to find out what is pushing that content in the front of the ajax-response. But I have no idea where I should look at. Any ideas? Thanks! Cheers, Adrian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Ajax integration
Nice, I implemented something very similar to that actually; and now I actually also need to send json from the client... On Thu, 2010-09-09 at 09:31 +0200, Joseph Pachod wrote: Rodolfo Hansen wrote: How can I use Wicket.Ajax.Request to post a json string to a DefaultAjaxBehaviour? Maybe this could help: http://josephonit.wordpress.com/2010/09/02/wicket-providing-json-content-through-ajax/ On the Javascript side I basically did something like this: function setupSend(xhr) { xhr.setRequestHeader(Wicket-Ajax, true); if (typeof(Wicket.Focus.lastFocusId) != undefined Wicket.Focus.lastFocusId != Wicket.Focus.lastFocusId != null) xhr.setRequestHeader(Wicket-FocusedElementId, Wicket.Focus.lastFocusId); xhr.setRequestHeader(Accept, text/xml); }; function success(data) { var xml = data; if (typeof xml == string) { xml = new ActiveXObject(Microsoft.XMLDOM); xml.async = false; xml.loadXML(data); } (new Wicket.Ajax.Call(${feedbackURL})).loadedCallback(xml); }; function call(data, revertFunc) { $.ajax({ url : ${feedbackURL}, type: 'POST', contentType: 'application/json;charset=UTF-8' ,dataType: (($.browser.msie) ? text : xml), data : $.toJSON(data) ,beforeSend : setupSend ,success : success, error : revertFunc }); }; to do something similar to what Wicket.Ajax.Request.post does, except I change the contentType to 'application/json' - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom autocompletion event 'on selection change'
Hi Martin, your instructions helped a lot! Now I can send an ajax request via * and recieve the request via ** But the problem is that the javascript function 'doUpdateChoices' will only update the choices-divs and not all the targets that I added in the java method 'onSelectionChange'. Do you know how to handle this? (And - not so important - do you know the meaning of the parameters of 'Wicket.Ajax.Request' especially 'wicket-autocomplete|d'?) Regards, Peter. * function setSelected(newSelected) { if (newSelected != selected) { selected = newSelected; selChSinceLastRender = true; localThrottler.throttle(getMenuId(), throttleDelay, sendSelectedValue); } } function sendSelectedValue() { showIndicator(); var value = handleSelection(getSelectedValue()); Wicket.Log.info(Send ajax request! Selected value: + value); var request = new Wicket.Ajax.Request(callbackUrl+(callbackUrl.indexOf(?)-1 ? : ?) + sv=+processValue(value), doUpdateChoices, false, true, false, wicket-autocomplete|d); request.get(); } ** @Override protected void respond(AjaxRequestTarget target) { final RequestCycle requestCycle = RequestCycle.get(); String val = requestCycle.getRequest().getParameter(sv); if (val != null) onSelectionChange(target, val); else { val = requestCycle.getRequest().getParameter(q); onRequest(val, requestCycle); } } Hi Peter, Looking at the code I think you'll need to touch wicket-autocomplete.js. Copy it to your project and override org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse) so that it loads your .js file. Then make org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT, AutoCompleteSettings) return your custom AutoCompleteBehavior. In the .js itself you'll need to touch function setSelected(newSelected) at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have to make your Ajax call. Good luck! On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote: Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the unwanted side effect that other values will be submitted too. Then I tried with autoCompleteField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // sout here }); But this will fire only every time I change the textfield value, not the selection of the suggestions :-( Regards, Peter. add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://jetwick.com twitter search prototype
Wicket 1.4.11 released!
This is the eleventh maintenance release of the 1.4.x series and brings over fifty bug fixes and improvements. * Subversion tag: http://svn.apache.org/repos/asf/wicket/releases/wicket-1.4.11/ * Changelog: https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12315236sorter/field=issuekeysorter/order=DESC) * To use in Maven: dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version1.4.11/version /dependency * Download the full distribution: http://www.apache.org/dyn/closer.cgi/wicket/1.4.11 (including source) Cheers, -The Wicket Team - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
localizer.getString() with null component ?
Should localizer.getString() work with a null Component? Some of the getString() forms say it's optional, but it didn't work for me until I passed the component. LONG VERSION: I'm working with RadioChoices in a RefreshingView driven by a Map. The standard choices localizations true=Yes! props.2.frag.value.true=Yes! struck me as either too general or too positional, so I thought I'd drive it by the Map keyword. keyword.true=Oh, yeah! So I put it in the renderer: public Object getDisplayValue(String object) { // ... return Application.get().getResourceSettings() .getLocalizer().getString(key + suffix, (Component)null, def); } But it failed until I started passing the RadioChoice as the component value. I would have guessed that the component was only needed for the long property name, which I won't be using. Insights? Did I miss a better option than the renderer? THANKS, -troy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Prepopulate time fields in DateTimeField component
Hi all, I have a Form with the default model being a CompoundPropertyModel. I have added the DateTimeField component to the form. I wish to prepopulate the time fields but not the date. I have tried a few different things but all have their various issues. Anyone have any ideas? Many thanks in advance. Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Prepopulate-time-fields-in-DateTimeField-component-tp2533175p2533175.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: Could not find root ajax-response element
very strange indeed. do you have any behaviors that write directly to the response? even that, i dont think, would cause this. create a quickstart and attach it to a jira issue. -igor On Thu, Sep 9, 2010 at 7:33 AM, Adrian Wiesmann awiesm...@somap.org wrote: Hello list I have a very strange problem. I have some Ajax buttons on a webpage. They switch between list and detail view and start the edit mode. All of them are replacing a form tag on the page. When clicking on them in the wrong sequence, I get this error in the Wicket Ajax Debug Window: ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root ajax-response element And when looking at a few lines above, right after this one: INFO: Received ajax response (11438 characters) I first get some HTML tags and then in the middle of the response I get the ajax-response tag: INFO: span id=detail70 ...some snipped HTML tags... /span?xml version=1.0 encoding=UTF-8?ajax-response header-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org; ...well formatted ajax response... /component/ajax-response Which means, I get the ajax-response as expected, but there is some text right in front of it, breaking the frontend-script which tries to parse the result. I switched to the latest version of Wicket (1.4.10) but I still have the problem. And only when clicking in the wrong order. Normally everything works. Now I am not expecting anybody having the answer to this, but probably there is somebody out there who can point me into the right direction? I guess I need to find out what is pushing that content in the front of the ajax-response. But I have no idea where I should look at. Any ideas? Thanks! Cheers, Adrian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Prepopulate time fields in DateTimeField component
put the date value you want prepopulated into the model object -igor On Thu, Sep 9, 2010 at 9:20 AM, vp143 vishal.po...@cipriati.co.uk wrote: Hi all, I have a Form with the default model being a CompoundPropertyModel. I have added the DateTimeField component to the form. I wish to prepopulate the time fields but not the date. I have tried a few different things but all have their various issues. Anyone have any ideas? Many thanks in advance. Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Prepopulate-time-fields-in-DateTimeField-component-tp2533175p2533175.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
IE Problem
Hi I have a IE Issues i have some css styles with images all the styles are displayed in Mozilla Firefox perfectly but in IE Some of the features are not supporting .if i change CSS file it is effecting in Mozilla. is their any solution to this problem -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IE-Problem-tp2533248p2533248.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: IE Problem
Try stackoverflow.com 2010/9/9 arunarapole arunakumm...@gmail.com: Hi I have a IE Issues i have some css styles with images all the styles are displayed in Mozilla Firefox perfectly but in IE Some of the features are not supporting .if i change CSS file it is effecting in Mozilla. is their any solution to this problem -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IE-Problem-tp2533248p2533248.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
Re: Possible to drag tables using WicketDND?
Hi Johan, try adding a class attribute on your outer tr (e.g. class=dragging) and configure the drag source accordingly: new DragSource(...).drag(tr.dragging) Sven On 09/09/2010 04:05 PM, Johan Haleby wrote: Hi, I'm using WicketDND to allow for drag and drop in my application. How ever I have problems when trying to drag a tr that contains another table (i.e. I want to drag a component whose html contains a table). I believe the reason to be that the inner table is located on top of the tr (it fills the entire tr) and thus the dragable source is hidden underneath. Is it possible to get around this somehow? Perhaps using some css hacking if needed? /Johan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Prepopulate time fields in DateTimeField component
I tried that previously but then the field becomes NULL within the POJO I think this is what you mean: If i have: setDefaultModel(new CompoundPropertyModel(Item)); where Item object contains checkinDate field I create the component: DateTimeField checkinDateField = new DateTimeField(checkinDate, new Model(new Date())); This populates the Date and Time fields. However, I do not want the Date field to be populate, and when submitting the Item object checkinDate is NULL. I think this is because it has lost the association with the CompoundPropertyModel. Many thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Prepopulate-time-fields-in-DateTimeField-component-tp2533175p2533314.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: Custom autocompletion event 'on selection change'
Hi Peter, Use wicketAjaxGet() instead of Wicket.Ajax.Request.get(). The former uses the latter and knows how to process the xml response returned by AjaxRequestTarget. On Thu, Sep 9, 2010 at 5:54 PM, Peter Karich peat...@yahoo.de wrote: Hi Martin, your instructions helped a lot! Now I can send an ajax request via * and recieve the request via ** But the problem is that the javascript function 'doUpdateChoices' will only update the choices-divs and not all the targets that I added in the java method 'onSelectionChange'. Do you know how to handle this? (And - not so important - do you know the meaning of the parameters of 'Wicket.Ajax.Request' especially 'wicket-autocomplete|d'?) Regards, Peter. * function setSelected(newSelected) { if (newSelected != selected) { selected = newSelected; selChSinceLastRender = true; localThrottler.throttle(getMenuId(), throttleDelay, sendSelectedValue); } } function sendSelectedValue() { showIndicator(); var value = handleSelection(getSelectedValue()); Wicket.Log.info(Send ajax request! Selected value: + value); var request = new Wicket.Ajax.Request(callbackUrl+(callbackUrl.indexOf(?)-1 ? : ?) + sv=+processValue(value), doUpdateChoices, false, true, false, wicket-autocomplete|d); request.get(); } ** @Override protected void respond(AjaxRequestTarget target) { final RequestCycle requestCycle = RequestCycle.get(); String val = requestCycle.getRequest().getParameter(sv); if (val != null) onSelectionChange(target, val); else { val = requestCycle.getRequest().getParameter(q); onRequest(val, requestCycle); } } Hi Peter, Looking at the code I think you'll need to touch wicket-autocomplete.js. Copy it to your project and override org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse) so that it loads your .js file. Then make org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT, AutoCompleteSettings) return your custom AutoCompleteBehavior. In the .js itself you'll need to touch function setSelected(newSelected) at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have to make your Ajax call. Good luck! On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote: Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the unwanted side effect that other values will be submitted too. Then I tried with autoCompleteField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // sout here }); But this will fire only every time I change the textfield value, not the selection of the suggestions :-( Regards, Peter. add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom event? Any hints? Regards, Peter. [1] http://day-to-day-stuff.blogspot.com/2006/10/wicket-autocompletion-improvements.html http://karthikg.wordpress.com/2008/01/24/developing-a-custom-apache-wicket-component/ http://ptrthomas.wordpress.com/2009/08/12/wicket-tutorial-yui-autocomplete-using-json-and-ajax/
Re: Prepopulate time fields in DateTimeField component
Item.checkinDate=new Date() -igor On Thu, Sep 9, 2010 at 10:52 AM, vp143 vishal.po...@cipriati.co.uk wrote: I tried that previously but then the field becomes NULL within the POJO I think this is what you mean: If i have: setDefaultModel(new CompoundPropertyModel(Item)); where Item object contains checkinDate field I create the component: DateTimeField checkinDateField = new DateTimeField(checkinDate, new Model(new Date())); This populates the Date and Time fields. However, I do not want the Date field to be populate, and when submitting the Item object checkinDate is NULL. I think this is because it has lost the association with the CompoundPropertyModel. Many thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Prepopulate-time-fields-in-DateTimeField-component-tp2533175p2533314.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
Issue Javascript command from Wicket
I'm sure this is probably rather simple, but what would be the best way to issue a javascript command from a wicket action? That's vague so here's a more specific example. I have an existing app that has a button. When that button is clicked, the event is handled by Wicket to perform some action like save something to the database. I now have a new requirement that says that in addition to what was previously occurring, I also need to execute some javascript when that button is clicked. The exact javascript that needs to be executed is dependent upon what happens during the server side handling of the button click so I can't just statically add something to the onclick handler of the HTML button. Is there a best practice for this? Handling the button click with Ajax perhaps and some kind of callback parameter? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issue-Javascript-command-from-Wicket-tp2533439p2533439.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: IE Problem
In some cases there are no work arounds (css that generically applies to both). We ended using css_browser_selector (http://rafael.adm.br/css_browser_selector/) and this works well for us. Alternatively you could try generating different pages based on the browser from the server but I don't think anyone wants to do that. Cheers, Martin -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IE-Problem-tp2533248p2533459.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: mountBookmarkablePage problem?
Figured it out, nothing to do with Wicket (sorry but I was getting desperate). If it helps anyone...we had to enable httpOnly on our server and the page in question was trying to make sure we only uploaded to our current session. Well turns out that httpOnly causes statefull Java Applets to lose their waythe solution we employed was to make sure our Applet sent back the session cookie. Thanks, Martin -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/mountBookmarkablePage-problem-tp2527600p2533461.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: Issue Javascript command from Wicket
You can use the AjaxRequestTarget to emit javascript back to the browser like this: target.prependJavascript(alert('sent from the server');); Typically you would have placed the javascript method definitions into the page so they would exist already in the browsers DOM and then you would just emit specific calls to them in the action itself. e.g. target.prependJavascript(processCase(+case+);); Regards, Mike I'm sure this is probably rather simple, but what would be the best way to issue a javascript command from a wicket action? That's vague so here's a more specific example. I have an existing app that has a button. When that button is clicked, the event is handled by Wicket to perform some action like save something to the database. I now have a new requirement that says that in addition to what was previously occurring, I also need to execute some javascript when that button is clicked. The exact javascript that needs to be executed is dependent upon what happens during the server side handling of the button click so I can't just statically add something to the onclick handler of the HTML button. Is there a best practice for this? Handling the button click with Ajax perhaps and some kind of callback parameter? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Header requiring to be contributed through page load and not ajax...
hi It looks like the jquery files need to be included through a normal page load. Contributing these headers through Ajax doesn't work, I guess it's due to the use of $(document).ready(function(), which isn't triggered on ajax refresh. I tried to find a jquery workaround for that but without success up to now (I'm no jquery expert). As such, I'm facing this strange requirement of having some headers contributed only through normal page load, which would most probably mean on first page display. As some components are made visible/added through ajax only, I don't see how to fulfil this need. Currently, I just try to add manually the required headers on each page which might use one of the component requiring these headers... For it to be perfectly bulletproof, I would have to add them to all pages by default, but I find this quite bullish (and potentially slowing down deeply the first access). Do you have any better solution? thanks in advance joseph
Re: Header requiring to be contributed through page load and not ajax...
instead of $(document).ready(function() use wicket's iheadercontributor's response.writeondomreadyjavascript -igor On Thu, Sep 9, 2010 at 1:09 PM, Joseph Pachod josephpac...@thomas-daily.de wrote: hi It looks like the jquery files need to be included through a normal page load. Contributing these headers through Ajax doesn't work, I guess it's due to the use of $(document).ready(function(), which isn't triggered on ajax refresh. I tried to find a jquery workaround for that but without success up to now (I'm no jquery expert). As such, I'm facing this strange requirement of having some headers contributed only through normal page load, which would most probably mean on first page display. As some components are made visible/added through ajax only, I don't see how to fulfil this need. Currently, I just try to add manually the required headers on each page which might use one of the component requiring these headers... For it to be perfectly bulletproof, I would have to add them to all pages by default, but I find this quite bullish (and potentially slowing down deeply the first access). Do you have any better solution? thanks in advance joseph - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Issue Javascript command from Wicket
Michael O'Cleirigh wrote: You can use the AjaxRequestTarget to emit javascript back to the browser like this: target.prependJavascript(alert('sent from the server');); Typically you would have placed the javascript method definitions into the page so they would exist already in the browsers DOM and then you would just emit specific calls to them in the action itself. e.g. target.prependJavascript(processCase(+case+);); Thanks! I really should have known this as I've done something similar before. I don't know why I was drawing a blank on this. -Matt -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Issue-Javascript-command-from-Wicket-tp2533439p2533530.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
Demystifying page serialization
I've been reading books, articles, blogs about Wicket page serialization. I don't get it. Specifically, I don't get the need and/or benefits. Most references state that page serialization addresses the back button issue. If a user presses the browser's back button, doesn't the browser simply read the page out of its own cache? Now say the back button is used and the browser's refresh button is pressed (hard refresh with the SHIFT key held down), wouldn't one want the page to be regenerated on the server side as opposed to reloaded from Wicket's page cache? Under what circumstances is the page cache useful? I don't think I'm getting it. Any pointers to articles or explanations are appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Demystifying-page-serialization-tp2533538p2533538.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: Demystifying page serialization
The trick is that each link/form points to a specific version of your page in the cache, so you can be sure that you're dealing with the same component hierarchy. On Thu, Sep 9, 2010 at 4:17 PM, Mike Dee mdichiapp...@cardeatech.com wrote: I've been reading books, articles, blogs about Wicket page serialization. I don't get it. Specifically, I don't get the need and/or benefits. Most references state that page serialization addresses the back button issue. If a user presses the browser's back button, doesn't the browser simply read the page out of its own cache? Now say the back button is used and the browser's refresh button is pressed (hard refresh with the SHIFT key held down), wouldn't one want the page to be regenerated on the server side as opposed to reloaded from Wicket's page cache? Under what circumstances is the page cache useful? I don't think I'm getting it. Any pointers to articles or explanations are appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Demystifying-page-serialization-tp2533538p2533538.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
Re: Demystifying page serialization
Does that mean if the back button is used to go back to a URL like this: http://myurl/myapp/?wicket:interface=:3 and the SHIFT-REFRESH button is used (hard refresh), that Wicket will pull the page out of its cache rather than calling the app to regenerate the page? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Demystifying-page-serialization-tp2533538p2533548.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: Header requiring to be contributed through page load and not ajax...
instead of $(document).ready(function() use wicket's iheadercontributor's response.writeondomreadyjavascriptthanks for the answer I do so for my own stuff, but jquery plugin don't. similarly, the core jquery file import won't work when added through ajax.
Re: Custom autocompletion event 'on selection change'
Hi Martin, hi Pieter! wow! This works now and I thought one has to write ajax assembler to make it running ... Thanks a lot! Are the ajax functions documented anywhere? Regards, Peter. Hi Peter, Use wicketAjaxGet() instead of Wicket.Ajax.Request.get(). The former uses the latter and knows how to process the xml response returned by AjaxRequestTarget. On Thu, Sep 9, 2010 at 5:54 PM, Peter Karich peat...@yahoo.de wrote: Hi Martin, your instructions helped a lot! Now I can send an ajax request via * and recieve the request via ** But the problem is that the javascript function 'doUpdateChoices' will only update the choices-divs and not all the targets that I added in the java method 'onSelectionChange'. Do you know how to handle this? (And - not so important - do you know the meaning of the parameters of 'Wicket.Ajax.Request' especially 'wicket-autocomplete|d'?) Regards, Peter. * function setSelected(newSelected) { if (newSelected != selected) { selected = newSelected; selChSinceLastRender = true; localThrottler.throttle(getMenuId(), throttleDelay, sendSelectedValue); } } function sendSelectedValue() { showIndicator(); var value = handleSelection(getSelectedValue()); Wicket.Log.info(Send ajax request! Selected value: + value); var request = new Wicket.Ajax.Request(callbackUrl+(callbackUrl.indexOf(?)-1 ? : ?) + sv=+processValue(value), doUpdateChoices, false, true, false, wicket-autocomplete|d); request.get(); } ** @Override protected void respond(AjaxRequestTarget target) { final RequestCycle requestCycle = RequestCycle.get(); String val = requestCycle.getRequest().getParameter(sv); if (val != null) onSelectionChange(target, val); else { val = requestCycle.getRequest().getParameter(q); onRequest(val, requestCycle); } } Hi Peter, Looking at the code I think you'll need to touch wicket-autocomplete.js. Copy it to your project and override org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteBehavior#renderHead(IHeaderResponse) so that it loads your .js file. Then make org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField.newAutoCompleteBehavior(IAutoCompleteRendererT, AutoCompleteSettings) return your custom AutoCompleteBehavior. In the .js itself you'll need to touch function setSelected(newSelected) at line 212 (1.4-SNAPSHOT). Each time this function is called you'll have to make your Ajax call. Good luck! On Thu, Sep 9, 2010 at 1:07 PM, Peter Karich peat...@yahoo.de wrote: Hi Pieter, thanks for your quick response! And sorry, I didn't mention that I am using org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField from wicket extensions. Or did you have another autocomplete component in mind that I am not aware of? Nevertheless I tried the AjaxFormComponentUpdatingBehavior which has the unwanted side effect that other values will be submitted too. Then I tried with autoCompleteField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget target) { // sout here }); But this will fire only every time I change the textfield value, not the selection of the suggestions :-( Regards, Peter. add AjaxFormComponentUpdatingBehavior to your dropdownChoice. new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //do the needed stuff here... } }) The onUpdate() will be triggered when the selection changes, however the behavor will be different if you do this with mous or keys (and even from browser to brower if I'm not mistaking) Anyhow, with FireFow it is a follows: with mouse: onUpdate(..) is fired from the moment you change the selection. with keys: onUpdate(..) is fired from the moment you change the selection AND the component loses focus (by pressing tab for example) or the user presses ENTER Hope this helps. Pieter On Thu, Sep 9, 2010 at 12:00 PM, Peter Karich peat...@yahoo.de wrote: Hi, I would like to fire an ajax event every time the user changes the selection of the choices e.g. he switches from 'wiki' to 'wicket' with keys or mouse Which function is necessary to fire such an event on the client side? I never did sth. similar to this and tried (without success + a long time) to customize wicket-autocomplete.js according to some hints [1] . And how can I add a behaviour on the server side which listens to this custom
Re: Header requiring to be contributed through page load and not ajax...
dunno then, you may want to talk to jquery people and see what they recommend. we cant really fire the onload event again because some scripts may have already been executed...like i said, see what jquery folks say. -igor On Thu, Sep 9, 2010 at 1:38 PM, Joseph Pachod josephpac...@thomas-daily.de wrote: instead of $(document).ready(function() use wicket's iheadercontributor's response.writeondomreadyjavascriptthanks for the answer I do so for my own stuff, but jquery plugin don't. similarly, the core jquery file import won't work when added through ajax. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HTML streaming on Link click
Rodolfo, If you're asking about Wicket application settings, then yes, it's set to default 2-pass request processing with buffered pages rendering. I thought the way the link is implemented it should not matter since I thought I would write directly into the HttpServlet output stream. And I really see the ((WebResponse)requestCycle.getResponse()).getHttpServletResponse().getOutputStream() returns me an instance of something from the web server itself (in my case it's Jetty HttpConnection$Output) Did I miss something? -Dmitry -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Live-streaming-on-Link-click-tp2533475p2533591.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: HTML streaming on Link click
On Thu, 2010-09-09 at 14:11 -0700, DmitryM wrote: Rodolfo, If you're asking about Wicket application settings, then yes, it's set to default 2-pass request processing with buffered pages rendering. I thought the way the link is implemented it should not matter since I thought I would write directly into the HttpServlet output stream. And I really see the ((WebResponse)requestCycle.getResponse()).getHttpServletResponse().getOutputStream() returns me an instance of something from the web server itself (in my case it's Jetty HttpConnection$Output) Did I miss something? No, sorry, it seems correct. Did you use wireshark or something similar to make sure its not working as expected? It should work. -Dmitry
Re: HTML streaming on Link click
Rodolfo, No, I didn't test it w/WireShark or similar packet sniffer. I can give it a shot... I only tested it in Safari and FireFox (the matter is I only care about Safari, or, rather, WebKit) for now, this would be an app to be accessed from the phone. The behaviour of the browsers (including iPhone Safari) is the same. I click/tap the link, the browser waits for those 5 seconds I set up... then displays 1st alert and after clicking/tapping OK immediately displays the 2nd alert. Very frustrating. =( -Dmitry -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Live-streaming-on-Link-click-tp2533475p2533644.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: wicketstuff repo down again
Hi Mike, Excellent, thanks for the info. I was still on older versions of those artifacts (1.4.1). Will see about upgrading. regards, Steve On 08/09/2010, at 11:44 AM, Michael O'Cleirigh wrote: Hi Steve, Wicketstuff-core artifacts have been released through the oss.sonatype.org repository and into central since version 1.4.7. (with the latest being 1.4.10.1) See: http://repo2.maven.org/maven2/org/wicketstuff/ Snapshots are here: https://oss.sonatype.org/content/repositories/snapshots/org/wicketstuff/ This is only the wicketstuff-core artifacts. If you are using non core artifacts then more work is going to be involved. Regards, Mike Hi all, The wicketstuff repo is down again. Is there any chance the tagged artifacts from the wicketstuff repo can be synced to a more reliable Maven repo (central even)? I have the ones I need in my own remote repo but this doesn't work for others that build my project. Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
AW: Header requiring to be contributed through page load and not ajax...
I use onDomReady functionality at many places in my jWicket jQuery-integration. I don't know of any general problem (no guarantee that there isn't one) with jQuery and Wickets onDomReady. Of course you have to ensure that the library (and perhaps additional files) is loaded in correct order with other libraries of jQuery. Did you use a debugger (e.g. firebug) to examine your javascript behavior? Stefan -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Donnerstag, 9. September 2010 22:42 An: users@wicket.apache.org Betreff: Re: Header requiring to be contributed through page load and not ajax... dunno then, you may want to talk to jquery people and see what they recommend. we cant really fire the onload event again because some scripts may have already been executed...like i said, see what jquery folks say. -igor On Thu, Sep 9, 2010 at 1:38 PM, Joseph Pachod josephpac...@thomas-daily.de wrote: instead of $(document).ready(function() use wicket's iheadercontributor's response.writeondomreadyjavascriptthanks for the answer I do so for my own stuff, but jquery plugin don't. similarly, the core jquery file import won't work when added through ajax. - 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