Re: [Wicket-user] Nested Forms and onSubmit()?
Ok, but how does one do labels properly like this (i.e. with a for attribute). A reminder of what this thread was about ... I'm reusing a custom PostalAddressFieldsetPanel component twice in a form so eventual markup sent to browser should look something like this: fieldset legendDelivery address/legend label for=deliveryAddress_streetStreet/label input type=text id=deliveryAddress_street ... / ... /fieldset fieldset legendInvoice address/legend label for=invoiceAddress_streetStreet/label input type=text id=invoiceAddress_street ... / ... /fieldset If I delegate to the framework to create the unique 'id' attributes for the input tags as explained below, how do I make sure the 'for' attributes of their labels have the same values. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Mon 4/30/2007 4:26 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, but name != id in xhtml and the value of xhtml id attributes on the page must be unique or it isn't valid. Do I need to ensure that any custom components do not include an xhtml id attribute? Yes you do, but you can let Wicket generate the id's for you with setOutputMarkupId(true). Wicket will take care of making them unique in your page. Martijn -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails.winmail.dat- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Nested Forms and onSubmit()?
It does! Thanks -Original Message- From: [EMAIL PROTECTED] on behalf of Gerolf Seitz Sent: Sat 5/5/2007 4:28 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? you may want to take a look at the class FormComponentLabel it should do the trick On 5/5/07, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, but how does one do labels properly like this (i.e. with a for attribute). A reminder of what this thread was about ... I'm reusing a custom PostalAddressFieldsetPanel component twice in a form so eventual markup sent to browser should look something like this: fieldset legendDelivery address/legend label for=deliveryAddress_streetStreet/label input type=text id=deliveryAddress_street ... / ... /fieldset fieldset legendInvoice address/legend label for=invoiceAddress_streetStreet/label input type=text id=invoiceAddress_street ... / ... /fieldset If I delegate to the framework to create the unique 'id' attributes for the input tags as explained below, how do I make sure the 'for' attributes of their labels have the same values. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Mon 4/30/2007 4:26 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, but name != id in xhtml and the value of xhtml id attributes on the page must be unique or it isn't valid. Do I need to ensure that any custom components do not include an xhtml id attribute? Yes you do, but you can let Wicket generate the id's for you with setOutputMarkupId(true). Wicket will take care of making them unique in your page. Martijn -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net : ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent
Re: [Wicket-user] Nested Forms and onSubmit()?
imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. Thanks, that's how I was thinking it should be a Fieldset so to speak. Have progressed a bit down that route but still have a couple of related questions. Am new to Wicket and trying to learn how to do forms (binding and validation) the Wicket way. Here's where I'm at so far with a simplistic example I'm using (abbreviated syntax for clarity): PurchaseOrder { String customerName PostalAddress deliveryAddress PostalAddress invoiceAddress } PostalAddress { String addressLine String municipality String postalCode String country } PurchaseOrderForm extends Form { public PurchaseOrderForm(String name) { super(name, new CompoundPropertyModel(new PurchaseOrder())); add(new RequiredTextField(customerName)); add(new PostalAddressFieldset(deliveryAddress, new PostalAddress())); // ??? add(new PostalAddressFieldset(invoiceAddress, new PostalAddress())); // ??? ) } PostalAddressFieldset extends Panel { public PostalAddressFieldset(String id, PostalAddress postalAddress) // ??? { super(id, new CompoundPropertyModel(postalAddress)); // ??? add(new RequiredTextField(addressLine)); add(new RequiredTextField(municipality)); add(new RequiredTextField(postalCode)); add(new RequiredTextField(country)); } Bit I'm not sure about is how to wire up the binding of the nested model object (PostalAddress) to the nested Fieldset (PostalAddressFieldset), see question marks in comments above. Have done it like this so far to get it to compile but it is obviously wrong as I'm interested in the nested PostalAddress objects, not new ones. Second question is whether Wicket provides support for creating unique id's for elements. My html for the PostalAddressFieldset includes things like: input wicket:id=addressLine id=addressLine type=text size=40/ Obviously this is no good as when I use this component multiple times on a form, I end up with multiple fields with the same id. Any advice on best practice or pointers to examples that demonstrate these techniques would be appreciated. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Igor Vaynberg Sent: Sun 4/29/2007 8:19 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. -igor On 4/29/07, Martijn Dashorst [EMAIL PROTECTED] wrote: One note: this is a 1.3 feature so only expect it to work there. What happens with the nested forms is that the buttons stay, and iirc only the inner form is submitted when a button is pressed inside that inner form. I think the discussion never got to a conclusion on what happens when the outer form is submitted. I think we can still change that behavior (we're not final or in release candidate mode). FormComponent is for input controls (textfields, buttons, dropdownchoice, etc). Forms are for the form tag. So in your case, you should extend Form, and Wicket should take care of processing the right form (inner, outer, sibling) for you. But as I said, it probably is still a bit raw currently, as it is a new feature and not widely used. Martijn On 4/29/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Wicket supports nested forms. The inner form tags are replaced with span elements. This is a component framework, where you expect forms to be able to be nested (form on a reusable panel anyone?). I'm just starting to work on a similar thing: an address form panel to be used in other forms. Had assumed I should be extending FormComponent rather than Form itself. Are you suggesting otherwise? Or does the nested form's submit button get removed too? Is there an example of this kind of thing? I couldn't find one. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/27/2007 2:37 PM To: wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? On 4/27/07, jan_bar [EMAIL PROTECTED] wrote: I think that you cannot nest form in HTML. You have to nest them with CSS. This will also solve your trouble with form submits - I think that the browser simply ignores the nested form tags.
Re: [Wicket-user] Nested Forms and onSubmit()?
Nice, I thought this should be easy - and it is! Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Mon 4/30/2007 2:01 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? As for your first question, I think the following is a better approach: public AddressFieldsetPanel(String id, IModel address) { super(id, new CompoundPropertyModel(address)); } and : form.add(new AddressFieldsetPanel(billing, new PropertyModel(form.getModel(), billing; form.add(new AddressFieldsetPanel(shipping, new PropertyModel(form.getModel(), shipping; then the wiring of the addresses can be done in the model object itself: Invoice invoice = new Invoice(); invoice.setBilling(new Address()); invoice.setShipping(new Address()); Martijn On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. Thanks, that's how I was thinking it should be a Fieldset so to speak. Have progressed a bit down that route but still have a couple of related questions. Am new to Wicket and trying to learn how to do forms (binding and validation) the Wicket way. Here's where I'm at so far with a simplistic example I'm using (abbreviated syntax for clarity): PurchaseOrder { String customerName PostalAddress deliveryAddress PostalAddress invoiceAddress } PostalAddress { String addressLine String municipality String postalCode String country } PurchaseOrderForm extends Form { public PurchaseOrderForm(String name) { super(name, new CompoundPropertyModel(new PurchaseOrder())); add(new RequiredTextField(customerName)); add(new PostalAddressFieldset(deliveryAddress, new PostalAddress())); // ??? add(new PostalAddressFieldset(invoiceAddress, new PostalAddress())); // ??? ) } PostalAddressFieldset extends Panel { public PostalAddressFieldset(String id, PostalAddress postalAddress) // ??? { super(id, new CompoundPropertyModel(postalAddress)); // ??? add(new RequiredTextField(addressLine)); add(new RequiredTextField(municipality)); add(new RequiredTextField(postalCode)); add(new RequiredTextField(country)); } Bit I'm not sure about is how to wire up the binding of the nested model object (PostalAddress) to the nested Fieldset (PostalAddressFieldset), see question marks in comments above. Have done it like this so far to get it to compile but it is obviously wrong as I'm interested in the nested PostalAddress objects, not new ones. Second question is whether Wicket provides support for creating unique id's for elements. My html for the PostalAddressFieldset includes things like: input wicket:id=addressLine id=addressLine type=text size=40/ Obviously this is no good as when I use this component multiple times on a form, I end up with multiple fields with the same id. Any advice on best practice or pointers to examples that demonstrate these techniques would be appreciated. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Igor Vaynberg Sent: Sun 4/29/2007 8:19 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. -igor On 4/29/07, Martijn Dashorst [EMAIL PROTECTED] wrote: One note: this is a 1.3 feature so only expect it to work there. What happens with the nested forms is that the buttons stay, and iirc only the inner form is submitted when a button is pressed inside that inner form. I think the discussion never got to a conclusion on what happens when the outer form is submitted. I think we can still change that behavior (we're not final or in release candidate mode). FormComponent is for input controls (textfields, buttons, dropdownchoice, etc). Forms are for the form tag. So in your case, you should extend Form, and Wicket should take care of processing the right form (inner, outer, sibling) for you. But as I said, it probably is still a bit raw currently, as it is a new feature and not widely used. Martijn On 4/29/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Wicket supports nested forms. The inner form tags are replaced with span elements. This is a component framework, where you expect forms to be able to be nested (form on a reusable panel anyone?). I'm just starting to work on a similar thing: an address form panel to be used in other forms.
Re: [Wicket-user] Nested Forms and onSubmit()?
Ok, but name != id in xhtml and the value of xhtml id attributes on the page must be unique or it isn't valid. Do I need to ensure that any custom components do not include an xhtml id attribute? Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Mon 4/30/2007 1:56 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Second question is whether Wicket provides support for creating unique id's for elements. My html for the PostalAddressFieldset includes things like: input wicket:id=addressLine id=addressLine type=text size=40/ Obviously this is no good as when I use this component multiple times on a form, I end up with multiple fields with the same id. Wicket will create unique id's (names) for the form components automatically, as the panel is a differentiating factor here: it takes into account the fact that you have the fields on a panel (the wonders of a true component oriented framework). Martijn -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails.winmail.dat- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] from 1.2.6 to 1.3.0 snapshot
Ta, I've just upgraded and prefixed all wicket imports with org.apache. Only problemo seems to be that wicket.extensions.markup.html.datepicker.DatePicker has disappeared. Any idea where it went? Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Matej Knopp Sent: Mon 4/30/2007 2:10 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? hi, i just want to mentioned that there were a nasty bug in 1.3 nested form processing that was fixed today, so if you have any issues with it i suggest you upgrading wicket to see if it helps. -Matej On 4/30/07, Martijn Dashorst [EMAIL PROTECTED] wrote: As for your first question, I think the following is a better approach: public AddressFieldsetPanel(String id, IModel address) { super(id, new CompoundPropertyModel(address)); } and : form.add(new AddressFieldsetPanel(billing, new PropertyModel(form.getModel(), billing; form.add(new AddressFieldsetPanel(shipping, new PropertyModel(form.getModel(), shipping; then the wiring of the addresses can be done in the model object itself: Invoice invoice = new Invoice(); invoice.setBilling(new Address()); invoice.setShipping(new Address()); Martijn On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. Thanks, that's how I was thinking it should be a Fieldset so to speak. Have progressed a bit down that route but still have a couple of related questions. Am new to Wicket and trying to learn how to do forms (binding and validation) the Wicket way. Here's where I'm at so far with a simplistic example I'm using (abbreviated syntax for clarity): PurchaseOrder { String customerName PostalAddress deliveryAddress PostalAddress invoiceAddress } PostalAddress { String addressLine String municipality String postalCode String country } PurchaseOrderForm extends Form { public PurchaseOrderForm(String name) { super(name, new CompoundPropertyModel(new PurchaseOrder())); add(new RequiredTextField(customerName)); add(new PostalAddressFieldset(deliveryAddress, new PostalAddress())); // ??? add(new PostalAddressFieldset(invoiceAddress, new PostalAddress())); // ??? ) } PostalAddressFieldset extends Panel { public PostalAddressFieldset(String id, PostalAddress postalAddress) // ??? { super(id, new CompoundPropertyModel(postalAddress)); // ??? add(new RequiredTextField(addressLine)); add(new RequiredTextField(municipality)); add(new RequiredTextField(postalCode)); add(new RequiredTextField(country)); } Bit I'm not sure about is how to wire up the binding of the nested model object (PostalAddress) to the nested Fieldset (PostalAddressFieldset), see question marks in comments above. Have done it like this so far to get it to compile but it is obviously wrong as I'm interested in the nested PostalAddress objects, not new ones. Second question is whether Wicket provides support for creating unique id's for elements. My html for the PostalAddressFieldset includes things like: input wicket:id=addressLine id=addressLine type=text size=40/ Obviously this is no good as when I use this component multiple times on a form, I end up with multiple fields with the same id. Any advice on best practice or pointers to examples that demonstrate these techniques would be appreciated. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Igor Vaynberg Sent: Sun 4/29/2007 8:19 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. -igor On 4/29/07, Martijn Dashorst [EMAIL PROTECTED] wrote: One note: this is a 1.3 feature so only expect it to work there. What happens with the nested forms is that the buttons stay, and iirc only the inner form is submitted when a button is pressed inside that inner form. I think the discussion never got to a conclusion on what happens when the outer form is submitted. I think we can still change that behavior (we're not final or in release candidate mode). FormComponent is for input controls (textfields, buttons, dropdownchoice, etc). Forms are for the form tag. So in your case, you should extend Form, and Wicket should take care of processing the right form (inner, outer, sibling) for you. But as I said, it probably is
Re: [Wicket-user] from 1.2.6 to 1.3.0 snapshot
ok, found it: http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-datepicker -Original Message- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Mon 4/30/2007 3:52 PM To: wicket-user@lists.sourceforge.net Subject: from 1.2.6 to 1.3.0 snapshot Ta, I've just upgraded and prefixed all wicket imports with org.apache. Only problemo seems to be that wicket.extensions.markup.html.datepicker.DatePicker has disappeared. Any idea where it went? Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Matej Knopp Sent: Mon 4/30/2007 2:10 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? hi, i just want to mentioned that there were a nasty bug in 1.3 nested form processing that was fixed today, so if you have any issues with it i suggest you upgrading wicket to see if it helps. -Matej On 4/30/07, Martijn Dashorst [EMAIL PROTECTED] wrote: As for your first question, I think the following is a better approach: public AddressFieldsetPanel(String id, IModel address) { super(id, new CompoundPropertyModel(address)); } and : form.add(new AddressFieldsetPanel(billing, new PropertyModel(form.getModel(), billing; form.add(new AddressFieldsetPanel(shipping, new PropertyModel(form.getModel(), shipping; then the wiring of the addresses can be done in the model object itself: Invoice invoice = new Invoice(); invoice.setBilling(new Address()); invoice.setShipping(new Address()); Martijn On 4/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. Thanks, that's how I was thinking it should be a Fieldset so to speak. Have progressed a bit down that route but still have a couple of related questions. Am new to Wicket and trying to learn how to do forms (binding and validation) the Wicket way. Here's where I'm at so far with a simplistic example I'm using (abbreviated syntax for clarity): PurchaseOrder { String customerName PostalAddress deliveryAddress PostalAddress invoiceAddress } PostalAddress { String addressLine String municipality String postalCode String country } PurchaseOrderForm extends Form { public PurchaseOrderForm(String name) { super(name, new CompoundPropertyModel(new PurchaseOrder())); add(new RequiredTextField(customerName)); add(new PostalAddressFieldset(deliveryAddress, new PostalAddress())); // ??? add(new PostalAddressFieldset(invoiceAddress, new PostalAddress())); // ??? ) } PostalAddressFieldset extends Panel { public PostalAddressFieldset(String id, PostalAddress postalAddress) // ??? { super(id, new CompoundPropertyModel(postalAddress)); // ??? add(new RequiredTextField(addressLine)); add(new RequiredTextField(municipality)); add(new RequiredTextField(postalCode)); add(new RequiredTextField(country)); } Bit I'm not sure about is how to wire up the binding of the nested model object (PostalAddress) to the nested Fieldset (PostalAddressFieldset), see question marks in comments above. Have done it like this so far to get it to compile but it is obviously wrong as I'm interested in the nested PostalAddress objects, not new ones. Second question is whether Wicket provides support for creating unique id's for elements. My html for the PostalAddressFieldset includes things like: input wicket:id=addressLine id=addressLine type=text size=40/ Obviously this is no good as when I use this component multiple times on a form, I end up with multiple fields with the same id. Any advice on best practice or pointers to examples that demonstrate these techniques would be appreciated. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Igor Vaynberg Sent: Sun 4/29/2007 8:19 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? imho all he should do is extend a panel, and make sure that panel is always inside a form. there is no need to have a form to group a few fields together. -igor On 4/29/07, Martijn Dashorst [EMAIL PROTECTED] wrote: One note: this is a 1.3 feature so only expect it to work there. What happens with the nested forms is that the buttons stay, and iirc only the inner form is submitted when a button is pressed inside that inner form. I think the discussion never got to a conclusion on what happens when the outer form is submitted. I think we can still change that behavior (we're not final or in release candidate mode). FormComponent is for input controls
Re: [Wicket-user] Nested Forms and onSubmit()?
Wicket supports nested forms. The inner form tags are replaced with span elements. This is a component framework, where you expect forms to be able to be nested (form on a reusable panel anyone?). I'm just starting to work on a similar thing: an address form panel to be used in other forms. Had assumed I should be extending FormComponent rather than Form itself. Are you suggesting otherwise? Or does the nested form's submit button get removed too? Is there an example of this kind of thing? I couldn't find one. Cheers, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/27/2007 2:37 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Nested Forms and onSubmit()? On 4/27/07, jan_bar [EMAIL PROTECTED] wrote: I think that you cannot nest form in HTML. You have to nest them with CSS. This will also solve your trouble with form submits - I think that the browser simply ignores the nested form tags. Wicket supports nested forms. The inner form tags are replaced with span elements. This is a component framework, where you expect forms to be able to be nested (form on a reusable panel anyone?). Martijn -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.6 contains a very important fix. Download Wicket now! http://wicketframework.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails.winmail.dat- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Spring integration and which wicket version
Hi, Setting out with Wicket for the first time and looking for some advice on which version to use. Have started out with the latest release (1.2.5) but that doesn't seem to include the wicket.spring.injection package needed for the annotation based approach to Spring integration described here: http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach Doubt I'll be at production stage for a couple of months yet so I don't mind using a development version but as I'm new to Wicket I'd probably be better off with something reasonably stable and in line with the existing docs. Get the impression there are 1.3 and 2.0 development strands in progress. Should I use one of these or should I stick with 1.2.5 and use an alternative approach to integrating Spring? Or can I just use a later version of wicket-spring and stick with 1.2.5 for the rest? Appreciate any advice. Regards, Derek * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring integration and which wicket version
Thanks for the quick reply, but wicket-spring 1.2.4 doesn't seem to have wicket.spring.injection either. Currently I have: dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency and get: package wicket.spring.injection does not exist Regards, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version Use wicket-spring 1.2.4 It is compatible with wicket 1.2.5. Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Setting out with Wicket for the first time and looking for some advice on which version to use. Have started out with the latest release (1.2.5) but that doesn't seem to include the wicket.spring.injection package needed for the annotation based approach to Spring integration described here: http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach Doubt I'll be at production stage for a couple of months yet so I don't mind using a development version but as I'm new to Wicket I'd probably be better off with something reasonably stable and in line with the existing docs. Get the impression there are 1.3 and 2.0 development strands in progress. Should I use one of these or should I stick with 1.2.5 and use an alternative approach to integrating Spring? Or can I just use a later version of wicket-spring and stick with 1.2.5 for the rest? Appreciate any advice. Regards, Derek * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your server alive. Download Wicket now! http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails.winmail.dat- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list [EMAIL PROTECTED]
Re: [Wicket-user] Spring integration and which wicket version
Yes, but I got the same problem with artifactIdwicket-spring/artifactId version1.2.4/version artifactIdwicket-spring-annot/artifactId version1.2.4/version besides, one wouldn't expect something to be in 1.2.4 but not in 1.2.5. -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 9:12 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version So you're still using wicket-spring-1.2.5 :) dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the quick reply, but wicket-spring 1.2.4 doesn't seem to have wicket.spring.injection either. Currently I have: dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency and get: package wicket.spring.injection does not exist Regards, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version Use wicket-spring 1.2.4 It is compatible with wicket 1.2.5. Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Setting out with Wicket for the first time and looking for some advice on which version to use. Have started out with the latest release (1.2.5) but that doesn't seem to include the wicket.spring.injection package needed for the annotation based approach to Spring integration described here: http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach Doubt I'll be at production stage for a couple of months yet so I don't mind using a development version but as I'm new to Wicket I'd probably be better off with something reasonably stable and in line with the existing docs. Get the impression there are 1.3 and 2.0 development strands in progress. Should I use one of these or should I stick with 1.2.5 and use an alternative approach to integrating Spring? Or can I just use a later version of wicket-spring and stick with 1.2.5 for the rest? Appreciate any advice. Regards, Derek * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your server alive. Download Wicket now! http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user *
Re: [Wicket-user] Spring integration and which wicket version
Found the cause of the problem. In wicket-spring-annot-1.2.5.jar the classes are packaged under wicket.spring.injection.annot I'd been looking at the source in svn where they are packaged under wicket.spring.injection http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket-spring/src/main/java/wicket/spring/injection/SpringBean.java?view=markup Have updated my import statements and it compiles now :) Regards, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Fri 4/13/2007 9:27 AM To: [EMAIL PROTECTED] Subject: RE: [Wicket-user] Spring integration and which wicket version Yes, but I got the same problem with artifactIdwicket-spring/artifactId version1.2.4/version artifactIdwicket-spring-annot/artifactId version1.2.4/version besides, one wouldn't expect something to be in 1.2.4 but not in 1.2.5. -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 9:12 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version So you're still using wicket-spring-1.2.5 :) dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the quick reply, but wicket-spring 1.2.4 doesn't seem to have wicket.spring.injection either. Currently I have: dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency and get: package wicket.spring.injection does not exist Regards, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version Use wicket-spring 1.2.4 It is compatible with wicket 1.2.5. Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Setting out with Wicket for the first time and looking for some advice on which version to use. Have started out with the latest release (1.2.5) but that doesn't seem to include the wicket.spring.injection package needed for the annotation based approach to Spring integration described here: http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach Doubt I'll be at production stage for a couple of months yet so I don't mind using a development version but as I'm new to Wicket I'd probably be better off with something reasonably stable and in line with the existing docs. Get the impression there are 1.3 and 2.0 development strands in progress. Should I use one of these or should I stick with 1.2.5 and use an alternative approach to integrating Spring? Or can I just use a later version of wicket-spring and stick with 1.2.5 for the rest? Appreciate any advice. Regards, Derek * Email confidentiality notice * This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. The London School of Economics and Political Science (the School) is a company limited by guarantee, registered in England and Wales, under registered number 00070527, and having its registered office at 10th Floor, Tower One, Houghton Street, London WC2A 2AE. The inclusion of this information does not of itself make this email a business document of the School and, to the maximum extent permitted by law, the School accepts no liability for the content and opinions in any non-business emails. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/wicket-user -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket
Re: [Wicket-user] Spring integration and which wicket version
Thanks, got the annotations approach working now :) Turned out I did need to use the 1.2.4 version from Maven repository like Martijn suggested as I got an error at runtime with the 1.2.5 version from there. Found the correct branches in svn with the example which was useful. Had wrongly assumed trunk would have latest code initially. Seem to be at least a couple of caveats with this proxy based approach that I managed to encounter in my first two 'hello world' attempts: 1. Can't inject a final class as cglib can't subclass it. 2. Got a cglib error injecting a bean that didn't have a no-args constructor. Will try to stick to interfaces. Thanks again, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Peter Thomas Sent: Fri 4/13/2007 10:29 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version Hi, You can also consider a quick and dirty approach to getting hold of a spring managed bean like this in the init() method of your wicket application, but you do have to import a couple of Spring classes. @Override public void init() { super.init(); ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); myService = (MyService) applicationContext.getBean(myService); } Then the rest is as per the Application Object Approach in the wicket spring-integration wiki but without the dependency on wicket-spring and the extra stuff in web.xml Should be easy to switch between this and the wicket recommended approach - so this may be useful to get you started if you get stuck etc. Thanks, Peter. On 4/13/07, Martijn Dashorst [EMAIL PROTECTED] wrote: The 1.2.5 maven jars have been misplaced in some way. This will be fixed with 1.2.6, but repository policies don't have much room for replacing existing jars. Can't do much about that. Wicket Spring 1.2.4 should work, as I haven't heard complaints with those dependencies, and have been recommending them for a while. One other option would be to use the distributions that are available from sourceforge, and install/copy them locally into the repo. AFAIK these are golden, even for 1.2.5. Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yes, but I got the same problem with artifactIdwicket-spring/artifactId version1.2.4/version artifactIdwicket-spring-annot/artifactId version1.2.4/version besides, one wouldn't expect something to be in 1.2.4 but not in 1.2.5. -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 9:12 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version So you're still using wicket-spring-1.2.5 :) dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the quick reply, but wicket-spring 1.2.4 doesn't seem to have wicket.spring.injection either. Currently I have: dependency groupIdwicket/groupId artifactIdwicket/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring/artifactId version1.2.5/version scopecompile/scope /dependency dependency groupIdwicket/groupId artifactIdwicket-spring-annot/artifactId version1.2.5/version scopecompile/scope /dependency and get: package wicket.spring.injection does not exist Regards, Derek -Original Message- From: [EMAIL PROTECTED] on behalf of Martijn Dashorst Sent: Fri 4/13/2007 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [Wicket-user] Spring integration and which wicket version Use wicket-spring 1.2.4 It is compatible with wicket 1.2.5. Martijn On 4/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Setting out with Wicket for the first time and looking for some advice on which version to use. Have started out with the latest release (1.2.5) but that doesn't seem to include the wicket.spring.injection package needed for the annotation based approach to Spring integration described here: http://cwiki.apache.org/WICKET/spring.html#Spring-AnnotationbasedApproach Doubt I'll be at