Re: Add a * (star) to a mandatory field
Igor, Here's the generated source: tr td align=leftlabel wicket:id=password-label for=userId2Password/label/td td* input value= maxlength=256 type=password wicket:id=password name=password//td /tr And here's the Java code: TextField passField = new PasswordTextField(password, new PropertyModel(this, password)); passField.add(new MandatoryBehavior()); form.add(passField); The mandatory behavior is what I showed before. I will check and see the ComponentBorder ... Daan, thanks for a very useful link. But it's more on how to handle the error message. Which is cool I will use it. Ryan, Do you have a behavior / component that adds a special mark to mandatory fields. As I understood the shinyform code, it's more on how to traverse all form components. Thanks On Tue, Sep 16, 2008 at 6:05 PM, Daan van Etten [EMAIL PROTECTED] wrote: Or you can check my solution here: http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket Example form: http://stuq.nl/media/image/form-usability-tutorial-invalid.png (You can easily change the look and feel, this is just an example) Regards, Daan On 16 sep 2008, at 16:54, Ryan Gravener wrote: There is always shinyforms. http://code.google.com/p/elephas/source/browse/#svn/trunk/src/main/ java/org/elephas/webapp/frontend/component/common/form On Tue, Sep 16, 2008 at 10:43 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Add a * (star) to a mandatory field
Igor, James, Could you please give a short example of what you mean by using a Border? I haven't used this component yet, and another example, beside what there is in the site will be welcome On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Add a * (star) to a mandatory field
Have a look at this link as it's provides an excellent example: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage Best, James. On Wed, Sep 17, 2008 at 9:42 AM, Eyal Golan [EMAIL PROTECTED] wrote: Igor, James, Could you please give a short example of what you mean by using a Border? I haven't used this component yet, and another example, beside what there is in the site will be welcome On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
That example would be even more useful if it included the border's html in its Behind he Scenes section: MyBorder.html (hopefully not too badly mangled by Nabble or your mail client) ... wicket:border div style=border: 2px dotted #fc0; width: 300px; padding: 5px; before the border contents br / wicket:body/ br /after the border contents br / /div /wicket:border ... Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk msc65jap wrote: Have a look at this link as it's provides an excellent example: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage Best, James. On Wed, Sep 17, 2008 at 9:42 AM, Eyal Golan [EMAIL PROTECTED] wrote: Igor, James, Could you please give a short example of what you mean by using a Border? I haven't used this component yet, and another example, beside what there is in the site will be welcome On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Add-a-*-%28star%29-to-a-mandatory-field-tp19510071p19530974.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
I've just looked into this and there is the MyBorder in the source. It may be more useful if it as on page. OK, so will use this, but still, I think that there's something wrong with beforeRender(), the star is added after the component. Or am I missing something? On Wed, Sep 17, 2008 at 3:27 PM, jWeekend [EMAIL PROTECTED]wrote: That example would be even more useful if it included the border's html in its Behind he Scenes section: MyBorder.html (hopefully not too badly mangled by Nabble or your mail client) ... wicket:border div style=border: 2px dotted #fc0; width: 300px; padding: 5px; before the border contents br / wicket:body/ br /after the border contents br / /div /wicket:border ... Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk msc65jap wrote: Have a look at this link as it's provides an excellent example: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage Best, James. On Wed, Sep 17, 2008 at 9:42 AM, Eyal Golan [EMAIL PROTECTED] wrote: Igor, James, Could you please give a short example of what you mean by using a Border? I haven't used this component yet, and another example, beside what there is in the site will be welcome On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Add-a-*-%28star%29-to-a-mandatory-field-tp19510071p19530974.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Add a * (star) to a mandatory field
i said look into icomponentborder, not border... -igor On Wed, Sep 17, 2008 at 5:57 AM, Eyal Golan [EMAIL PROTECTED] wrote: I've just looked into this and there is the MyBorder in the source. It may be more useful if it as on page. OK, so will use this, but still, I think that there's something wrong with beforeRender(), the star is added after the component. Or am I missing something? On Wed, Sep 17, 2008 at 3:27 PM, jWeekend [EMAIL PROTECTED]wrote: That example would be even more useful if it included the border's html in its Behind he Scenes section: MyBorder.html (hopefully not too badly mangled by Nabble or your mail client) ... wicket:border div style=border: 2px dotted #fc0; width: 300px; padding: 5px; before the border contents br / wicket:body/ br /after the border contents br / /div /wicket:border ... Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk msc65jap wrote: Have a look at this link as it's provides an excellent example: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.BorderPage Best, James. On Wed, Sep 17, 2008 at 9:42 AM, Eyal Golan [EMAIL PROTECTED] wrote: Igor, James, Could you please give a short example of what you mean by using a Border? I haven't used this component yet, and another example, beside what there is in the site will be welcome On Tue, Sep 16, 2008 at 5:43 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Add-a-*-%28star%29-to-a-mandatory-field-tp19510071p19530974.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
you are adding the behavior to the textfield, not to your label. so it is rendered properly - before the input tag. -igor On Wed, Sep 17, 2008 at 1:04 AM, Eyal Golan [EMAIL PROTECTED] wrote: Igor, Here's the generated source: tr td align=leftlabel wicket:id=password-label for=userId2Password/label/td td* input value= maxlength=256 type=password wicket:id=password name=password//td /tr And here's the Java code: TextField passField = new PasswordTextField(password, new PropertyModel(this, password)); passField.add(new MandatoryBehavior()); form.add(passField); The mandatory behavior is what I showed before. I will check and see the ComponentBorder ... Daan, thanks for a very useful link. But it's more on how to handle the error message. Which is cool I will use it. Ryan, Do you have a behavior / component that adds a special mark to mandatory fields. As I understood the shinyform code, it's more on how to traverse all form components. Thanks On Tue, Sep 16, 2008 at 6:05 PM, Daan van Etten [EMAIL PROTECTED] wrote: Or you can check my solution here: http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket Example form: http://stuq.nl/media/image/form-usability-tutorial-invalid.png (You can easily change the look and feel, this is just an example) Regards, Daan On 16 sep 2008, at 16:54, Ryan Gravener wrote: There is always shinyforms. http://code.google.com/p/elephas/source/browse/#svn/trunk/src/main/ java/org/elephas/webapp/frontend/component/common/form On Tue, Sep 16, 2008 at 10:43 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
Igor, Thanks :-) I feel so dumb ... Anyway, I've broaden my knowledge with the Border issue. Which is good I guess. On Wed, Sep 17, 2008 at 5:31 PM, Igor Vaynberg [EMAIL PROTECTED]wrote: you are adding the behavior to the textfield, not to your label. so it is rendered properly - before the input tag. -igor -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Add a * (star) to a mandatory field
I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Add a * (star) to a mandatory field
Or you can check my solution here: http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket Example form: http://stuq.nl/media/image/form-usability-tutorial-invalid.png (You can easily change the look and feel, this is just an example) Regards, Daan On 16 sep 2008, at 16:54, Ryan Gravener wrote: There is always shinyforms. http://code.google.com/p/elephas/source/browse/#svn/trunk/src/main/ java/org/elephas/webapp/frontend/component/common/form On Tue, Sep 16, 2008 at 10:43 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: we use componentborder to do this, works like a charm. still it is interesting that the * is output before, are you sure its not your css, can you check the generated source? -igor On Tue, Sep 16, 2008 at 6:23 AM, James Perry [EMAIL PROTECTED] wrote: I too recently had a use case where the customer wanted a '*' to represent a mandatory field. IMO, using a border is more subtle and tidier then your approach. On Tue, Sep 16, 2008 at 12:40 PM, Eyal Golan [EMAIL PROTECTED] wrote: Hi, I created this behavior for adding a star BEFORE the component is rendered: public final class MandatoryBehavior extends AbstractBehavior { private static final long serialVersionUID = 5368825601887534185L; @Override public void beforeRender(Component component) { component.getResponse().write(* ); } } 1. For some reason, the star is added AFTER the label. For example: Configuration: * instead of * Configuration 2. I am adding this to labels that displays mandatory fields such as DropDown and TextField. Is there a nicer way? -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]