Re: [Vote] wicketstuff-core structure to support wicket 1.5 related development
[X] - trunk to track 1.5, branch for 1.4.11-SNAPSHOT and subsequent releases. (+:no merge later; -: trunk will be broken for an extended period) I think we should have the same layout as Wicket. Wicket 1.5 Options: [X] wicket 1.5 branch is set to wicket 1.5-SNAPSHOT and if there is demand we can cut releases to match the wicket milestones and/or release candidates. I don't think we really want to create wicketstuff releases for every 1.5 Milestone/RC, so probably we're better off now with the bleeding edge. Regards, Peter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: General question - business logic with Wicket, where to put it?
You can put your business logic elsewhere. Say: 1. Project Wicket GUI 2. Project Business Logic Minimum business logic into wicket gui or gui constructors. ** Martin 2010/8/14 Brown, Berlin [GCG-PFS] berlin.br...@primerica.com: What is the best practice for where to put business logic in Wicket. At first, I had put logic in the page constructor, but now I have learned a little bit about the Lifecycle of a page, the serialization of the page. So putting any kind of logic there didn't seem like a good idea. I placed logic in the action buttons onSubmit methods and form onSubmit methods. Placing any logic here in the onSubmits methods are OK, but sometimes it is difficult to find all the dependent objects. I gues I am used to a Struts MVC approach, where you have one Page action and then communicate with all of your dependent objects (say a form bean with all of the data); With Wicket, I see these issues: 1. When will the page constructor get invoked (should any kind of business logic be placed here?) 2. Where and when will the onSubmit/onUpdate action methods get invoked (should any business logic be placed here and are all the dependent objects available) Berlin Brown - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Remove support for Portlets in Wicket 1.5
Hi, With r985443 the support for portlets is completely removed. The code is copied to https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-portlets . Check the list of modified files in the commit to see which other files in Wicket are modified. To bring the wicketstuff project in shape you may also need to check WicketFilter class in 1.4.x. martin-g On Thu, Aug 12, 2010 at 9:42 AM, Wilhelmsen Tor Iver toriv...@arrive.nowrote: So next step is someone with experience in portlets to try to create a separate project with the classes from org.apache.wicket.protocol.http.portlet and whatever else is needed. Probably mostly a WicketPortletFilter to be used in front of WicketFilter that builds on the portlet-oriented code from the 1.4.x branch and sets up what is needed if it detects a portlet request? - Tor Iver
Re: Remove support for Portlets in Wicket 1.5
Hi, -1 to removing it We are using Wicket and portlets in many projects. At a minimum move it to wicketstuff. thanks, José Antonio Matute
Re: DropDownChoice does not push value into Model
Why are you using CPMs and PropertyModels together? I would go one way or the other. In your case, since you're just starting out it seems, I'd just use a regular model for the main object and use explicit property models to bind its properties to your components. The CPM is just too magicy and it can get confusing for beginners. So what you want is: ModelStudyModel studyModel = new ModelStudyModel(new StudyModel()); PropertyModelStudy propertyModel = new PropertyModelStudy(studyModel, study); See how I use the studyModel as the root of my PropertyModel rather than the StudyModel object contained in the studyModel itself? That's perfectly okay. What you're telling the PropertyModel is go to this model and ask for its object and then ask for its 'study' property. So, when you change the object that the studyModel points to, the propertyModel can still get to it. Does that make sense? With this approach, you can feel free to do setModelObject(new StudyModel()) and it will work. On Fri, Aug 13, 2010 at 9:14 AM, nivs shravann...@gmail.com wrote: James Thanks for pointing it out. Later in the code I have added, so the study object/instance in the initial model should be in synch right? Correct me if I am wrong. Let me also think about this point u made. But yeah do let me know if i have made a mistake. cpm = (CompoundPropertyModelStudyModel)this.getModel();reset the original one Cheers On Fri, Aug 13, 2010 at 7:49 PM, James Carman [via Apache Wicket] ml-node+2324076-505065694-32...@n4.nabble.comml-node%2b2324076-505065694-32...@n4.nabble.com wrote: Your DDC is bound to the original StudyModel's study with the lines: PropertyModel propertyModel = new PropertyModel(studyModel.getStudy(),Constants.STUDY_STATUS); studyStatusDpChoices = new DropDownChoice(Constants.STUDY_DROP_DOWN_CHOICE,propertyModel,studyStatusList,defaultChoiceRenderer); Then, you're replacing the StudyModel with this line: this.setModelObject(new StudyModel()); Thus, they get out of synch. On Fri, Aug 13, 2010 at 3:30 AM, nivs [hidden email]http://user/SendEmail.jtp?type=nodenode=2324076i=0 wrote: Hi All, http://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txthttp://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txt?by-user=t Code.txt I have a drop down choice control on the search panel and its selected choices are pushed to the model only once or the first time. Please have a look at the attached code: As part of this code, I noticed that when I uncomment the following line, the drop down choice works every time.(as it is supposed to) public void initialise(String id){ //cpm.getObject().setStudy(searchCriteria);///Set the search criteria object back in order for status to be filled in the next submit/search } However, this will not resolve my issue, because if I refreshed the study in the model when the details page is loaded, the problem re-occurs. Not sure why this is hapenning, I tried to debug as much as I can, all i can get to is, when i re-set the model's study instance after the search results have arrived , then it works. If I do not, then it fails to capture the value from DDC. Thank you again Cheers Niv -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.htmlhttp://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.html?by-user=t Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=2324076i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=2324076i=2 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=2324076i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=2324076i=4 -- View message @ http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2324076.html To unsubscribe from DropDownChoice does not push value into Model, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NodeServlet.jtp?tpl=unsubscribe_by_codenode=2323809code=c2hyYXZhbm5pdmVAZ21haWwuY29tfDIzMjM4MDl8LTkwOTU2NzkzNA==. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2324176.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
Using up/down/remove links of ListView items clears text fields
Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey: input type=text wicket:id=key //td tdValue: input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using up/down/remove links of ListView items clears text fields
those links remove all current items and repopulate the listview becuse the index of items has to be recalculated. you can try using a non-listview repeater and implementing the links yourself. -igor On Sat, Aug 14, 2010 at 7:05 AM, Sebastian nospam...@gmx.net wrote: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey: input type=text wicket:id=key //td tdValue: input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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: Using up/down/remove links of ListView items clears text fields
Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastian nospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey: input type=text wicket:id=key //td tdValue: input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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 add Scroll to tabpanel
Hi Thomerson below code mentioned but it is not showing any scroll bar is any other way is their body div id=pagecontent wicket:panel wicket:id=panel style=width:120px;height:120px;overflow-y:scroll;padding:5x h5 align=rightDataView Navigator/h5 table class=report cellspacing=0 cellpadding=0 style=margin-top: 15px; padding-left: 50px; thead tr th /th /tr /thead tbody tr wicket:id=alertRow td/td td/td /tr /tbody /table /wicket:panel /div /body /html Thank you Aruna -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2325315.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
Bug or feature/improvement/question?
Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug or feature/improvement/question?
What if the validation criteria is based on other fields too?
Re: Bug or feature/improvement/question?
Still.. if value not changed, what does it matter? 2010/8/14 James Carman ja...@carmanconsulting.com: What if the validation criteria is based on other fields too? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug or feature/improvement/question?
Ah.. we need to ofcourse validate first time. ** Martin 2010/8/14 Martin Makundi martin.maku...@koodaripalvelut.com: Still.. if value not changed, what does it matter? 2010/8/14 James Carman ja...@carmanconsulting.com: What if the validation criteria is based on other fields too? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using up/down/remove links of ListView items clears text fields
Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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 package wickettest; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import org.apache.wicket.markup.html.form.FormComponent; public class FormComponentReuseManager implements Serializable { private static final long serialVersionUID = 1L; private final MapObject, MapString, FormComponent ? componentsByRowId = new HashMapObject, MapString, FormComponent ? (); public T FormComponentT rememberOrReuse(final Object rowId, final FormComponentT newComponent) { MapString, FormComponent ? rowComponents = componentsByRowId.get(rowId); if (rowComponents == null) componentsByRowId.put(rowId, rowComponents = new HashMapString, FormComponent ? ()); @SuppressWarnings(unchecked) final FormComponentT existingComponent = (FormComponentT) rowComponents.get(newComponent.getId()); if (existingComponent == null) {
Re: Using up/down/remove links of ListView items clears text fields
Hi! Again, I have a custom solution for you :) It's called AjaxFormSubmittingChangeListenerBehavior http://apache-wicket.1842946.n4.nabble.com/New-behavior-AjaxFormSubmittingChangeListenerBehavior-td1909633.html#a1909633 2010/8/14 Sebastian nospam...@gmx.net: Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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: Bug or feature/improvement/question?
What if one of the other values has changed? Or perhaps it's a temporal validation (last time it was submitted it was too early). On Aug 14, 2010 12:26 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ah.. we need to ofcourse validate first time. ** Martin 2010/8/14 Martin Makundi martin.maku...@koodaripalvelut.com: Still.. if value not changed, what does it matter? 2010/8/14 James Carman ja...@carmanconsulting.com: What if the validation criteria is based on other fields too? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using up/down/remove links of ListView items clears text fields
But then all listviews that need up/down links have to be in a form. On Aug 14, 2010 12:37 PM, Sebastian nospam...@gmx.net wrote: Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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: Using up/down/remove links of ListView items clears text fields
Couldn't detect the listview if it is part of a form and decide for SubmitLink or Link? On 14.08.2010 18:51, James Carman wrote: But then all listviews that need up/down links have to be in a form. On Aug 14, 2010 12:37 PM, Sebastiannospam...@gmx.net wrote: Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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: Using up/down/remove links of ListView items clears text fields
Hi Martin, how would I use this in my case? I am relatively new to Wicket. Also does it have a graceful fallback for browsers having JS disabled? Seb On 14.08.2010 18:39, Martin Makundi wrote: Hi! Again, I have a custom solution for you :) It's called AjaxFormSubmittingChangeListenerBehavior http://apache-wicket.1842946.n4.nabble.com/New-behavior-AjaxFormSubmittingChangeListenerBehavior-td1909633.html#a1909633 2010/8/14 Sebastiannospam...@gmx.net: Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRowrows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRowitem) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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
Re: Bug or feature/improvement/question?
You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug or feature/improvement/question?
Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - 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: Using up/down/remove links of ListView items clears text fields
how would I use this in my case? Attach it as onclick event to your link? If you don't have a form in the hierarchy above it will not work. A form is needed to submit any kind of data nicely. And, it does not work without JS. Really, we are in 2010, I am sure it is time to start ignoring browsers without JS! ** Martin 2010/8/14 Sebastian nospam...@gmx.net: Hi Martin, how would I use this in my case? I am relatively new to Wicket. Also does it have a graceful fallback for browsers having JS disabled? Seb On 14.08.2010 18:39, Martin Makundi wrote: Hi! Again, I have a custom solution for you :) It's called AjaxFormSubmittingChangeListenerBehavior http://apache-wicket.1842946.n4.nabble.com/New-behavior-AjaxFormSubmittingChangeListenerBehavior-td1909633.html#a1909633 2010/8/14 Sebastiannospam...@gmx.net: Hi Martin, thanks for pointing me to the reuse component concept. It solved my problem partially but not completely. The problem is, that the links provided by the listview result in HTTP GET request which means that any values recently entered will not be transferred back and get lost. I am now using my own link implementations based on the SubmitLink class. I am attaching all files of my working example as reference. Generally I think it makes great sense to have this behaviour as part of the ListView. At least I expected it to work this way in the first place. Regards, Seb On 14.08.2010 16:40, Martin Makundi wrote: Hi! You can solve this in a robust manner using reusemanager: http://osdir.com/ml/users-wicket.apache.org/2010-08/msg00161.html 2010/8/14 Sebastiannospam...@gmx.net: Hi, I am trying to use a list view component on a page where rows with text fields can be added, removed or moved around. I am using the removeLink, moveUpLink and moveDownLink methods of the listview to create the respective links for each list item. The problem is that even when I enable the reuseListItems option, on using any of these links the text fields forget the recently entered data (raw input) and revert to the values of the backing model. This issue does not occur when I am adding rows the list view. Below is an example. I can add rows using the Add Row button. When I enter text into the text fields, when I use the links next to a row, the content of any text field is cleared. Any suggestions? Regards, Seb / PAGE / import java.util.*; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.list.*; import org.apache.wicket.model.*; public class ListViewPage extends WebPage { public static class Row { public String key; public String value; } private final ListRow rows = new ArrayListRow(); public ListViewPage(final PageParameters parameters) { add(new FormListRow(rowsForm). add(new Button(addRowButton) { public void onSubmit() { rows.add(new Row()); } }.setDefaultFormProcessing(false)). add(new ListViewRow(rowsList, new PropertyModelListRow(this, rows)) { protected void populateItem(final ListItemRow item) { final Row row = item.getModelObject(); item.add(new Label(index, new AbstractReadOnlyModelInteger() { public Integer getObject() { return item.getIndex() + 1; } })); item.add(new RequiredTextFieldString(key, new PropertyModelString(row, key))); item.add(new TextFieldString(value, new PropertyModelString(row, value))); item.add(removeLink(removeRowLink, item)); item.add(moveUpLink(moveUpLink, item)); item.add(moveDownLink(moveDownLink, item)); } }.setReuseItems(true))); } } / HTML / html headtitleListView Test/title/head body form wicket:id=rowsForm button wicket:id=addRowButtonAdd Row/button tabletr wicket:id=rowsList tdnbsp;nbsp;nbsp;#span wicket:id=index1/span/td tdKey:input type=text wicket:id=key //td tdValue:input type=text wicket:id=value //td td a href=# wicket:id=moveUpLink[uarr;]/a a href=# wicket:id=moveDownLink[darr;]/a a href=# wicket:id=removeRowLink[X]/a /td /tr/table input type=submit value=Submit / /form /body /html - 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:
Re: Bug or feature/improvement/question?
it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - 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: Bug or feature/improvement/question?
Ok. That's pretty much same as my inline override. Is there a way to adjust mini/max value on the fly? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - 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
Custom AJAX component...
Hi, I would like to write an component that will retrieve page-specific information using AJAX from the javascript running in the browser and interpret it itself instead of having wicket rendering the content. This approach is slightly different from the usual behavior as in those cases a wicket component renders its own content again and the page is updated with the new content of the component. In this case however, I would like to return an XML document which is interpreted by the javascript directly, where the XML document is page specific. How can I achieve such a scenario? Any examples somewhere? Is there a specific Component type or behavior I should use? Cheers Erik
Re: Bug or feature/improvement/question?
the decorator just does the caching you want, tweaking the validators is left up to you. -igor On Sat, Aug 14, 2010 at 11:58 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ok. That's pretty much same as my inline override. Is there a way to adjust mini/max value on the fly? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom AJAX component...
in wicket-examples there is a demo that integrates prototype ajax into wicket, see if that is doing what you want. -igor On Sat, Aug 14, 2010 at 1:59 PM, Erik Brakkee erik.brak...@gmail.com wrote: Hi, I would like to write an component that will retrieve page-specific information using AJAX from the javascript running in the browser and interpret it itself instead of having wicket rendering the content. This approach is slightly different from the usual behavior as in those cases a wicket component renders its own content again and the page is updated with the new content of the component. In this case however, I would like to return an XML document which is interpreted by the javascript directly, where the XML document is page specific. How can I achieve such a scenario? Any examples somewhere? Is there a specific Component type or behavior I should use? Cheers Erik - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket page test 2.0.0 is now available (for Wicket 1.5)
Dear all, Wicket page test 2.0.0 is now available. It is the first version that works with Wicket 1.5-M1 and onwards. It is a library allowing you to unit test your Wicket pages easily, supporting AJAX and Javascript without changes to your pages. Get it from maven as described in http://wicketpagetest.sourceforge.net/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
NoSuchMethodError with custom authorization
Hello List, I'm trying to implement custom authorization, but I get this error [1]. Relevant part of code [2] isn't spectacular. wicket.version1.4.9/wicket.version JRE: java-6-sun-1.6.0.10 I've googled for this exception, but without any success. [1] http://pastebin.com/V292Vm7e [2] http://pastebin.com/BiBQFsGs Best Regards, Anton - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug or feature/improvement/question?
Maybe MaximumValidator should take IModel? Why validators don't comply to the general pattern of using IModel...? ** Martin 2010/8/15 Igor Vaynberg igor.vaynb...@gmail.com: the decorator just does the caching you want, tweaking the validators is left up to you. -igor On Sat, Aug 14, 2010 at 11:58 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ok. That's pretty much same as my inline override. Is there a way to adjust mini/max value on the fly? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug or feature/improvement/question?
Why should the validation value be able to change? Why should it be a moving target? On Sat, Aug 14, 2010 at 11:29 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Maybe MaximumValidator should take IModel? Why validators don't comply to the general pattern of using IModel...? ** Martin 2010/8/15 Igor Vaynberg igor.vaynb...@gmail.com: the decorator just does the caching you want, tweaking the validators is left up to you. -igor On Sat, Aug 14, 2010 at 11:58 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ok. That's pretty much same as my inline override. Is there a way to adjust mini/max value on the fly? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.com
Re: Bug or feature/improvement/question?
Hi! It might (and does) depend on other form component values. ** Martin 2010/8/15 Jeremy Thomerson jer...@wickettraining.com: Why should the validation value be able to change? Why should it be a moving target? On Sat, Aug 14, 2010 at 11:29 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Maybe MaximumValidator should take IModel? Why validators don't comply to the general pattern of using IModel...? ** Martin 2010/8/15 Igor Vaynberg igor.vaynb...@gmail.com: the decorator just does the caching you want, tweaking the validators is left up to you. -igor On Sat, Aug 14, 2010 at 11:58 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ok. That's pretty much same as my inline override. Is there a way to adjust mini/max value on the fly? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: it would mean add(new CachingDecorator(new MinimumValidator())); -igor On Sat, Aug 14, 2010 at 11:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Thankx igor, what do you mean validator decorator? I am working on overriding MaximumValidator which practically means re-implementing it because the maximum value annot be changed on the fly. Decorator sounds nice...what would it mean in the case of Minimum/MaximumValidator or equivalent? ** Martin 2010/8/14 Igor Vaynberg igor.vaynb...@gmail.com: You can create a validator decorator that does caching however you want -igor On Aug 14, 2010 9:16 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Is it a necessary feature that validation occurs on components whose values have not changed? We have quite heavy validation criteria so it would be nice to optimize initializing the validator only for cases where component value has actually changed. We can do this with !getModelComparator().compare(this, convertedInput) but maybe this should be default behavior? Good reasons why not? Unchanged values are not anyways updated to model so why should they be validated.. just in case if validation criteria has changed since previous submit? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org