I concur: the form fields need to be inside the <form> tag, otherwise the browser will not send them to the server.
Martijn On Mon, Mar 22, 2010 at 6:00 AM, Igor Vaynberg <igor.vaynb...@gmail.com> wrote: > dont think that will work. it will work for rendering, but for > processing components it wont work because they really need to be > descendants of the form. > > -igor > > On Sun, Mar 21, 2010 at 7:08 PM, Jeremy Thomerson > <jer...@wickettraining.com> wrote: >> Sorry, override isTransparentResolver. The set method is only on Border. >> >> -- >> Jeremy Thomerson >> http://www.wickettraining.com >> >> >> >> On Sun, Mar 21, 2010 at 8:00 PM, Steve Mactaggart < >> steve.mactagg...@gmail.com> wrote: >> >>> Excellent, >>> >>> My simple test now seems to work if I do a getForm(). >>> Although I really like the thought of setTransparentResolver(), but as >>> with Josh, I can't find it in 1.4.7.. >>> >>> I also have this problem with a Border object, I'll have to look into >>> seeing if I can get around the same problem by doing a getBorder(). >>> >>> Steve >>> >>> On Mon, Mar 22, 2010 at 11:40 AM, Jeremy Thomerson >>> <jer...@wickettraining.com> wrote: >>> > you need to be adding the components to the form. you're currently >>> adding >>> > them to the page itself. the component hierarchy is thus broken. on >>> your >>> > child page, either do getForm().add(foo) [you'll need to expose a getForm >>> > method that returns the form from the parent page] or else on your parent >>> > page (BaseEditPage), setTransparentResolver(true) on the form and add the >>> > form children to the page then. >>> > >>> > -- >>> > Jeremy Thomerson >>> > http://www.wickettraining.com >>> > >>> > >>> > >>> > On Sun, Mar 21, 2010 at 7:35 PM, Steve Mactaggart < >>> st...@whitesquaresoft.com >>> >> wrote: >>> > >>> >> Hi all, >>> >> >>> >> Before I go to far trying to prove I have a bug, I thought i'd crowd >>> >> source an answer. >>> >> >>> >> We have a lot of "Edit" pages that have a lot of simmilar structure, >>> >> and what I wanted to do is create a BaseEditPage that contains the >>> >> form, the save/cancel buttons, some layout stuff and a FeedbackPanel, >>> >> then extend it into UserEditPage that just adds the fields that are >>> >> editable. >>> >> >>> >> I can get this working as long as I put all the HTML into the >>> >> UserEditPage.html file. >>> >> >>> >> Lets make this simple. Lets say that BaseEditPage extends >>> >> StandardPage, where StandardPage provides a standard header, footer >>> >> and so all we have to worry about in the BaseEditPage is the "content" >>> >> of the page. >>> >> >>> >> My BaseEditPage html will look like: >>> >> >>> >> <wicket:extend> >>> >> <form wicket:id="form"> >>> >> <div wicket:id="feedback"/> >>> >> <wicket:child/> >>> >> >>> >> <input type="button" wicket:id="save"/> >>> >> <input type="button" wicket:id="cancel"/> >>> >> </form> >>> >> </wicket:extend> >>> >> >>> >> And the BaseEditPage.java is like: >>> >> >>> >> public class BaseEditPage extends StandardPage { >>> >> >>> >> Form form; >>> >> SubmitLink saveButton; >>> >> SubmitLink cancelButton; >>> >> FeedbackPanel feedbackPanel; >>> >> >>> >> public BaseEditPage() { >>> >> super(); >>> >> >>> >> form = new Form("form"); >>> >> >>> >> saveButton = new SubmitLink("save"); //onSubmit excluded to keep >>> >> example simple. >>> >> cancelButton = new SubmitLink("cancel"); >>> >> >>> >> feedbackPanel = new FeedbackPanel("feedback"); >>> >> >>> >> add(form); >>> >> >>> >> form.add(saveButton); >>> >> form.add(cancelButton); >>> >> form.add(feedbackPanel); >>> >> } >>> >> } >>> >> >>> >> Now I create my UserEditPage >>> >> >>> >> public UserEditPage extends BaseEditPage { >>> >> >>> >> RequiredTextField username; >>> >> >>> >> public UserEditPage() { >>> >> username = new RequiredTextField<String>("username", new >>> >> Model("test-username")); >>> >> >>> >> add(username); >>> >> } >>> >> >>> >> } >>> >> >>> >> And create the HTML for the page like: >>> >> <wicket:extend> >>> >> Username: <input type="text" wicket:id="username"/> >>> >> </wicket:extend> >>> >> >>> >> >>> >> When I run this simple example I get a messsage stating: >>> >> Unable to find component with id 'username' in [MarkupContainer >>> >> [Component id = _extend4]]. >>> >> >>> >> My guess is this is an issue processing the sub class due to the fact >>> >> that the <form> tag is still open. >>> >> >>> >> Is there any way to do this, or is this outside the scope of Wicket? >>> >> >>> >> Cheers, >>> >> Steve >>> >> >>> >> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> >> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >>> >> >>> > >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org