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()?
you may want to take a look at the class FormComponentLabel it should do the trick On 5/5/07, [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] 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. - 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 - 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()?
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
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 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
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
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
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
Re: [Wicket-user] Nested Forms and onSubmit()?
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 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. - 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 -- 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
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 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. - 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 -- 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 - 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
Re: [Wicket-user] Nested Forms and onSubmit()?
neato. i did not know that. i vaguely recall doing this once and i recall being really suprised it worked. now i know why! ;-) Martijn Dashorst wrote: 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 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 -- View this message in context: http://www.nabble.com/Nested-Forms-and-onSubmit%28%29--tf3657476.html#a10244936 Sent from the Wicket - User mailing list archive at Nabble.com. - 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()?
well, it depends on what kind of reuse you want. if you have a particularly cool form panel, it might be something that should stand on its own or nest. but i think you're probably right in general. i've got quite a few panels that just hold some fields for inclusion in a form. igor.vaynberg 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. -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 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 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. - 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 -- 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
Re: [Wicket-user] Nested Forms and onSubmit()?
Hi, 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. Jan -- Jan Bares http://jan.vegetband.cz John RDF [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have nested forms and need them for the following reason.. I have a reusable panel for addresses which has its own form lookup from postcode submit button to auto fill the address. This panel is used in another form 3 times which needs addresses for different people. My problem is that the lookup button on each address panel is also causing submission of the outer form which I think should be incorrect behaviour. Is there a way to do this in wicket and get my expected behaviour (only one form submitted)? -- View this message in context: http://www.nabble.com/Nested-Forms-and-onSubmit%28%29--tf3657476.html#a10218520 Sent from the Wicket - User mailing list archive at Nabble.com. - 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/ - 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()?
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
Re: [Wicket-user] Nested Forms and onSubmit()?
Yes it does. I have found out what was happening. It turned out that the web designer had put some javascript in that was confusing the matter with the outer form. I change the javascript onClick() to be on the input rather than the form and it worked fine. Thanks for the advice and sorry for the trouble. Martijn Dashorst wrote: 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 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 -- View this message in context: http://www.nabble.com/Nested-Forms-and-onSubmit%28%29--tf3657476.html#a10220155 Sent from the Wicket - User mailing list archive at Nabble.com. - 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