On Thu, Jan 15, 2009 at 12:53 AM, Stefan Fußenegger
<[email protected]> 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
>> <[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]
>>
>>
>>
>
>
> -----
> -------
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]