I knew it was pseudo code. With "JS library" I meant the stuff contained in wicket-ajax.js, wicket-event.js, wicket-ajax-debug.js.
with replacing border, you meant the server-side concept of a Border, right? I was talking more of a html related concept (bad description, sorry), where a border is some markup surrounding some other markup. The later should be kept untouched by the update. I think it shouldn't be to difficult to get a DOM node by id, remove it or move it somewhere else temporarily, insert the ajax-retrieve stuff, move the DOM node back to where it was. If the implementation is as simple as this, it would be a feature worth adding, wouldn't it? Regards igor.vaynberg wrote: > > On Thu, Jan 15, 2009 at 12:53 AM, Stefan Fußenegger > <stefan_fusseneg...@gmx.at> wrote: >> >> Thanks, I'll go for the suggested JS.Is there any documentation of the >> Wicket >> JavaScript library available somewhere? > > there is no wicket js library, what i gave you was pseudocode. > >> However, wouldn't be replacing borders (i.e. keeping parts of the >> hierarchy) >> be a nice feature? I'd add a ticket if you agree. > > you can replace borders already, the problem here relates to the > timing of client-server interaction. because you are validating while > the user is typing the serverside often gets the value that is out of > date since the user types faster then you can send requests to the > server. this means that when repainting the component on the > serverside there is a good chance you will repaint it with the wrong > value. > > currently there is no way to tell a form component to repaint but not > update its value attribute, and this is not always possible anyways. > > -igor > >> >> Regards, Stefan >> >> >> igor.vaynberg wrote: >>> >>> 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 >>> <stefan_fusseneg...@gmx.at> 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: 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 >>> >>> >>> >> >> >> ----- >> ------- >> 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-tp21435127p21473620.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> 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 > > > ----- ------- 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-tp21435127p21482168.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org