Hello all i used a datepicker along with other form
components and i have used a clear button to clear out
the form components values when it is clicked.
Here is small portion of what i did:
<form wicket:id="testForm">
<input type="text" wicket:id="date" /><span
wicket:id="datePicker"></span>
<input type="submit" wicket:id="clear" value="button"
/>
</form>
the corresponding java code is:
Form form = new Form("testForm");
                getPageBody().add(form);
                form.setOutputMarkupId(true);
                TextField dateField = new TextField("date",new
PropertyModel(this,"date"));
                form.add(dateField);
                form.add(new DatePicker("datePicker", dateField));
                AjaxSubmitButton clearButton = new
AjaxSubmitButton("clear",form){

                        private static final long serialVersionUID = 1L;

                        @Override
                        protected void onSubmit(AjaxRequestTarget target,
Form form) {
                                setDate(null);
                                target.addComponent(form);
                                
                        }
                        
                };
                form.add(clearButton);
                
After i click the clear button the input field is
cleared along with its model value as expected, but
next time when i use that date picker to pick the
date, the date is not picked by the input
field(dateField). From the javascript console i found
the error as "too much recursion".

How to overcome this problem?


 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

-------------------------------------------------------------------------
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.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to