Re: Label is driving me a *little* crazy
Did something change in 1.3? http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.FormPage This simple example doesn't work for me either. I get a 1. [MarkupContainer [Component id = feedback, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:feedback.FeedbackPanel, isVisible = true, isVersioned = false]]I don't understand how a simple example is not working. I'm copying http://wicketstuff.org/wicket13/forminput/ and again, issues rendering the labels. It comes from the property file, and I'm assuming the properties file is automatically hooked up given I don't see any code that references it. Erik van Oosten [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try removing the id attributes from the markup. Wicket likes to generate this for itself. You'll also need to add a FormLabel (or something named like that) to the for element. Regards, Erik. Andy Czerwonka wrote: I found this thread: http://www.mail-archive.com/users@wicket.apache.org/msg04400.html I have written similair code, but I'm getting an exception. Clearly my markup is wrong, but I can't for the life of me unnderstand why? When I inspect the code, the page contains the right things. I'm a wicket newbie to be sure, so apologies if it's a silly question. Here's the java snippet (similair to the java on the above thread) private void buildForm() { RequiredTextField nameTextField = new RequiredTextField(name); nameTextField.setLabel(new Model(Business Name)); add(nameTextField); addFieldLabel(this, nameTextField); add(new Button(saveButton)); } protected FormComponentLabel addFieldLabel(final MarkupContainer container, final FormComponent formComponent) { SimpleFormComponentLabel label = new SimpleFormComponentLabel(formComponent.getId() + Label, formComponent); container.add(label); return label; } The markup is as follows: form wicket:id=newListingForm action=save fieldset label for=name wicket:id=nameLabel id=nameLabel[nameLabel]/label input wicket:id=name id=name type=text size=50 / input type=submit wicket:id=saveButton value=save / /fieldset /form The error looks like: 1. [MarkupContainer [Component id = nameLabel, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, isVersioned = false]] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Label is driving me a *little* crazy
why does it work for everyone else and not you? could you paste the entire stack trace? -igor On Jan 27, 2008 5:31 AM, Andy Czerwonka [EMAIL PROTECTED] wrote: Did something change in 1.3? http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.FormPage This simple example doesn't work for me either. I get a 1. [MarkupContainer [Component id = feedback, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:feedback.FeedbackPanel, isVisible = true, isVersioned = false]]I don't understand how a simple example is not working. I'm copying http://wicketstuff.org/wicket13/forminput/ and again, issues rendering the labels. It comes from the property file, and I'm assuming the properties file is automatically hooked up given I don't see any code that references it. Erik van Oosten [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try removing the id attributes from the markup. Wicket likes to generate this for itself. You'll also need to add a FormLabel (or something named like that) to the for element. Regards, Erik. Andy Czerwonka wrote: I found this thread: http://www.mail-archive.com/users@wicket.apache.org/msg04400.html I have written similair code, but I'm getting an exception. Clearly my markup is wrong, but I can't for the life of me unnderstand why? When I inspect the code, the page contains the right things. I'm a wicket newbie to be sure, so apologies if it's a silly question. Here's the java snippet (similair to the java on the above thread) private void buildForm() { RequiredTextField nameTextField = new RequiredTextField(name); nameTextField.setLabel(new Model(Business Name)); add(nameTextField); addFieldLabel(this, nameTextField); add(new Button(saveButton)); } protected FormComponentLabel addFieldLabel(final MarkupContainer container, final FormComponent formComponent) { SimpleFormComponentLabel label = new SimpleFormComponentLabel(formComponent.getId() + Label, formComponent); container.add(label); return label; } The markup is as follows: form wicket:id=newListingForm action=save fieldset label for=name wicket:id=nameLabel id=nameLabel[nameLabel]/label input wicket:id=name id=name type=text size=50 / input type=submit wicket:id=saveButton value=save / /fieldset /form The error looks like: 1. [MarkupContainer [Component id = nameLabel, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, isVersioned = false]] - 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] - 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: Label is driving me a *little* crazy
Igor Vaynberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] why does it work for everyone else and not you? could you paste the entire stack trace? -igor Because I'm an idiot. Sorry group - my Eclipse environment was messed up and it wasn't building properly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Label is driving me a *little* crazy
I found this thread: http://www.mail-archive.com/users@wicket.apache.org/msg04400.html I have written similair code, but I'm getting an exception. Clearly my markup is wrong, but I can't for the life of me unnderstand why? When I inspect the code, the page contains the right things. I'm a wicket newbie to be sure, so apologies if it's a silly question. Here's the java snippet (similair to the java on the above thread) private void buildForm() { RequiredTextField nameTextField = new RequiredTextField(name); nameTextField.setLabel(new Model(Business Name)); add(nameTextField); addFieldLabel(this, nameTextField); add(new Button(saveButton)); } protected FormComponentLabel addFieldLabel(final MarkupContainer container, final FormComponent formComponent) { SimpleFormComponentLabel label = new SimpleFormComponentLabel(formComponent.getId() + Label, formComponent); container.add(label); return label; } The markup is as follows: form wicket:id=newListingForm action=save fieldset label for=name wicket:id=nameLabel id=nameLabel[nameLabel]/label input wicket:id=name id=name type=text size=50 / input type=submit wicket:id=saveButton value=save / /fieldset /form The error looks like: 1. [MarkupContainer [Component id = nameLabel, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, isVersioned = false]] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Label is driving me a *little* crazy
Try removing the id attributes from the markup. Wicket likes to generate this for itself. You'll also need to add a FormLabel (or something named like that) to the for element. Regards, Erik. Andy Czerwonka wrote: I found this thread: http://www.mail-archive.com/users@wicket.apache.org/msg04400.html I have written similair code, but I'm getting an exception. Clearly my markup is wrong, but I can't for the life of me unnderstand why? When I inspect the code, the page contains the right things. I'm a wicket newbie to be sure, so apologies if it's a silly question. Here's the java snippet (similair to the java on the above thread) private void buildForm() { RequiredTextField nameTextField = new RequiredTextField(name); nameTextField.setLabel(new Model(Business Name)); add(nameTextField); addFieldLabel(this, nameTextField); add(new Button(saveButton)); } protected FormComponentLabel addFieldLabel(final MarkupContainer container, final FormComponent formComponent) { SimpleFormComponentLabel label = new SimpleFormComponentLabel(formComponent.getId() + Label, formComponent); container.add(label); return label; } The markup is as follows: form wicket:id=newListingForm action=save fieldset label for=name wicket:id=nameLabel id=nameLabel[nameLabel]/label input wicket:id=name id=name type=text size=50 / input type=submit wicket:id=saveButton value=save / /fieldset /form The error looks like: 1. [MarkupContainer [Component id = nameLabel, page = ca.arcticpenguin.mff.NewListingPage, path = 0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, isVersioned = false]] - 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]