Even if they are for "wicket's internal use", documentation might be
valuable, especially for (wicketstuff) developers who go deeper then regular
users. Furthermore, having some basic JS utilities (with documented public
API) coming with Wicket would make using Wicket even more fun. I'd bet that
a lot of Wicket users implemented Wicket.$('id') or something similar on
their own. And I'm not talking about a fully fledged JS framework or
library, just some basic stuff to handle common tasks like the whole event
stuff or some DOM manipulations. Basically just what's in place already but
kept secret for "internal use only".

Maybe that's a candidate for the Wicket 1.5 wishlist ...


igor.vaynberg wrote:
> 
> On Thu, Jan 15, 2009 at 9:11 AM, Stefan Fußenegger
> <stefan_fusseneg...@gmx.at> wrote:
>>
>> 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.
> 
> those are for wicket's internal use. dont touch :)
> 
>> 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?
> 
> javascript implementation is easy, it is the serverside declaration
> and invocation that would be confusing. you are welcome to prototype
> it if you want to pursue it further.
> 
> -igor
> 
>>
>> 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
>>
>>
> 
> ---------------------------------------------------------------------
> 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-tp21435127p21483421.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

Reply via email to