the way to do this is to have the div be output there without
class="error" and to append the class to it via
ajaxrequesttarget.appendjavascript("$(divid).addclass('error');");that way you do not need to repaint the input tag which is the problematic part for your usecase. -igor On Tue, Jan 13, 2009 at 4:49 AM, Stefan Fußenegger <[email protected]> wrote: > > Hi, > > My HTML looks similar to this: > > <div><label>Foo</label><input type="text" /></div> > > I want to validate the contents of the field as soon as the user starts > typing. If there is an error, the html should become: > > <div class="error">There was an error<label>Foo</label><input type="text" > /></div> > > However, if I add the whole hierarchy to the AjaxRequestTarget, the changes > in the text field get lost (Which results in quite weired typing behavior). > > Is it possible to skip components from being updated within another > component? Might storing the value (prependJavascript), updating the whole > hierarchy and writing back the stored value (appendJavascript) give > satisfying results. > > What do you think? Any other ideas? > > Thanks, Stefan > > ----- > ------- > Stefan Fußenegger > http://talk-on-tech.blogspot.com // looking for a nicer domain ;) > -- > View this message in context: > http://www.nabble.com/Ajax-Update-MarkupContaining-containing-FormComponent-without-loosing-user-changes-tp21435127p21435127.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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
