load properties file from extrnal path
Hi, How can I load external properties file? (i mean that I don't want to load a file that is in the regular wicket hierarchy where i have HelloWorld.java, HelloWorld.html, HelloWorld.properties), what i want is to load file from- C:\project\HelloWorld.properties. i tried to do this but wicket won't load the file. any tips? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-dnd strange situation
For Wicket 6 I'll port wicket-dnd to jquery. Sven Decebal Suiu decebal.s...@asf.ro schrieb: Hello Sven First, I want to say thanks for your contribution to wicket (for wicket-tree and wicket-dnd in special). Yes, I use wiquery :) I read http://code.google.com/p/wicket-dnd/issues/detail?id=13can=1. Is there anyone from wiquery that can explains us why wiquery doesn't works with wicket-dnd? And a question from Sven: it is possible to use jquery instead prototype to implement wicket-dnd (I think that jquery is embedded in wicket core from version 6)? Thanks, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4650945.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-dnd strange situation
Nice. I see a beautiful future :) wicket-dnd integrated with wicket tree and of course wicket-dnd part of wicket core. Now, I'm waiting a clarification from a member of wiquery. Thanks again, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4650947.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: renderHead() / wicket:head page / component order
Le 31/07/2012 08:33, Emond Papegaaij a écrit : But one more question though : why rendering wicket:head (in the markup file) contributions before renderHead() (in the java file) contributions ? With these things you just have to make a decision. Both orders are equally valid. You use wicket:head for minor adjustments in styling, others use wicket:head to contribute the css files and do the adjustments in renderHead. The idea was, that with this order, it is always possible to override any static wicket:head contribution from the Java code. Personally, I try to avoid wicket:head as much as possible and render everything from renderHead. This gives you the most flexibility. Right :) Many thanks for all your answers ! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-dnd strange situation
hi Prototype uses $ like jQuery. That can create conflict (your error message indicates that the jquery method ready is not available. probably vecause Prototype was loaded after jquery and so override $.). jquery offers a noconflict mode, but I don't remember if we have integrate it to wiquery (like an option). in all cases it is not a good idea to mix many javascript core apis. so use jquery only or prototype, but not the twice in the same time. regards julien roche Le 2 août 2012 09:46, Decebal Suiu decebal.s...@asf.ro a écrit : Nice. I see a beautiful future :) wicket-dnd integrated with wicket tree and of course wicket-dnd part of wicket core. Now, I'm waiting a clarification from a member of wiquery. Thanks again, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4650947.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-dnd strange situation
Hi Julien Thanks for the fast response. Sven says that for wicket 6, wicket-dnd will be port to jquery but now I see that I have only one option: to give up one library (wiquery or wicket-dnd). Both libraries are very good and I want to keep both. Is it a chance to activate jquery no conflict mode in wiquery? Other advice is welcome. Thanks Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4650950.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-dnd strange situation
Another technical question is who (I suppose wiquery) and why change Wicket.Event.add(window, domready, function(event) { new wicketdnd.DropTarget(...) }); in $(document).ready(function(event){new wicketdnd.DropTarget(...)}); Best regards, Decebal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-dnd-strange-situation-tp4650918p4650951.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Is there a MountedMapper respecting better matching path names?
Hi, before i do this myself i would like to ask the community if someone has done this already. I want to mount pages at these urls: mountPage(/pages/${color}/advertise, AdvertisePage.class); mountPage(/pages/${color}/${niceColor}, ColoredPage.class); But because they both have 3 matching url path segments the first after sorting all available mount mapper wins. But in this case the almost exact url /pages/red/advertise is referencing the ColoredPage but should the AdvertisePage. Only ordering the mounts is influencing the result. But this is not a good option. So i would like to know if there is already a library providing my required behavior. Thanks Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Boolean DropDownChoice
Even better, why are you using a drop down at all? Check boxes are normally used for true-false choices. From: Paul Bors p...@bors.ws To: users@wicket.apache.org Date: 08/01/2012 07:51 PM Subject:RE: Boolean DropDownChoice Instead of going to the extent of overriding a class because your model value is not updated, why not fix the problem? Take a look at the component reference wicket-example project: http://www.wicket-library.com/wicket-examples/compref/ More precisely at the DropDownChoice: http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/or g.apache.wicket.examples.compref.DropDownChoicePage?0 -Original Message- From: Lawrence, Sean [mailto:sean.lawre...@mantech.com] Sent: Wednesday, August 01, 2012 7:19 PM To: users@wicket.apache.org Subject: Boolean DropDownChoice Hi, I'm trying to create a custom form component that extends a DropDownChoiceBoolean. The reason I'm doing this is because I need a form component that forces a user to select a choice. However, I'm unable to get the model to update. What am I not overriding properly? I'm all ears for suggestions if there is a better way to do this as well. /** * A Boolean form component that uses a drop down choice so that * a user is forced to choose between Yes or No. * */ public class YesNoDropDownChoice extends DropDownChoiceBoolean { private static final long serialVersionUID = 1L; public YesNoDropDownChoice(String id, IModelBoolean model) { super(id, model, Arrays.asList( Choice.YES.getBoolean(), Choice.NO.getBoolean())); onModelChanged(); } @Override protected void onModelChanged() { super.onModelChanged(); setModelObject(getModelObject()); } /** * {@inheritDoc} */ @Override protected void convertInput() { Boolean b = getModelObject(); setConvertedInput(b); } } Thanks in advance, Sean Lawrence This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Update two fields with AjaxFormComponentUpdatingBehavior
Hi, I have a small but annoying problem. I'm sure there is a solution laying around but let me ask it anyway. This is a common zip code - location problem I intend to solve with actf. I would like to get zip code read only (user can choose only location name). To get my model up to date I introduced a hidden field. ...snippet. final TextField bbsir_irszam_output = new TextField(bbsirIrszam_out, new Model(((HrpBbstorzs) model.getObject()).getBbsirIrszam())); final HiddenField bbsir_irszam = new HiddenField(bbsirIrszam); add(bbsir_irszam); bbsir_irszam_output.setOutputMarkupId(true); bbsir_irszam_output.setEnabled(false); add(bbsir_irszam_output, new Label(sajatadatokform.irszam, new ResourceModel(sajatadatokform.irszam))); final AutoCompleteTextField helyseg = new AutoCompleteTextField(helyseg, new Model()) { @Override protected Iterator getChoices(String string) { TelepulesIrszam = customBo.loadTelepulesek(string); telepules = new ArrayList(TelepulesIrszam.keySet()); return telepules.iterator(); } }; helyseg.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget art) { try { int irszam = TelepulesIrszam.get(helyseg.getDefaultModelObjectAsString()); // find the zip code by location name selected bbsir_irszam_output.setModelObject(irszam); // the output field bbsir_irszam.setModelObject(irszam); // the hidden field art.add(bbsir_irszam_output); } catch (NullPointerException e) { error(Hibás helységnév!); art.add(container); } } }); .. Thank you! Regards., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Update-two-fields-with-AjaxFormComponentUpdatingBehavior-tp4650954.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: load properties file from extrnal path
Hi Oliver, In your Application init add IResourceSettings resourceSettings = getResourceSettings(); resourceSettings.addResourceFolder(c:\project); //this path should be changed Regards., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/load-properties-file-from-extrnal-path-tp4650944p4650955.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Need suggestion on minimizing session usage in wicket web application
Hi, I need some suggestions. In my wicket application (in development phase), I have used normal forms and links. While going through the concept of stateless pages and forms, I am confused about converting the forms and components to stateless. Will it really minimize session usage in the system. I need to minimize it as i wont be having much server space initially. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-suggestion-on-minimizing-session-usage-in-wicket-web-application-tp4650956.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Redirecting from Ajax onSubmit
I am trying to do the redirection from AjaxSubmitLink onSubmit method using this RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget); But i am not seeing redirection on browser I am using wicket 1.5.7 Please help me -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to Mount Multiple URLS to Same Class in wicket 1.5.7
I am making an application where multiple urls need to mount to Same Class Like /product /category /upgrades to DynamicWebPage.class I have mount like new MountMapper(url, class); Now when i hit the page /product its coming fine, but all the links on that page is coming like this /category?fsadas:dgs which should be /product?fsadas:dgs My thought is that its coming like that because both urls pointing to same class Please help on this -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-Mount-Multiple-URLS-to-Same-Class-in-wicket-1-5-7-tp4650932.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need suggestion on minimizing session usage in wicket web application
yes, using stateless pages when it's possible will definitely reduce your session size. Wicket offers a stateless version for those components which by default have a stateful nature, like forms and links. As general rule you can implement a stateless page when the page doesn't need to keep its internal state between two consecutive requests. For more information on stateless pages see live examples at http://www.wicket-library.com/wicket-examples/stateless/ Hi, I need some suggestions. In my wicket application (in development phase), I have used normal forms and links. While going through the concept of stateless pages and forms, I am confused about converting the forms and components to stateless. Will it really minimize session usage in the system. I need to minimize it as i wont be having much server space initially. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-suggestion-on-minimizing-session-usage-in-wicket-web-application-tp4650956.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need suggestion on minimizing session usage in wicket web application
Hi, You can read the following email thread for insight: http://wicket-users.markmail.org/thread/6qqc4pxt77mulpmt Also have a look at this: http://www.small-improvements.com/blog/technical/tuning-wicket-session-size These links talk about session size in general, not only about stateless components. On 02/08/2012 9:25 AM, kshitiz wrote: Hi, I need some suggestions. In my wicket application (in development phase), I have used normal forms and links. While going through the concept of stateless pages and forms, I am confused about converting the forms and components to stateless. Will it really minimize session usage in the system. I need to minimize it as i wont be having much server space initially. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-suggestion-on-minimizing-session-usage-in-wicket-web-application-tp4650956.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - 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: Redirecting from Ajax onSubmit
Can't you simply get away with calling setResponsePage()? ~ Thank you, Paul C Bors On Aug 1, 2012, at 20:17, vinitty vini...@gmail.com wrote: I am trying to do the redirection from AjaxSubmitLink onSubmit method using this RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget); But i am not seeing redirection on browser I am using wicket 1.5.7 Please help me -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Boolean DropDownChoice
Hi Paul, The reason for the dropdown over the checkbox is I'm attempting to enforce a selection. I.e. make required or @NotNull I think I got a bit carried away by attempting to extend DropDownChoice. Thanks for the link. The following is what I'm going forward with: new DropDownChoiceBoolean(active, new PropertyModelBoolean(getModel(), active), Arrays.asList(null, new Boolean(true), new Boolean(false))); I'll will likely add a IRenderer as well so the choices render as Yes, No, or ---. Thanks again, Sean Lawrence -Original Message- From: Richard W. Adams [mailto:rwada...@up.com] Sent: Thursday, August 02, 2012 7:53 AM To: users@wicket.apache.org Subject: RE: Boolean DropDownChoice Even better, why are you using a drop down at all? Check boxes are normally used for true-false choices. From: Paul Bors p...@bors.ws To: users@wicket.apache.org Date: 08/01/2012 07:51 PM Subject:RE: Boolean DropDownChoice Instead of going to the extent of overriding a class because your model value is not updated, why not fix the problem? Take a look at the component reference wicket-example project: http://www.wicket-library.com/wicket-examples/compref/ More precisely at the DropDownChoice: http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/or g.apache.wicket.examples.compref.DropDownChoicePage?0 -Original Message- From: Lawrence, Sean [mailto:sean.lawre...@mantech.com] Sent: Wednesday, August 01, 2012 7:19 PM To: users@wicket.apache.org Subject: Boolean DropDownChoice Hi, I'm trying to create a custom form component that extends a DropDownChoiceBoolean. The reason I'm doing this is because I need a form component that forces a user to select a choice. However, I'm unable to get the model to update. What am I not overriding properly? I'm all ears for suggestions if there is a better way to do this as well. /** * A Boolean form component that uses a drop down choice so that * a user is forced to choose between Yes or No. * */ public class YesNoDropDownChoice extends DropDownChoiceBoolean { private static final long serialVersionUID = 1L; public YesNoDropDownChoice(String id, IModelBoolean model) { super(id, model, Arrays.asList( Choice.YES.getBoolean(), Choice.NO.getBoolean())); onModelChanged(); } @Override protected void onModelChanged() { super.onModelChanged(); setModelObject(getModelObject()); } /** * {@inheritDoc} */ @Override protected void convertInput() { Boolean b = getModelObject(); setConvertedInput(b); } } Thanks in advance, Sean Lawrence This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. ** This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need suggestion on minimizing session usage in wicket web application
Thanks for the links. One thing that I want to ask that do yo think we should use LoadableDetachable models to minimize session usage? Like for every thing examples labels, links, dropdowns, etc. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-suggestion-on-minimizing-session-usage-in-wicket-web-application-tp4650956p4650963.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
Additions seem to work fine with setReuseItems(true), but I've been having trouble with removals. My remove AjaxButton calls listView.getList().remove(item.getIndex()), but that always removes the last element. Am I making an incorrect assumption about how this should work? The following is a simplified version of my FormComponentPanel that replicates the problem. It's used the a CompoundPropertyModel with a POJO containing the string list. public class TextFieldListView extends FormComponentPanelListString { private static final long serialVersionUID = 1L; private final ListViewString listView; public TextFieldListView(final String id) { super(id); setOutputMarkupId(true); listView = new ListViewString(list) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemString item) { final TextFieldString textField = new TextFieldString(item, item.getModel()); item.add(textField); item.add(new RemoveButton(remove, item)); } }; listView.setReuseItems(true); add(listView); add(new AddButton(add)); } @Override public void onInitialize() { super.onInitialize(); listView.setModel(getModel()); } @SuppressWarnings(unchecked) protected void convertInput() { this.setConvertedInput((ListString)listView.getList()); } private class AddButton extends AjaxButton { private static final long serialVersionUID = 1L; public AddButton(final String id) { super(id); setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getModelObject().add(); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } } private class RemoveButton extends AjaxButton { private static final long serialVersionUID = 1L; private final ListItemString item; public RemoveButton(final String id, final ListItemString item) { super(id); this.item = item; setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getList().remove(item.getIndex()); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } }; } Thanks! On Thu, Aug 2, 2012 at 10:13 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - 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: How to Mount Multiple URLS to Same Class in wicket 1.5.7
There is probably a better way, but I just create very simple subclasses to allow separate mounts. class ProductPage extends DynamicWebPage { ProductPage(PageParagemeters p) { super(p); } } On Wed, Aug 1, 2012 at 12:10 PM, vinitty vini...@gmail.com wrote: I am making an application where multiple urls need to mount to Same Class Like /product /category /upgrades to DynamicWebPage.class I have mount like new MountMapper(url, class); Now when i hit the page /product its coming fine, but all the links on that page is coming like this /category?fsadas:dgs which should be /product?fsadas:dgs My thought is that its coming like that because both urls pointing to same class Please help on this -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-Mount-Multiple-URLS-to-Same-Class-in-wicket-1-5-7-tp4650932.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
After submit your TextFields still have their previous RAW_INPUT, call form#clearInput() so they render the value from the model. Sven On 08/02/2012 05:31 PM, Benjamin Heiskell wrote: Additions seem to work fine with setReuseItems(true), but I've been having trouble with removals. My remove AjaxButton calls listView.getList().remove(item.getIndex()), but that always removes the last element. Am I making an incorrect assumption about how this should work? The following is a simplified version of my FormComponentPanel that replicates the problem. It's used the a CompoundPropertyModel with a POJO containing the string list. public class TextFieldListView extends FormComponentPanelListString { private static final long serialVersionUID = 1L; private final ListViewString listView; public TextFieldListView(final String id) { super(id); setOutputMarkupId(true); listView = new ListViewString(list) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemString item) { final TextFieldString textField = new TextFieldString(item, item.getModel()); item.add(textField); item.add(new RemoveButton(remove, item)); } }; listView.setReuseItems(true); add(listView); add(new AddButton(add)); } @Override public void onInitialize() { super.onInitialize(); listView.setModel(getModel()); } @SuppressWarnings(unchecked) protected void convertInput() { this.setConvertedInput((ListString)listView.getList()); } private class AddButton extends AjaxButton { private static final long serialVersionUID = 1L; public AddButton(final String id) { super(id); setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getModelObject().add(); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } } private class RemoveButton extends AjaxButton { private static final long serialVersionUID = 1L; private final ListItemString item; public RemoveButton(final String id, final ListItemString item) { super(id); this.item = item; setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getList().remove(item.getIndex()); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } }; } Thanks! On Thu, Aug 2, 2012 at 10:13 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
That makes the TextFields reflect their original model correctly, but it also disposes of any modified values. For example: 1. List starts with 1, 2, 3 2. Add two entries 4, 5 3. Modify 1 to modified 4. Remove 2 What I would like to see is: modified, 3, 4, 5 What I end up seeing is: 1, 3, , On Thu, Aug 2, 2012 at 1:44 PM, Sven Meier s...@meiers.net wrote: After submit your TextFields still have their previous RAW_INPUT, call form#clearInput() so they render the value from the model. Sven On 08/02/2012 05:31 PM, Benjamin Heiskell wrote: Additions seem to work fine with setReuseItems(true), but I've been having trouble with removals. My remove AjaxButton calls listView.getList().remove(item.getIndex()), but that always removes the last element. Am I making an incorrect assumption about how this should work? The following is a simplified version of my FormComponentPanel that replicates the problem. It's used the a CompoundPropertyModel with a POJO containing the string list. public class TextFieldListView extends FormComponentPanelListString { private static final long serialVersionUID = 1L; private final ListViewString listView; public TextFieldListView(final String id) { super(id); setOutputMarkupId(true); listView = new ListViewString(list) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemString item) { final TextFieldString textField = new TextFieldString(item, item.getModel()); item.add(textField); item.add(new RemoveButton(remove, item)); } }; listView.setReuseItems(true); add(listView); add(new AddButton(add)); } @Override public void onInitialize() { super.onInitialize(); listView.setModel(getModel()); } @SuppressWarnings(unchecked) protected void convertInput() { this.setConvertedInput((ListString)listView.getList()); } private class AddButton extends AjaxButton { private static final long serialVersionUID = 1L; public AddButton(final String id) { super(id); setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getModelObject().add(); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } } private class RemoveButton extends AjaxButton { private static final long serialVersionUID = 1L; private final ListItemString item; public RemoveButton(final String id, final ListItemString item) { super(id); this.item = item; setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getList().remove(item.getIndex()); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } }; } Thanks! On Thu, Aug 2, 2012 at 10:13 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:
Re: Need suggestion on minimizing session usage in wicket web application
I would say it depends. Generally, it should help to use detachable models, but for very small objects (like static strings), it's won't give a big gain. Besides memory gains, detachable models also reload their data each request which ensures non-stale objects. On 02/08/2012 11:28 AM, kshitiz wrote: Thanks for the links. One thing that I want to ask that do yo think we should use LoadableDetachable models to minimize session usage? Like for every thing examples labels, links, dropdowns, etc. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-suggestion-on-minimizing-session-usage-in-wicket-web-application-tp4650956p4650963.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
This is not possible with ListView. You have to switch to RefreshingView with a ReuseIfModelsEqualStrategy. Hope this helps Sven On 08/02/2012 08:45 PM, Benjamin Heiskell wrote: That makes the TextFields reflect their original model correctly, but it also disposes of any modified values. For example: 1. List starts with 1, 2, 3 2. Add two entries 4, 5 3. Modify 1 to modified 4. Remove 2 What I would like to see is: modified, 3, 4, 5 What I end up seeing is: 1, 3, , On Thu, Aug 2, 2012 at 1:44 PM, Sven Meier s...@meiers.net wrote: After submit your TextFields still have their previous RAW_INPUT, call form#clearInput() so they render the value from the model. Sven On 08/02/2012 05:31 PM, Benjamin Heiskell wrote: Additions seem to work fine with setReuseItems(true), but I've been having trouble with removals. My remove AjaxButton calls listView.getList().remove(item.getIndex()), but that always removes the last element. Am I making an incorrect assumption about how this should work? The following is a simplified version of my FormComponentPanel that replicates the problem. It's used the a CompoundPropertyModel with a POJO containing the string list. public class TextFieldListView extends FormComponentPanelListString { private static final long serialVersionUID = 1L; private final ListViewString listView; public TextFieldListView(final String id) { super(id); setOutputMarkupId(true); listView = new ListViewString(list) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemString item) { final TextFieldString textField = new TextFieldString(item, item.getModel()); item.add(textField); item.add(new RemoveButton(remove, item)); } }; listView.setReuseItems(true); add(listView); add(new AddButton(add)); } @Override public void onInitialize() { super.onInitialize(); listView.setModel(getModel()); } @SuppressWarnings(unchecked) protected void convertInput() { this.setConvertedInput((ListString)listView.getList()); } private class AddButton extends AjaxButton { private static final long serialVersionUID = 1L; public AddButton(final String id) { super(id); setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getModelObject().add(); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } } private class RemoveButton extends AjaxButton { private static final long serialVersionUID = 1L; private final ListItemString item; public RemoveButton(final String id, final ListItemString item) { super(id); this.item = item; setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getList().remove(item.getIndex()); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } }; } Thanks! On Thu, Aug 2, 2012 at 10:13 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeating TextFields
Thank you, that's exactly the type of advice I was looking for! On Thu, Aug 2, 2012 at 2:55 PM, Sven Meier s...@meiers.net wrote: This is not possible with ListView. You have to switch to RefreshingView with a ReuseIfModelsEqualStrategy. Hope this helps Sven On 08/02/2012 08:45 PM, Benjamin Heiskell wrote: That makes the TextFields reflect their original model correctly, but it also disposes of any modified values. For example: 1. List starts with 1, 2, 3 2. Add two entries 4, 5 3. Modify 1 to modified 4. Remove 2 What I would like to see is: modified, 3, 4, 5 What I end up seeing is: 1, 3, , On Thu, Aug 2, 2012 at 1:44 PM, Sven Meier s...@meiers.net wrote: After submit your TextFields still have their previous RAW_INPUT, call form#clearInput() so they render the value from the model. Sven On 08/02/2012 05:31 PM, Benjamin Heiskell wrote: Additions seem to work fine with setReuseItems(true), but I've been having trouble with removals. My remove AjaxButton calls listView.getList().remove(item.getIndex()), but that always removes the last element. Am I making an incorrect assumption about how this should work? The following is a simplified version of my FormComponentPanel that replicates the problem. It's used the a CompoundPropertyModel with a POJO containing the string list. public class TextFieldListView extends FormComponentPanelListString { private static final long serialVersionUID = 1L; private final ListViewString listView; public TextFieldListView(final String id) { super(id); setOutputMarkupId(true); listView = new ListViewString(list) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItemString item) { final TextFieldString textField = new TextFieldString(item, item.getModel()); item.add(textField); item.add(new RemoveButton(remove, item)); } }; listView.setReuseItems(true); add(listView); add(new AddButton(add)); } @Override public void onInitialize() { super.onInitialize(); listView.setModel(getModel()); } @SuppressWarnings(unchecked) protected void convertInput() { this.setConvertedInput((ListString)listView.getList()); } private class AddButton extends AjaxButton { private static final long serialVersionUID = 1L; public AddButton(final String id) { super(id); setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getModelObject().add(); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } } private class RemoveButton extends AjaxButton { private static final long serialVersionUID = 1L; private final ListItemString item; public RemoveButton(final String id, final ListItemString item) { super(id); this.item = item; setDefaultFormProcessing(false); } @Override protected void onSubmit(final AjaxRequestTarget target, final Form? form) { listView.getList().remove(item.getIndex()); target.add(TextFieldListView.this); } @Override protected void onError(final AjaxRequestTarget target, final Form? form) { throw new IllegalStateException(AJAX request threw an error); } }; } Thanks! On Thu, Aug 2, 2012 at 10:13 AM, Andrea Del Bene an.delb...@gmail.com wrote: Hi, what kind of problem have you encountered with ListView? Hi, I have a ListString that I want to represent with TextFields. I need to be able to dynamically add and remove them via AJAX. From what I’ve read online (and experienced firsthand) ListViews do not seem to be designed for this. What is the best way to approach this problem? Thanks! Ben - 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:
Re: Redirecting from Ajax onSubmit
So What should i do exactly in this case -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938p4650971.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to Mount Multiple URLS to Same Class in wicket 1.5.7
Actually I cant do in my case As i have given a flexibility to create n number of pages by adding and removing different wicket components and my framework allows to add those component dynamically in a class So every time when we need to create new page using those components can be done without and dev work. Is there any other way. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-Mount-Multiple-URLS-to-Same-Class-in-wicket-1-5-7-tp4650932p4650972.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DataTable in wicket 6 using wicket:container
how exactly would you attach a link to a span? link would complain that it is not attached to an anchor tag... -igor On Wed, Aug 1, 2012 at 2:45 PM, Steve Lowery slow...@gatessolutions.com wrote: The DataTable was changed in wicket 6 to use wicket:container instead of span on the td and th elements ( https://issues.apache.org/jira/browse/WICKET-4224). While this fixed the issue described in the ticket, it can make dealing with the DataTable a little more cumbersome and introduces a new bug in my opinion. If I want to simply add a link into a column (very usual use case), I cannot do so now without creating a dummy panel around it, or at least I don't know of a way. Any component with attributes in the componentTag itself get dropped because the wicket:container tag doesn't get rendered, only the child does. It works fine with plain Label's, but that's about it. I can create a handful of dummy components that wrap the columns real content, but wasn't sure if this was the best way to do it. Other people will certainly have the same issues when they upgrade to wicket 6. If you want me to create a quickstart for the link issue, I can do that. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Close Modal Widow via external link?
I have Modal window that contains external webpage. (e.g. RedirectPage(www.google.com)) I need to figure out the way to close the modal window by clicking button or link from this external site. What kind of javascript do I have to use to close the modal window? I've tried to copy the javascript that is called for Modal.closeCurrent(target) but it seems not working. Any help would be greatly appreciated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Close-Modal-Widow-via-external-link-tp4650975.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org