wicket enclosure around a list
Hi, I was trying to use wicket enclosure on a list. The html look as below [ref number] But I keep getting an error that says wicket enclosure has to declare a child. I added wicket:child="list" to the tag, but I still get the same error. list is a ListView derived class. I could work around this with a wicket:container, and hide the entire table if the list is not visible, but I would really like to use wicket:enclosure as it is cleaner. Any ideas? Thanks Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: POM problems in trunk?
Have you checked out the entire wicket source tree - that contains jdk14, jdk15 etc? If not then maybe the individual poms cannot find the parent pom that defines those version variables. On 11 Oct 2007, at 22:46, Tauren Mills wrote: I just updated wicket, wicket-extensions and wicket-examples from trunk. When I tried to run mvn install eclipse:eclpise, I got errors stating that there were dependencies missing versions. So I added versions to the pom.xml for wicket and wicket-examples. Now mvn runs. Am I doing something wrong, or do the pom.xml files in trunk need versions? Changing them to contain version params did the trick, but should it work without them? wicket/pom.xml: javax.portlet portlet-api 1.0 provided true org.apache.portals.bridges portals-bridges-common 1.0.3 provided true wicket-examples/pom.xml: javax.portlet portlet-api 1.0 provided - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
POM problems in trunk?
I just updated wicket, wicket-extensions and wicket-examples from trunk. When I tried to run mvn install eclipse:eclpise, I got errors stating that there were dependencies missing versions. So I added versions to the pom.xml for wicket and wicket-examples. Now mvn runs. Am I doing something wrong, or do the pom.xml files in trunk need versions? Changing them to contain version params did the trick, but should it work without them? wicket/pom.xml: javax.portlet portlet-api 1.0 provided true org.apache.portals.bridges portals-bridges-common 1.0.3 provided true wicket-examples/pom.xml: javax.portlet portlet-api 1.0 provided - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TreeTable, invisble cells and headersand
(1.3.0-SNAPSHOT as of 2007-10-11) In a three column TreeTable (the "LEFT" column holds/renders the tree) the header text and non-tree-column values are not visible (IE6.0.29 & FF2.0.7). tree-table.css specifies "display: block;" for "div.wicket-tree-table span.b_ span.c_" and for "div.wicket-tree-table span.b_ span.d_" where (according to the css file comments): b_ column c_ column-inner d_ column-inner-first On copying the contents of the generated html & css into files on the filesystem and appropriately modifying the css reference in head (not pleasant - is there a better way?) and then opening the html in a browser, something that resembles the original page (minus tree/node decorations) appears, still missing the data in all the same cells. If, however, I comment out the "display: block;"s from the css, _all_ data and headers are visible. I'm no css expert but according to w3schools, display:block = "the element will be displayed as a block-level element, with a line break before and after the element". The java code (minus package & imports) and html template are pasted in below. Regards - Cemal http://jWeekend.co.uk jWeekend.co.uk TreeTableWithUnwantedBlankHeadersAndCells.java (minus package & imports) public class TreeTableWithUnwantedBlankHeadersAndCells extends WebPage { public TreeTableWithUnwantedBlankHeadersAndCells() { ColumnLocation l = new ColumnLocation(Alignment.LEFT, 12, Unit.EM); ColumnLocation m = new ColumnLocation(Alignment.MIDDLE, 30, Unit.PROPORTIONAL); ColumnLocation r = new ColumnLocation(Alignment.RIGHT, 200, Unit.PX); IColumn columns[] = new IColumn[] { new PropertyTreeColumn(l, "L", "userObject.name"), new PropertyRenderableColumn(m, "M", "userObject.id"), new PropertyRenderableColumn(r, "R", "userObject.done") }; TreeTable tree = new TreeTable("tree", makeDummyTreeModel(), (IColumn[]) columns); tree.setRootLess(true); tree.getTreeState().collapseAll(); tree.getTreeState().setAllowSelectMultiple(true); add(treetable); } private DefaultTreeModel makeDummyTreeModel() { class DummyUserObject { String id; String name; String done; public DummyUserObject(String id, String name, String done) { super(); this.id = id; this.name = name; this.done = done; } } DefaultMutableTreeNode root = new DefaultMutableTreeNode(new DummyUserObject("0", "dummyRoot", "true")); DefaultMutableTreeNode n1 = new DefaultMutableTreeNode(new DummyUserObject("1", "c1", "true")); DefaultMutableTreeNode n2 = new DefaultMutableTreeNode(new DummyUserObject("2", "c2", "false")); DefaultMutableTreeNode n21 = new DefaultMutableTreeNode(new DummyUserObject("3", "c21", "false")); root.add(n1); root.add(n2); n2.add(n21); return new DefaultTreeModel(root); } } TreeTableWithUnwantedBlankHeadersAndCells.html [EXTRACTOR STATUS TREETABLE] -- View this message in context: http://www.nabble.com/TreeTable%2C-invisble-cells-and-headersand-tf4610863.html#a13167555 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoCompleteTextfield - how to populate two input fields
Hi German, thanks for your offer, would be great if you could send me your code. BTW, in the meantime I got my 2nd approach working, too. I've got the two separate textfields, each of them showing the "zipcode - city" autocomplete lists when data is entered. After selecting from the autocomplete list, both fields are updated correctly! Regards, Oliver German Morales wrote: > > Hi again, > > Yes, we have something similar to what you describe in your point 2. > > The only difference is that we have other structure. What we have is the > following: > > -Each locality has an internal ID, a Zip Code, a City and a (swiss) > kanton. > > -in the html we have a Hidden, which stores the internal ID, and 1 (only) > TextField, which shows Zip Code + City + Canton (For example: "8052 > Seebach, ZH"). > > -then we have an extension as you mention (AutoCompleteTextField, > Renderer, Behavior, JavaScript), which is already working with this > schema. It also contains many fixes over the original > autocompletetextfield (perhaps originated from the extra behavior?). > > If this approach is good for you, i can send you our version, plus some > example usages. > > Regards, > > German > > > It seems that Oliver Lieven wrote: >> >> Hi, >> >> thanks for your answer. >> >> No, solution didn't work as supposed, mainly because the AutoComplete >> fills >> the input field in the browser with the data (in my case either zipcode >> or >> city), but doesn't update the model. >> >> To update the model I have to attach some Ajax...Behavior, but this is >> called with the data put into the textfield (i.e. either the selected >> zipcode put into the zipcode field by the autocomplete, *or* the selected >> city from the city field). In the Ajax...Behavior's onUpdate()-method >> neither the city nor the zipcode are enough to determine the value to use >> to >> update the related field. >> >> So I had two other ideas: >> >> 1. in my autocomplete-list I set the "textvalue" to the id of a >> "zipcode-city" combination. When the user selects from the >> autocomplete-list, this id is written into the corresponding input-field. >> The attached AjaxOnChangeBehavior now gets this id, determines the >> zipcode-city, and updates the city and the zipcode field. This works, but >> looks a little strange to the user (e.g. selection of "71254 Ditzingen" >> from >> autocomplete-list writes the id ("1223") into the zipcode-field, this >> issues >> the Ajax-call, which updates both fields with the correct data, i.e. >> zipcode=71254, city=Ditzingen). As I said, works but not pretty. >> >> 2. So I'm currently extended the AutoCompleteTextField, ...Renderer, >> ...Behavior, ..JavaScript to accept a second, "related" field in its >> constructor. I then attach two attributes to the autocomplete-list >> entries >> (say textvalue and textvalue2), and modified the JavaScript to update >> both >> fields. This seems to me the best approach to my specific problem, and >> seems >> to work as intended. >> >> Hope my answer was not to confusing... >> regards, >> Oliver >> >> >> German Morales wrote: >>> >>> Hi, >>> >>> Sorry, i'm a little late with my response. >>> Did the suggestion by Nino work? >>> >>> If it works, i would like to know more details about it. >>> >>> If not, we already had a somehow similar problem (Swiss addresses), and >>> we >>> have a different solution already working. Perhaps it can help you too. >>> >>> Regards, >>> >>> German >>> >>> >>> It seems that Nino Saturnino Martinez Vazquez Wael wrote: NP, waiting with excitement to hear if it works:) Oliver Lieven wrote: > Thanks allot for your efforts and detailed answer! Sounds good, I'll > give it > a try. > > > Nino.Martinez wrote: > >> No what I meant was that when a user selects something in one of >> your >> auto complete fields they'll automatickly select something in both, >> might have been a little scares on information: >> >> IModel commonModel=new Model(); >> >> >> AbstractModel() Text=new AbstractModel(){ >> >> getObject{ >> return commonModel.getObject.Text; >> } >> setObject(obj){ >> commonModel.setObject(obj) >> } >> >> } >> >> >> AbstractModel() name=new AbstractModel(){ >> >> getObject{ >> return commonModel.getObject.name; >> } >> setObject(obj){ >> commonModel.setObject(obj) >> } >> >> } >> >> >> >> AutoCompleteTextField phoneName = new AutoCompleteTextField( >> "phoneName", name, >> new BestEffortRendererAutoCompleteRenderer()) { >> @Override >> protected Iterator getChoices(String input) { >> >> return findItems(input); >> } >> }; >> >> >> AutoCompleteTextField phoneSeries = new AutoCompleteTextField( >> "phoneN
Updating distant (unrelated) components via Ajax when a shared model changes
All, We're building an application which in some respects needs to behave like a desktop client, where actions in one part of the UI affect components in another portion of the UI. Our specific case was that we had a left-nav which contained some links, and a content area which contains an AjaxTabbedPanel. The links in the left-nav need to be rendered visible/invisible based on the type of content in the currently selected tab. Since we didn't want to have a hard reference from the tab panel to the left nav panel (because we wanted them to be relatively reusable components), we decided to create a custom model that is shared between the two. We then used the attached class/interfaces to: 1) Enable the tab panel to notify the tab model that it has changed it via Ajax 2) Enable the model in turn to notify the left-nav panel that its model has changed 3) Allow the left-nav panel to re-render itself by adding it to the AjaxRequestTarget So, in our implementation we have a TabModel, which extends AjaxAwareModel. The LefNavPanel implements AjaxModelAware, and has an indirect reference to the TabModel. When the currently selected tab is changed via Ajax in the AjaxTabbedPanel, we call getTabModel().notifyModelChanged(this, target). The AjaxAwareModel code then looks for any component in the page which extends AjaxModelAware, and notifies them that the tab model changed. I'm posting this code because 1) I hope it will prove useful to someone else, and 2) I'd appreciate any feedback, as I'd rather learn about major design issues I overlooked sooner rather than later! I see two improvements we could make. First, add generics to AjaxModelAware, so we can reduce the number of components who are notified about the model changing by only looking for components implementing the typed AjaxModelAware interface. Second, move the code in AjaxAwareModel into some sort of helper class so that models can participate in this mechanism without having to extend that class. BTW, thanks to Frank Bille who actually started me down the path which led to this. http://www.nabble.com/file/p13165777/AjaxAwareModel.java AjaxAwareModel.java http://www.nabble.com/file/p13165777/AjaxModelAware.java AjaxModelAware.java http://www.nabble.com/file/p13165777/AjaxUpdateAware.java AjaxUpdateAware.java Thanks in advance for any thoughts! Matt Clark -- View this message in context: http://www.nabble.com/Updating-distant-%28unrelated%29-components-via-Ajax-when-a-shared-model-changes-tf4610276.html#a13165777 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-beta4 released!
Crap.. Knew I should have got a second oppinion on it :( http://martijndashorst.com/blog/2007/08/29/wicket-13-beta-3-released/ Frank On 10/11/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > > Copy paste is a bitch :) > > > Apache Wicket is a component oriented Java web application framework > > currently undergoing incubation at the Apache Software foundation. With > ^ > > proper mark-up/logic separation, a POJO data model, and a refreshing > lack of > > Frank, where did you get the template from? We should fix this one. > > Martijn > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.0-beta4 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Jetty classloader
On Thursday, October 11, 2007, 9:37:27 PM, John <[EMAIL PROTECTED]> wrote: > I imagine that Jetty is using two classloaders, one for the Filter > and one for my application classes. Has anyone else had this problem? No, but different classloaders would suggest you've deployed the Wicket jar somewhere other than in the web app's WEB-INF/lib/, wouldn't it? Is that the case? /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jetty classloader
Ooops! Posted too soon... I had simply removed wicket from my pom by mistake and Eclipse had not shown any build errors but did remove the import statement from my Application. Might have to change this setting! On 11 Oct 2007, at 14:37, John Patterson wrote: Hi, I am having problems deploying my app on Jetty getting this message: org.apache.wicket.WicketRuntimeException: Application class com.hello.site.HelloApplication must be a subclass of WebApplication at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.crea teApplication(ContextParamWebApplicationFactory.java:78) at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.crea teApplication(ContextParamWebApplicationFactory.java:51) I imagine that Jetty is using two classloaders, one for the Filter and one for my application classes. Has anyone else had this problem? Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-beta4 released!
Grats:) Frank Bille wrote: This is the fourth beta for Apache Wicket we have prepared for your pleasure. It contains over 120 fixes to issues with previous releases and todo items we have cleared. In this announcement: * Apache Wicket * This release ** Portlet support * Migrating from 1.2 * Downloading the release * Validating the release * Reporting bugs Eager people click here to download the distribution, others can read further: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ We thank you for your patience and support. Given the current list of remaining issues and the fact that we have just accepted portlet support back in, we think a fifth beta release is necessary. But that is no excuse for not giving this fourth installment a test drive! The Wicket Team -= Apache Wicket =- Apache Wicket is a component oriented Java web application framework currently undergoing incubation at the Apache Software foundation. With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML. Our migration to a top level project is now completed and you can find our website and documentation here: http://wicket.apache.org -= This release =- This release is the fourth in a series of beta releases until we feel confident to finalize Wicket 1.3. This is called a beta because we don't have fixed all bugs, and probably haven't found them all either. -- Portlet support -- A new feature in this beta4 release is the merge of Ate Douma's portlet branch into trunk. This reintroduces portlet support in Wicket. http://cwiki.apache.org/WICKET/portal-howto.html -= Migrating from 1.2 =- If you are coming from Wicket 1.2, you really want to read our migration guide, found on the wiki: http://cwiki.apache.org/WICKET/migrate-13.html -= Downloading the release =- You can download the release from the official Apache mirror system, and you can find it through the following link: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ For the Maven and Ivy fans out there: update your pom's to the following, and everything will be downloaded automatically: org.apache.wicket wicket 1.3.0-beta4 Substitute the artifact ID with the projects of your liking to get the other projects. Please note that we don't prescribe a Logging implementation for SLF4J. You need to specify yourself which one you prefer. Read more about SLF4J here: http://slf4j.org -= Validating the release =- The release has been signed by Frank Bille, your release manager for today. The public key can be found in the KEYS file in the download area. Download the KEYS file only from the Apache website. http://www.apache.org/dist/wicket/1.3.0-beta4/KEYS Instructions on how to validate the release can be found here: http://www.apache.org/dev/release-signing.html#check-integrity -= Reporting bugs =- In case you do encounter a bug, we would appreciate a report in our JIRA: http://issues.apache.org/jira/browse/WICKET -= The distribution =- In the distribution you will find a README. The README contains instructions on how to build from source yourself and a list of all things that have been fixed, added and/or removed since the first beta release. -= Release Notes - Wicket - Version 1.3.0-beta4 =- ** Bug * [WICKET-349] - ListView can't undo changes to model * [WICKET-470] - AjaxFormComponentUpdatingBehavior won't work for RadioChoices * [WICKET-497] - For stateless mounted page incorrect url is generated * [WICKET-520] - Escape doesn't work for AjaxEditableLabel in Firefox * [WICKET-572] - replacing tr using ajax does not work in safari * [WICKET-611] - AbstractRequestTargetUrlCodingStrategy ignores query parameters if there is no parameter in the path * [WICKET-631] - Resource.getParameters() empty when resource is mounted * [WICKET-635] - FormTester Does Not Properly Handle DropDownChoice With Null Model * [WICKET-640] - modal window close button does not cancel the event after closing the window * [WICKET-685] - ReloadingWicketFilter not working with markup inheritance * [WICKET-705] - StringValue javadoc incorrect regrading conversion to checked exception * [WICKET-707] - Invoking a request listener on a page returns an Expired Error page * [WICKET-722] - IndicatingAjaxFallbackLink does not remove indicator if the link itself is added via ajax * [WICKET-728] - WicketTester could not handle Multipart form without upload * [WICKET-735] - SqlTimestampConverter and it's Date and Time friends die on null and other breakage. * [WICKET-745] - AbstractAjaxTimerBehavior triggered more than expected after a new Ajax rendering * [WICKET-756] - FormComponent.getValue uses equals instead of == to compare NO_RAW_INPUT * [WICKET-775
Jetty classloader
Hi, I am having problems deploying my app on Jetty getting this message: org.apache.wicket.WicketRuntimeException: Application class com.hello.site.HelloApplication must be a subclass of WebApplication at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.create Application(ContextParamWebApplicationFactory.java:78) at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.create Application(ContextParamWebApplicationFactory.java:51) I imagine that Jetty is using two classloaders, one for the Filter and one for my application classes. Has anyone else had this problem? Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validating a NonZero Values and Validators Project in General
Thanks Gwyn. I understand. Although I think maybe there are some validators we would all use like those already included in wicket. f(t) On 10/11/07, Gwyn Evans <[EMAIL PROTECTED]> wrote: > > On Thursday, October 11, 2007, 8:06:47 PM, Francisco < > [EMAIL PROTECTED]> wrote: > > > Hi, I am using Apache Wicket 1.3.0-beta2 and want to have a nonzero > positive > > validator, a nonzero negative, and a nonzero positive or negative. > > > I saw that wicket comes with the NumberValidator.minimum maximun etc. > > Will there be more validators added to the framework? > > Is there a stuff project or smaller project in which to contribute? > > Could I have these validators without implementing my own? > > You could supply a patch to NumberValidator, but they're not really > complex, e.g. > >/** > * Validator to check the number is greater than zero > */ >public class PositiveLongValidator extends AbstractValidator { >protected void onValidate(IValidatable validatable) { >final long value = ((Number) validatable.getValue > ()).longValue(); >if (!(value > 0)) { >error(validatable); >} >} >} > > /Gwyn > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Apache Wicket 1.3.0-beta4 released!
Copy paste is a bitch :) > Apache Wicket is a component oriented Java web application framework > currently undergoing incubation at the Apache Software foundation. With ^ > proper mark-up/logic separation, a POJO data model, and a refreshing lack of Frank, where did you get the template from? We should fix this one. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoCompleteTextfield - how to populate two input fields
Hi again, Yes, we have something similar to what you describe in your point 2. The only difference is that we have other structure. What we have is the following: -Each locality has an internal ID, a Zip Code, a City and a (swiss) kanton. -in the html we have a Hidden, which stores the internal ID, and 1 (only) TextField, which shows Zip Code + City + Canton (For example: "8052 Seebach, ZH"). -then we have an extension as you mention (AutoCompleteTextField, Renderer, Behavior, JavaScript), which is already working with this schema. It also contains many fixes over the original autocompletetextfield (perhaps originated from the extra behavior?). If this approach is good for you, i can send you our version, plus some example usages. Regards, German It seems that Oliver Lieven wrote: > > Hi, > > thanks for your answer. > > No, solution didn't work as supposed, mainly because the AutoComplete > fills > the input field in the browser with the data (in my case either zipcode or > city), but doesn't update the model. > > To update the model I have to attach some Ajax...Behavior, but this is > called with the data put into the textfield (i.e. either the selected > zipcode put into the zipcode field by the autocomplete, *or* the selected > city from the city field). In the Ajax...Behavior's onUpdate()-method > neither the city nor the zipcode are enough to determine the value to use > to > update the related field. > > So I had two other ideas: > > 1. in my autocomplete-list I set the "textvalue" to the id of a > "zipcode-city" combination. When the user selects from the > autocomplete-list, this id is written into the corresponding input-field. > The attached AjaxOnChangeBehavior now gets this id, determines the > zipcode-city, and updates the city and the zipcode field. This works, but > looks a little strange to the user (e.g. selection of "71254 Ditzingen" > from > autocomplete-list writes the id ("1223") into the zipcode-field, this > issues > the Ajax-call, which updates both fields with the correct data, i.e. > zipcode=71254, city=Ditzingen). As I said, works but not pretty. > > 2. So I'm currently extended the AutoCompleteTextField, ...Renderer, > ...Behavior, ..JavaScript to accept a second, "related" field in its > constructor. I then attach two attributes to the autocomplete-list entries > (say textvalue and textvalue2), and modified the JavaScript to update both > fields. This seems to me the best approach to my specific problem, and > seems > to work as intended. > > Hope my answer was not to confusing... > regards, > Oliver > > > German Morales wrote: >> >> Hi, >> >> Sorry, i'm a little late with my response. >> Did the suggestion by Nino work? >> >> If it works, i would like to know more details about it. >> >> If not, we already had a somehow similar problem (Swiss addresses), and >> we >> have a different solution already working. Perhaps it can help you too. >> >> Regards, >> >> German >> >> >> It seems that Nino Saturnino Martinez Vazquez Wael wrote: >>> NP, waiting with excitement to hear if it works:) >>> >>> Oliver Lieven wrote: Thanks allot for your efforts and detailed answer! Sounds good, I'll give it a try. Nino.Martinez wrote: > No what I meant was that when a user selects something in one of > your > auto complete fields they'll automatickly select something in both, > might have been a little scares on information: > > IModel commonModel=new Model(); > > > AbstractModel() Text=new AbstractModel(){ > > getObject{ > return commonModel.getObject.Text; > } > setObject(obj){ > commonModel.setObject(obj) > } > > } > > > AbstractModel() name=new AbstractModel(){ > > getObject{ > return commonModel.getObject.name; > } > setObject(obj){ > commonModel.setObject(obj) > } > > } > > > > AutoCompleteTextField phoneName = new AutoCompleteTextField( > "phoneName", name, > new BestEffortRendererAutoCompleteRenderer()) { > @Override > protected Iterator getChoices(String input) { > > return findItems(input); > } > }; > > > AutoCompleteTextField phoneSeries = new AutoCompleteTextField( > "phoneName", text, > new BestEffortRendererAutoCompleteRenderer()) { > @Override > protected Iterator getChoices(String input) { > > return findItems(input); > } > }; > > And ofcourse you need to add the other completefield to the > ajaxresponse... > > Hope this pseudo code works a little better... Was on my way out the > door before... > > > Oliver Lieven wrote: > >> Hi Nino, >> thanks for your fast reply. Yes, a shared Pro
Re: Apache Wicket 1.3.0-beta4 released!
> Special thanks go to Frank for making this release reality! Yay! Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-beta4 released!
This is a special occasion for the Wicket project: According to me, Wicket 1.3.0-beta4 is the first release performed by another person than myself, since we became an open source project at sourceforge. It most certainly is the first in a couple of years though. Special thanks go to Frank for making this release reality! Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validating a NonZero Values and Validators Project in General
On Thursday, October 11, 2007, 8:06:47 PM, Francisco <[EMAIL PROTECTED]> wrote: > Hi, I am using Apache Wicket 1.3.0-beta2 and want to have a nonzero positive > validator, a nonzero negative, and a nonzero positive or negative. > I saw that wicket comes with the NumberValidator.minimum maximun etc. > Will there be more validators added to the framework? > Is there a stuff project or smaller project in which to contribute? > Could I have these validators without implementing my own? You could supply a patch to NumberValidator, but they're not really complex, e.g. /** * Validator to check the number is greater than zero */ public class PositiveLongValidator extends AbstractValidator { protected void onValidate(IValidatable validatable) { final long value = ((Number) validatable.getValue()).longValue(); if (!(value > 0)) { error(validatable); } } } /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-beta4 released!
Congrats to Wicket team. Superb job! 2007/10/11, Frank Bille <[EMAIL PROTECTED]>: > > This is the fourth beta for Apache Wicket we have prepared for your > pleasure. It contains over 120 fixes to issues with previous releases and > todo items we have cleared. > > In this announcement: > > * Apache Wicket > * This release > ** Portlet support > * Migrating from 1.2 > * Downloading the release > * Validating the release > * Reporting bugs > > Eager people click here to download the distribution, others can read > further: > > http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > We thank you for your patience and support. Given the current list of > remaining issues and the fact that we have just accepted portlet support > back in, we think a fifth beta release is necessary. But that is no excuse > for not giving this fourth installment a test drive! > > The Wicket Team > > -= Apache Wicket =- > > Apache Wicket is a component oriented Java web application framework > currently undergoing incubation at the Apache Software foundation. With > proper mark-up/logic separation, a POJO data model, and a refreshing lack > of > XML, Apache Wicket makes developing web-apps simple and enjoyable again. > Swap the boilerplate, complex debugging and brittle code for powerful, > reusable components written with plain Java and HTML. > > Our migration to a top level project is now completed and you can find our > website and documentation here: > > http://wicket.apache.org > > -= This release =- > > This release is the fourth in a series of beta releases until we feel > confident to finalize Wicket 1.3. This is called a beta because we don't > have fixed all bugs, and probably haven't found them all either. > > -- Portlet support -- > > A new feature in this beta4 release is the merge of Ate Douma's portlet > branch into trunk. This reintroduces portlet support in Wicket. > > http://cwiki.apache.org/WICKET/portal-howto.html > > -= Migrating from 1.2 =- > > If you are coming from Wicket 1.2, you really want to read our migration > guide, found on the wiki: > > http://cwiki.apache.org/WICKET/migrate-13.html > > -= Downloading the release =- > > You can download the release from the official Apache mirror system, and > you > can find it through the following link: > > http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > For the Maven and Ivy fans out there: update your pom's to the following, > and everything will be downloaded automatically: > > > org.apache.wicket > wicket > 1.3.0-beta4 > > > Substitute the artifact ID with the projects of your liking to get the > other > projects. > > Please note that we don't prescribe a Logging implementation for SLF4J. > You > need to specify yourself which one you prefer. Read more about SLF4J here: > http://slf4j.org > > -= Validating the release =- > > The release has been signed by Frank Bille, your release manager for > today. > The public key can be found in the KEYS file in the download area. > Download > the KEYS file only from the Apache website. > > http://www.apache.org/dist/wicket/1.3.0-beta4/KEYS > > Instructions on how to validate the release can be found here: > > http://www.apache.org/dev/release-signing.html#check-integrity > > -= Reporting bugs =- > > In case you do encounter a bug, we would appreciate a report in our JIRA: > > http://issues.apache.org/jira/browse/WICKET > > -= The distribution =- > > In the distribution you will find a README. The README contains > instructions > on how to build from source yourself and a list of all things that have > been > fixed, added and/or removed since the first beta release. > > > -= Release Notes - Wicket - Version 1.3.0-beta4 =- > > ** Bug > * [WICKET-349] - ListView can't undo changes to model > * [WICKET-470] - AjaxFormComponentUpdatingBehavior won't work for > RadioChoices > * [WICKET-497] - For stateless mounted page incorrect url is generated > * [WICKET-520] - Escape doesn't work for AjaxEditableLabel in Firefox > * [WICKET-572] - replacing tr using ajax does not work in safari > * [WICKET-611] - AbstractRequestTargetUrlCodingStrategy ignores query > parameters if there is no parameter in the path > * [WICKET-631] - Resource.getParameters() empty when resource is > mounted > * [WICKET-635] - FormTester Does Not Properly Handle DropDownChoice > With > Null Model > * [WICKET-640] - modal window close button does not cancel the event > after closing the window > * [WICKET-685] - ReloadingWicketFilter not working with markup > inheritance > * [WICKET-705] - StringValue javadoc incorrect regrading conversion to > checked exception > * [WICKET-707] - Invoking a request listener on a page returns an > Expired Error page > * [WICKET-722] - IndicatingAjaxFallbackLink does not remove indicator > if > the link itself is added via ajax > * [WICKET-728] - WicketTester could not handle Multipart form without > upload > * [WICK
Re: Apache Wicket 1.3.0-beta4 released!
2007/10/11, Frank Bille <[EMAIL PROTECTED]>: > > This is the fourth beta for Apache Wicket we have prepared for your > pleasure. It contains over 120 fixes to issues with previous releases and > todo items we have cleared. > > In this announcement: > > * Apache Wicket > * This release > ** Portlet support > * Migrating from 1.2 > * Downloading the release > * Validating the release > * Reporting bugs > > Eager people click here to download the distribution, others can read > further: > > http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > We thank you for your patience and support. Given the current list of > remaining issues and the fact that we have just accepted portlet support > back in, we think a fifth beta release is necessary. But that is no excuse > for not giving this fourth installment a test drive! > > The Wicket Team > > -= Apache Wicket =- > > Apache Wicket is a component oriented Java web application framework > currently undergoing incubation at the Apache Software foundation. With > proper mark-up/logic separation, a POJO data model, and a refreshing lack > of > XML, Apache Wicket makes developing web-apps simple and enjoyable again. > Swap the boilerplate, complex debugging and brittle code for powerful, > reusable components written with plain Java and HTML. > > Our migration to a top level project is now completed and you can find our > website and documentation here: > > http://wicket.apache.org > > -= This release =- > > This release is the fourth in a series of beta releases until we feel > confident to finalize Wicket 1.3. This is called a beta because we don't > have fixed all bugs, and probably haven't found them all either. > > -- Portlet support -- > > A new feature in this beta4 release is the merge of Ate Douma's portlet > branch into trunk. This reintroduces portlet support in Wicket. > > http://cwiki.apache.org/WICKET/portal-howto.html > > -= Migrating from 1.2 =- > > If you are coming from Wicket 1.2, you really want to read our migration > guide, found on the wiki: > > http://cwiki.apache.org/WICKET/migrate-13.html > > -= Downloading the release =- > > You can download the release from the official Apache mirror system, and > you > can find it through the following link: > > http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > For the Maven and Ivy fans out there: update your pom's to the following, > and everything will be downloaded automatically: > > > org.apache.wicket > wicket > 1.3.0-beta4 > > > Substitute the artifact ID with the projects of your liking to get the > other > projects. > > Please note that we don't prescribe a Logging implementation for SLF4J. > You > need to specify yourself which one you prefer. Read more about SLF4J here: > http://slf4j.org > > -= Validating the release =- > > The release has been signed by Frank Bille, your release manager for > today. > The public key can be found in the KEYS file in the download area. > Download > the KEYS file only from the Apache website. > > http://www.apache.org/dist/wicket/1.3.0-beta4/KEYS > > Instructions on how to validate the release can be found here: > > http://www.apache.org/dev/release-signing.html#check-integrity > > -= Reporting bugs =- > > In case you do encounter a bug, we would appreciate a report in our JIRA: > > http://issues.apache.org/jira/browse/WICKET > > -= The distribution =- > > In the distribution you will find a README. The README contains > instructions > on how to build from source yourself and a list of all things that have > been > fixed, added and/or removed since the first beta release. > > > -= Release Notes - Wicket - Version 1.3.0-beta4 =- > > ** Bug > * [WICKET-349] - ListView can't undo changes to model > * [WICKET-470] - AjaxFormComponentUpdatingBehavior won't work for > RadioChoices > * [WICKET-497] - For stateless mounted page incorrect url is generated > * [WICKET-520] - Escape doesn't work for AjaxEditableLabel in Firefox > * [WICKET-572] - replacing tr using ajax does not work in safari > * [WICKET-611] - AbstractRequestTargetUrlCodingStrategy ignores query > parameters if there is no parameter in the path > * [WICKET-631] - Resource.getParameters() empty when resource is > mounted > * [WICKET-635] - FormTester Does Not Properly Handle DropDownChoice > With > Null Model > * [WICKET-640] - modal window close button does not cancel the event > after closing the window > * [WICKET-685] - ReloadingWicketFilter not working with markup > inheritance > * [WICKET-705] - StringValue javadoc incorrect regrading conversion to > checked exception > * [WICKET-707] - Invoking a request listener on a page returns an > Expired Error page > * [WICKET-722] - IndicatingAjaxFallbackLink does not remove indicator > if > the link itself is added via ajax > * [WICKET-728] - WicketTester could not handle Multipart form without > upload > * [WICKET-735] - SqlTimestampConverter and it
Apache Wicket 1.3.0-beta4 released!
This is the fourth beta for Apache Wicket we have prepared for your pleasure. It contains over 120 fixes to issues with previous releases and todo items we have cleared. In this announcement: * Apache Wicket * This release ** Portlet support * Migrating from 1.2 * Downloading the release * Validating the release * Reporting bugs Eager people click here to download the distribution, others can read further: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ We thank you for your patience and support. Given the current list of remaining issues and the fact that we have just accepted portlet support back in, we think a fifth beta release is necessary. But that is no excuse for not giving this fourth installment a test drive! The Wicket Team -= Apache Wicket =- Apache Wicket is a component oriented Java web application framework currently undergoing incubation at the Apache Software foundation. With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML. Our migration to a top level project is now completed and you can find our website and documentation here: http://wicket.apache.org -= This release =- This release is the fourth in a series of beta releases until we feel confident to finalize Wicket 1.3. This is called a beta because we don't have fixed all bugs, and probably haven't found them all either. -- Portlet support -- A new feature in this beta4 release is the merge of Ate Douma's portlet branch into trunk. This reintroduces portlet support in Wicket. http://cwiki.apache.org/WICKET/portal-howto.html -= Migrating from 1.2 =- If you are coming from Wicket 1.2, you really want to read our migration guide, found on the wiki: http://cwiki.apache.org/WICKET/migrate-13.html -= Downloading the release =- You can download the release from the official Apache mirror system, and you can find it through the following link: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ For the Maven and Ivy fans out there: update your pom's to the following, and everything will be downloaded automatically: org.apache.wicket wicket 1.3.0-beta4 Substitute the artifact ID with the projects of your liking to get the other projects. Please note that we don't prescribe a Logging implementation for SLF4J. You need to specify yourself which one you prefer. Read more about SLF4J here: http://slf4j.org -= Validating the release =- The release has been signed by Frank Bille, your release manager for today. The public key can be found in the KEYS file in the download area. Download the KEYS file only from the Apache website. http://www.apache.org/dist/wicket/1.3.0-beta4/KEYS Instructions on how to validate the release can be found here: http://www.apache.org/dev/release-signing.html#check-integrity -= Reporting bugs =- In case you do encounter a bug, we would appreciate a report in our JIRA: http://issues.apache.org/jira/browse/WICKET -= The distribution =- In the distribution you will find a README. The README contains instructions on how to build from source yourself and a list of all things that have been fixed, added and/or removed since the first beta release. -= Release Notes - Wicket - Version 1.3.0-beta4 =- ** Bug * [WICKET-349] - ListView can't undo changes to model * [WICKET-470] - AjaxFormComponentUpdatingBehavior won't work for RadioChoices * [WICKET-497] - For stateless mounted page incorrect url is generated * [WICKET-520] - Escape doesn't work for AjaxEditableLabel in Firefox * [WICKET-572] - replacing tr using ajax does not work in safari * [WICKET-611] - AbstractRequestTargetUrlCodingStrategy ignores query parameters if there is no parameter in the path * [WICKET-631] - Resource.getParameters() empty when resource is mounted * [WICKET-635] - FormTester Does Not Properly Handle DropDownChoice With Null Model * [WICKET-640] - modal window close button does not cancel the event after closing the window * [WICKET-685] - ReloadingWicketFilter not working with markup inheritance * [WICKET-705] - StringValue javadoc incorrect regrading conversion to checked exception * [WICKET-707] - Invoking a request listener on a page returns an Expired Error page * [WICKET-722] - IndicatingAjaxFallbackLink does not remove indicator if the link itself is added via ajax * [WICKET-728] - WicketTester could not handle Multipart form without upload * [WICKET-735] - SqlTimestampConverter and it's Date and Time friends die on null and other breakage. * [WICKET-745] - AbstractAjaxTimerBehavior triggered more than expected after a new Ajax rendering * [WICKET-756] - FormComponent.getValue uses equals instead of == to compare NO_RAW_INPUT * [WICKET-775] - Buggy behaviour in FormCom
Re: TabbedPanel with image tabs - how to contribute ?
Easy! Go to http://cwiki.apache.org/WICKET/, click on Edit page, get yourself an account. After you've logged in go back to the main page, then find the page called 'Reference Library', with at the bottom 'Wicket Reference'. Find a suitable place there to describe the TabbedPanel. Good work! Erik. Stefan Simik wrote: very good idea :) How can I contribute ? ..or where can I send example with full sources ? -- Erik van Oosten http://2008.rubyenrails.nl/ http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validating a NonZero Values and Validators Project in General
Hi, I am using Apache Wicket 1.3.0-beta2 and want to have a nonzero positive validator, a nonzero negative, and a nonzero positive or negative. I saw that wicket comes with the NumberValidator.minimum maximun etc. Will there be more validators added to the framework? Is there a stuff project or smaller project in which to contribute? Could I have these validators without implementing my own? f(t)
ModalWindow bug in IE6?
Hello again, I am having a problem with fields not being editable after I close a ModalWindow. I pared the problem down to the bare minimum, and created a JIRA issue with a quickstart: https://issues.apache.org/jira/browse/WICKET-1061 Please let me know if any more info is needed. Thanks, Russell Morrisey Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
Re: DataTable FilterToolbar Shifted After AJAX Call
Oh, well that's good to hear. My team and I are using the last major release, beta 3. I will see if a more recent build fixes the problem and add a Jira ticket if it doesn't. Are nightly stable builds available anywhere? -Brandon Evan Chooly wrote: > > What version of wicket are you using? I saw this with beta3 but later > snapshots fixed it for me. So if you're not on a recent snapshot, you > might > consider trying that and seeing if that helps. > > On 10/10/07, UPBrandon <[EMAIL PROTECTED]> wrote: >> >> >> I am working on a project that has a DataTable with a filter that uses >> AJAX >> to update an object on the backend and refresh the table, among other >> things. Everything is working well so far except the columns in the >> filter >> toolbar row are shifted one column to the right after the AJAX refresh. >> Using Firebug to inspect the toolbar row after the update, I see that >> everything is shifted one to the right because Wicket is inserting a >> >> in the before the 's. So instead of >> >> >> ... >> ... >> >> >> I have >> >> >> >> ... >> ... >> >> >> The contents of the are: >> >> > value="" wicket:id="focus-tracker" >> >> name="checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker" >> >> id="queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker"/> >> >> If it makes any difference, when I do the update, I am not updating the >> DataTable directly - I am updating a higher level Panel that contains the >> DataTable. Has anyone else had any similar problems? >> >> -Brandon >> -- >> View this message in context: >> http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13160984 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataTable FilterToolbar Shifted After AJAX Call
What version of wicket are you using? I saw this with beta3 but later snapshots fixed it for me. So if you're not on a recent snapshot, you might consider trying that and seeing if that helps. On 10/10/07, UPBrandon <[EMAIL PROTECTED]> wrote: > > > I am working on a project that has a DataTable with a filter that uses > AJAX > to update an object on the backend and refresh the table, among other > things. Everything is working well so far except the columns in the > filter > toolbar row are shifted one column to the right after the AJAX refresh. > Using Firebug to inspect the toolbar row after the update, I see that > everything is shifted one to the right because Wicket is inserting a > in the before the 's. So instead of > > > ... > ... > > > I have > > > > ... > ... > > > The contents of the are: > > value="" wicket:id="focus-tracker" > > name="checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker" > > id="queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker"/> > > If it makes any difference, when I do the update, I am not updating the > DataTable directly - I am updating a higher level Panel that contains the > DataTable. Has anyone else had any similar problems? > > -Brandon > -- > View this message in context: > http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Model update with Link
setdefaultformprocessing(false) -igor On 10/11/07, Mattijs Hoitink <[EMAIL PROTECTED]> wrote: > > I already tried using a SubmitLink. The problem with that is user have > to complete the whole form (or at least the required fields) before they > can disable the field with the link. This is because validate() is > called when the form is submitted, and users receive a message they have > to fill in the required fields.I want users to be able to disable the > field even though they did not fill in all the (required) fields. > > Secondly, when the form is submitted, the model is send to the database. > I only want to send the model to the database when the user is > completely finished with the form, and not when they want to disabled > the second field of the form. But this can be solved by calling > findSubmittingButton() in the onSubmit(). > > > martinf wrote: > > Maybe SubmitLink is your solution, > > > > usage as an anonymous class could look like this: > > > > add(new SubmitLink("lkjsdf", form) { > > public void onSubmit() { > >//Do what you need to do here. > > } > > }); > > > > that way the browser will submit the form and send al the date in the > input > > fields. > > > > > > Martin > > > > > > Mattijs Hoitink wrote: > > > >> hi, > >> > >> i'm just starting to use wicket and i have a question regarding > updating > >> a model when a link is pressed. I will explain my situation. > >> > >> I have a normal form, with a model attached to it and a button to > submit > >> it. There is also a link in the form who's only purpose is to enable or > >> disable a field. > >> The problem is, when i press the link to disable the field, all my > data > >> from the other fields is lost. It seems like wicket is loading a new > >> form when i presse the link, because all the old data from the model is > >> presented. > >> > >> My question is: is it normal wicket loads the page again when a link is > >> pressed? and if so, is there a way to update my model first? > >> > >> -- > >> Mattijs Hoitink > >> Func. Internet Integration > >> W http://www.func.nl > >> T +31 20 423 > >> F +31 20 4223500 > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > > > > -- > Mattijs Hoitink > Func. Internet Integration > W http://www.func.nl > T +31 20 423 > F +31 20 4223500 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Page expired upon file download + model update
Hi everyone! I have a form with some fields and a submit button which says "Save and print". The button has setDefaultFormProcessing(false), and overrides onSubmit so that the form model object is sent to the persistence layer and printed immediately afterwards. The persistence layer *may* alter the object, so I have to reload it. My problem is that this reloading causes a "page expired" when I press the button for a second time. My onSubmit: if(getForm().process()){ MyBean data=getForm().getModelObject(); data=Persistence.save(data); // Create PDF and send it to the browser IResourceStream s = new ByteArrayResource("application/pdf", buildPDF(data)).getResourceStream(); RequestCycle.get().setRequestTarget( new ResourceStreamRequestTarget(s) ); getForm().setModelObject(data); } I think the page expires because sending the PDF to the browser "blocks" the request cycle, so the browser never renders the new version of the page.. Is there a way to do this? Am I doing Something Wrong? ^__^; Many thanks for your time! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoCompleteTextfield - how to populate two input fields
Hi, thanks for your answer. No, solution didn't work as supposed, mainly because the AutoComplete fills the input field in the browser with the data (in my case either zipcode or city), but doesn't update the model. To update the model I have to attach some Ajax...Behavior, but this is called with the data put into the textfield (i.e. either the selected zipcode put into the zipcode field by the autocomplete, *or* the selected city from the city field). In the Ajax...Behavior's onUpdate()-method neither the city nor the zipcode are enough to determine the value to use to update the related field. So I had two other ideas: 1. in my autocomplete-list I set the "textvalue" to the id of a "zipcode-city" combination. When the user selects from the autocomplete-list, this id is written into the corresponding input-field. The attached AjaxOnChangeBehavior now gets this id, determines the zipcode-city, and updates the city and the zipcode field. This works, but looks a little strange to the user (e.g. selection of "71254 Ditzingen" from autocomplete-list writes the id ("1223") into the zipcode-field, this issues the Ajax-call, which updates both fields with the correct data, i.e. zipcode=71254, city=Ditzingen). As I said, works but not pretty. 2. So I'm currently extended the AutoCompleteTextField, ...Renderer, ...Behavior, ..JavaScript to accept a second, "related" field in its constructor. I then attach two attributes to the autocomplete-list entries (say textvalue and textvalue2), and modified the JavaScript to update both fields. This seems to me the best approach to my specific problem, and seems to work as intended. Hope my answer was not to confusing... regards, Oliver German Morales wrote: > > Hi, > > Sorry, i'm a little late with my response. > Did the suggestion by Nino work? > > If it works, i would like to know more details about it. > > If not, we already had a somehow similar problem (Swiss addresses), and we > have a different solution already working. Perhaps it can help you too. > > Regards, > > German > > > It seems that Nino Saturnino Martinez Vazquez Wael wrote: >> NP, waiting with excitement to hear if it works:) >> >> Oliver Lieven wrote: >>> Thanks allot for your efforts and detailed answer! Sounds good, I'll >>> give it >>> a try. >>> >>> >>> Nino.Martinez wrote: >>> No what I meant was that when a user selects something in one of your auto complete fields they'll automatickly select something in both, might have been a little scares on information: IModel commonModel=new Model(); AbstractModel() Text=new AbstractModel(){ getObject{ return commonModel.getObject.Text; } setObject(obj){ commonModel.setObject(obj) } } AbstractModel() name=new AbstractModel(){ getObject{ return commonModel.getObject.name; } setObject(obj){ commonModel.setObject(obj) } } AutoCompleteTextField phoneName = new AutoCompleteTextField( "phoneName", name, new BestEffortRendererAutoCompleteRenderer()) { @Override protected Iterator getChoices(String input) { return findItems(input); } }; AutoCompleteTextField phoneSeries = new AutoCompleteTextField( "phoneName", text, new BestEffortRendererAutoCompleteRenderer()) { @Override protected Iterator getChoices(String input) { return findItems(input); } }; And ofcourse you need to add the other completefield to the ajaxresponse... Hope this pseudo code works a little better... Was on my way out the door before... Oliver Lieven wrote: > Hi Nino, > thanks for your fast reply. Yes, a shared PropertyModel would help to > keep > both fields synchronized. > > I still can't see how this could help me to determine the value > selected > by > the user. > The AutoComplete works like > > 1. getChoices() is called to populate the autocomplete list with my > "zipcode > - city" options > 2. when user selects a value from the autocomplete list, the > corresponding > field is set with the "textvalue" (e.g. the 'city' field is filled > with > the > city's name) > 3. because of this update, the city-field's > AjaxFormComponentUpdatingBehavior.onUpdate() is called > 4. in onUpdate() the getConvertedInput() method returns the city name, > which > is insufficient to determine the corresponding zipcode (because of the > n:1 > relation (city may have many zipcodes)). > > So I'm still looking for a way to determine the exact combination > selected > by the u
Re: Model update with Link
I already tried using a SubmitLink. The problem with that is user have to complete the whole form (or at least the required fields) before they can disable the field with the link. This is because validate() is called when the form is submitted, and users receive a message they have to fill in the required fields.I want users to be able to disable the field even though they did not fill in all the (required) fields. Secondly, when the form is submitted, the model is send to the database. I only want to send the model to the database when the user is completely finished with the form, and not when they want to disabled the second field of the form. But this can be solved by calling findSubmittingButton() in the onSubmit(). martinf wrote: Maybe SubmitLink is your solution, usage as an anonymous class could look like this: add(new SubmitLink("lkjsdf", form) { public void onSubmit() { //Do what you need to do here. } }); that way the browser will submit the form and send al the date in the input fields. Martin Mattijs Hoitink wrote: hi, i'm just starting to use wicket and i have a question regarding updating a model when a link is pressed. I will explain my situation. I have a normal form, with a model attached to it and a button to submit it. There is also a link in the form who's only purpose is to enable or disable a field. The problem is, when i press the link to disable the field, all my data from the other fields is lost. It seems like wicket is loading a new form when i presse the link, because all the old data from the model is presented. My question is: is it normal wicket loads the page again when a link is pressed? and if so, is there a way to update my model first? -- Mattijs Hoitink Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mattijs Hoitink Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model update with Link
Maybe SubmitLink is your solution, usage as an anonymous class could look like this: add(new SubmitLink("lkjsdf", form) { public void onSubmit() { //Do what you need to do here. } }); that way the browser will submit the form and send al the date in the input fields. Martin Mattijs Hoitink wrote: > > hi, > > i'm just starting to use wicket and i have a question regarding updating > a model when a link is pressed. I will explain my situation. > > I have a normal form, with a model attached to it and a button to submit > it. There is also a link in the form who's only purpose is to enable or > disable a field. > The problem is, when i press the link to disable the field, all my data > from the other fields is lost. It seems like wicket is loading a new > form when i presse the link, because all the old data from the model is > presented. > > My question is: is it normal wicket loads the page again when a link is > pressed? and if so, is there a way to update my model first? > > -- > Mattijs Hoitink > Func. Internet Integration > W http://www.func.nl > T +31 20 423 > F +31 20 4223500 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Model-update-with-Link-tf4607178.html#a13155954 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Model update with Link
>> My question is: is it normal wicket loads the page again when a link is pressed? - Yes - It renders the page after finishing ur onclick >> and if so, is there a way to update my model first? Use submitlink instead of Link if u want to show the new values -swaroop On 10/11/07, Mattijs Hoitink <[EMAIL PROTECTED]> wrote: > > hi, > > i'm just starting to use wicket and i have a question regarding updating > a model when a link is pressed. I will explain my situation. > > I have a normal form, with a model attached to it and a button to submit > it. There is also a link in the form who's only purpose is to enable or > disable a field. > The problem is, when i press the link to disable the field, all my data > from the other fields is lost. It seems like wicket is loading a new > form when i presse the link, because all the old data from the model is > presented. > > My question is: is it normal wicket loads the page again when a link is > pressed? and if so, is there a way to update my model first? > > -- > Mattijs Hoitink > Func. Internet Integration > W http://www.func.nl > T +31 20 423 > F +31 20 4223500 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Model update with Link
hi, i'm just starting to use wicket and i have a question regarding updating a model when a link is pressed. I will explain my situation. I have a normal form, with a model attached to it and a button to submit it. There is also a link in the form who's only purpose is to enable or disable a field. The problem is, when i press the link to disable the field, all my data from the other fields is lost. It seems like wicket is loading a new form when i presse the link, because all the old data from the model is presented. My question is: is it normal wicket loads the page again when a link is pressed? and if so, is there a way to update my model first? -- Mattijs Hoitink Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoCompleteTextfield - how to populate two input fields
Hi, Sorry, i'm a little late with my response. Did the suggestion by Nino work? If it works, i would like to know more details about it. If not, we already had a somehow similar problem (Swiss addresses), and we have a different solution already working. Perhaps it can help you too. Regards, German It seems that Nino Saturnino Martinez Vazquez Wael wrote: > NP, waiting with excitement to hear if it works:) > > Oliver Lieven wrote: >> Thanks allot for your efforts and detailed answer! Sounds good, I'll >> give it >> a try. >> >> >> Nino.Martinez wrote: >> >>> No what I meant was that when a user selects something in one of your >>> auto complete fields they'll automatickly select something in both, >>> might have been a little scares on information: >>> >>> IModel commonModel=new Model(); >>> >>> >>> AbstractModel() Text=new AbstractModel(){ >>> >>> getObject{ >>> return commonModel.getObject.Text; >>> } >>> setObject(obj){ >>> commonModel.setObject(obj) >>> } >>> >>> } >>> >>> >>> AbstractModel() name=new AbstractModel(){ >>> >>> getObject{ >>> return commonModel.getObject.name; >>> } >>> setObject(obj){ >>> commonModel.setObject(obj) >>> } >>> >>> } >>> >>> >>> >>> AutoCompleteTextField phoneName = new AutoCompleteTextField( >>> "phoneName", name, >>> new BestEffortRendererAutoCompleteRenderer()) { >>> @Override >>> protected Iterator getChoices(String input) { >>> >>> return findItems(input); >>> } >>> }; >>> >>> >>> AutoCompleteTextField phoneSeries = new AutoCompleteTextField( >>> "phoneName", text, >>> new BestEffortRendererAutoCompleteRenderer()) { >>> @Override >>> protected Iterator getChoices(String input) { >>> >>> return findItems(input); >>> } >>> }; >>> >>> And ofcourse you need to add the other completefield to the >>> ajaxresponse... >>> >>> Hope this pseudo code works a little better... Was on my way out the >>> door before... >>> >>> >>> Oliver Lieven wrote: >>> Hi Nino, thanks for your fast reply. Yes, a shared PropertyModel would help to keep both fields synchronized. I still can't see how this could help me to determine the value selected by the user. The AutoComplete works like 1. getChoices() is called to populate the autocomplete list with my "zipcode - city" options 2. when user selects a value from the autocomplete list, the corresponding field is set with the "textvalue" (e.g. the 'city' field is filled with the city's name) 3. because of this update, the city-field's AjaxFormComponentUpdatingBehavior.onUpdate() is called 4. in onUpdate() the getConvertedInput() method returns the city name, which is insufficient to determine the corresponding zipcode (because of the n:1 relation (city may have many zipcodes)). So I'm still looking for a way to determine the exact combination selected by the user... regards, Oliver Nino.Martinez wrote: > Quick answer, why not use property models and use both in the fiields > you mention? > > Oliver Lieven wrote: > > >> Hi, >> >> in an address edit panel I've got the two AutoCompleteText fields >> 'zipcode' >> and 'city'. >> >> When a users begins typing into the zipcode-field, the autocomplete >> shows >> up >> and offers valid "zipcode - city" combinations. After selecting a >> value >> from >> the autocomplete the 'zipcode' is set. Same for 'city' field, i.e. >> after >> selecting a "zipcode - city" from the city's autocomplete the >> "city"-field >> is set accordingly. >> (Thanks for the great autocomplete-support in Wicket which allows >> separation >> of displayvalue and textvalue!) >> >> Now to my question: after selection of a "zipcode - city" >> combination >> from >> either autocomplete list I would like to set both fields (zipcode >> and >> city). >> I already attached an AjaxFormComponentUpdatingBehavior which gets >> called >> after a selection in the autocomplete list, but it just gets the >> zipcode/city currently set. >> Since the zipcode-city relation is 1:n (e.g. Berlin has many >> zipcodes) >> I'm >> wondering if there is a way to access the full selected value (and >> not >> only >> the AbstractAutoCompleteTextRenderer.textvalue set). >> >> >> Thanks for any help and tips! >> Oliver >> >> >> >> >> > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >>> --
Re: Stateless page creating session
OK Cool. I guess I can just comment out session binding until this is fixed because for the next couple of weeks all of my pages are stateless. On 11 Oct 2007, at 00:57, Matej Knopp wrote: Yeah, it's a bug introduced by me recently. Will look at it ASAP. -Matej On 10/11/07, John Patterson <[EMAIL PROTECTED]> wrote: Also, the example application "stateless" is doing the same. When I go to this page http://localhost:8080/wicket-examples/stateless/public/Index/ after restarting my browser I get this a session exists for this client, with session id z4zov2z9j024 go to another stateless page go to a stateful page (triggers session creation if not already done so) Something is going on here. On 10 Oct 2007, at 18:24, John Patterson wrote: Hi, I have created a page and setStatelessHint(true) and made sure all the child components are stateless but an http session is still being created. The method isPageStateless() returns true. Here is the trace where the SEssion is created: com.citikey.site.SessionListener.sessionCreated (SessionListener.java:29) at org.mortbay.jetty.servlet.AbstractSessionManager.addSession (AbstractSessionManager.java:569) at org.mortbay.jetty.servlet.AbstractSessionManager.newHttpSession (AbstractSessionManager.java:414) at org.mortbay.jetty.Request.getSession(Request.java:1005) at org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionI d( AbstractHttpSessionStore.java:188) at org.apache.wicket.Session.bind(Session.java:415) at org.apache.wicket.Component.beforeRender(Component.java: 855) This code in Component.beforeRenderlooks suspicious: // If any of the components on page is not stateless, we need to bind the session // before we start rendering components, as then jsessionid won't be appended // for links rendered before first stateful component if (isStateless() && getSession().isTemporary()) { getSession().bind(); } Cheers, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scrolling browser to newly visible panel?
Thanks, I've gone with target.appendJavascript( "document.getElementById('" + form.getMarkupId() + "').scrollIntoView(false);" ); in the onClick(), which seems to do just what I need. /Gwyn On Wednesday, October 10, 2007, 9:18:58 PM, Gerolf <[EMAIL PROTECTED]> wrote: > i found two possibilities to do this (although i haven't tried it with wicket ajax): var el = document.getElementById('panelInsertedViaAjax'); 1) document.getElementsByTagName('body')[0].scrollTop = el.offsetTop + el.offsetHeight; 2) el.scrollIntoView(false); // false to position it to the bottom of the page // true for the top Gerolf On 10/10/07, Gwyn Evans <[EMAIL PROTECTED]> wrote: Just wondering if there was anything that might help with the following? In a web page design I've been given, I may need to display an 'options' form to get additional input. I'm doing this with Ajax, but the problem is that it typically appears off the bottom of the existing page - is there a good way of triggering the browser to do something like scroll down, ideally to the bottom of the new form? -- Best regards, Gwyn mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.3 - JVM 1.4
Indeed, wasp and swarm are compiled against jdk 1.4. However, as much i like you to use swarm, swarm is not a drop in replacement for auth-roles. So you might want to consider the pro's and con's before you do that. More info about swarm can be found here http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm http://wicketstuff.org/confluence/display/STUFFWIKI/Security+Framework+Comparison If you have any questions after reading those i will be happy to help you. Maurice On 10/10/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > I doubt the jar will run with jdk 1.4 -> it is compiled using jdk 1.5, > so the version will be not compatible. > > However, the auth-roles project is typically a really, really basic > security package. If you want more, then I suggest you look at > swarm/wasp from wicket stuff. This has the additional benefit that > they are jdk 1.4 all the way (iirc). > > Martijn > > On 10/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > not sure, as long as you dont need the annotation part of it should be fine > > > > -igor > > > > > > On 10/10/07, Juan Gabriel Arias <[EMAIL PROTECTED]> wrote: > > > Thanks for the quick answer! > > > > > > And what about wicket-auth-roles? > > > We are using auth-roles 1.2.2 compliant with Java 1.4 and we get that from > > > the users list. > > > > > > Thanks again! > > > Juan > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.0-beta3 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataTable FilterToolbar Shifted After AJAX Call
That's a problem of DataTable producing invalid markup, that the browser is not able to replaced by ajax call (but it is able to process it on regular request). I'm afraid there is no solution currently for your problem. Please add a JIRA entry, possibly with a quickstart to reproduce the problem. -Matej On 10/10/07, UPBrandon <[EMAIL PROTECTED]> wrote: > > I am working on a project that has a DataTable with a filter that uses AJAX > to update an object on the backend and refresh the table, among other > things. Everything is working well so far except the columns in the filter > toolbar row are shifted one column to the right after the AJAX refresh. > Using Firebug to inspect the toolbar row after the update, I see that > everything is shifted one to the right because Wicket is inserting a > in the before the 's. So instead of > > > ... > ... > > > I have > > > > ... > ... > > > The contents of the are: > > value="" wicket:id="focus-tracker" > name="checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker" > id="queueDetailsPanel:checkForm:checkGroup:equipmentDataTable:topToolbars:2:toolbar:filter-form:focus-tracker"/> > > If it makes any difference, when I do the update, I am not updating the > DataTable directly - I am updating a higher level Panel that contains the > DataTable. Has anyone else had any similar problems? > > -Brandon > -- > View this message in context: > http://www.nabble.com/DataTable-FilterToolbar-Shifted-After-AJAX-Call-tf4601906.html#a13139327 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]