You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Benny Weingarten <be...@myworklight.com> on 2008/09/24 18:12:16 UTC
Ajax calls loads my server
Hello.
In my application I have a panel with a list of users and a checkbox next to
each user.
[] user 1
[] user 2
[] user 3
..
[] user n
I also have an ajaxlink called "select all", which selects all the
checkboxes.
Problem: when there are a lot of checkboxes, the operations takes a long
time - more than is tolerable. Is there a way to make the ajax do its work
COMPLETELY on the client side, without accessing the server?
In general, does wicket provide a way have pages that have ajax behavior
that doesn't make calls to the server at all?
thanks,
Benny.
--
View this message in context: http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax calls loads my server
Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Thu, 25 Sep 2008, Benny Weingarten wrote:
> I want to have a functionality that if a user types something in field2, the
> checkbox becomes disabled. currently I use an onChangeAjaxBehavior on the
> textfield, and that is AJAX, making a call to the server. I don't really
> want that sort of communication. Would I need to write my own javascript?
I think so, yes.
> is there some sort of wicket component with this sort of behavior?
Most of the Javascript that comes with Wicket has more to do
with the communication with serverside (submits, Ajax). That
is because it's a serverside framework anyway.
Having more handy Javascript bundled in would be more to
maintain, and there are a plenty of Javascript libraries
available nowadays. Maybe it would be handy to have more by
default however.
One interesting idea that has been tossed around is making
it possible to somehow use GWT code to have more client-side
functionality on Wicket components.
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax calls loads my server
Posted by Benny Weingarten <be...@myworklight.com>.
Of course, I meant javascript...
thanks for the clarification.
To preserve functionality, (That is, having a "Select all
" and "select none" links instead of a single checkbox to select or deselect
all) I will go with writing my own javascript.
In addition, I have, in a different form in my application, two fields and a
checkbox:
field1: _____________
field2: _____________
[] checkbox
I want to have a functionality that if a user types something in field2, the
checkbox becomes disabled. currently I use an onChangeAjaxBehavior on the
textfield, and that is AJAX, making a call to the server. I don't really
want that sort of communication. Would I need to write my own javascript?
is there some sort of wicket component with this sort of behavior?
thanks,
Benny.
walnutmon wrote:
>
> While this javascript behavior doesn't qualify as Ajax, how else could you
> get that behavior without making an ajax component so that you can get
> form element objects to submit without a page refresh? Do you need to
> write javascript in the Wicket code? I suppose you could write javascript
> in the html files, but can you do things like div resizing, and other
> useful javascript functions using wicket?
>
>
>
> Matej Knopp-2 wrote:
>>
>> If it doesn't call the server than it's not Ajax...
>>
>> Anyway, you can accomplish what you want by writing the javascript by
>> yourself. Or use Check, CheckGroup and CheckGroupSelector components
>> that user client side javascript to change the state of checkboxes.
>>
>> -Matej
>>
>> On Wed, Sep 24, 2008 at 6:12 PM, Benny Weingarten <be...@myworklight.com>
>> wrote:
>>>
>>> Hello.
>>>
>>> In my application I have a panel with a list of users and a checkbox
>>> next to
>>> each user.
>>> [] user 1
>>> [] user 2
>>> [] user 3
>>> ..
>>> [] user n
>>>
>>> I also have an ajaxlink called "select all", which selects all the
>>> checkboxes.
>>>
>>> Problem: when there are a lot of checkboxes, the operations takes a long
>>> time - more than is tolerable. Is there a way to make the ajax do its
>>> work
>>> COMPLETELY on the client side, without accessing the server?
>>>
>>> In general, does wicket provide a way have pages that have ajax behavior
>>> that doesn't make calls to the server at all?
>>>
>>> thanks,
>>> Benny.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19664171.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax calls loads my server
Posted by walnutmon <ju...@gmail.com>.
While this javascript behavior doesn't qualify as Ajax, how else could you
get that behavior without making an ajax component so that you can get form
element objects to submit without a page refresh? Do you need to write
javascript in the Wicket code? I suppose you could write javascript in the
html files, but can you do things like div resizing, and other useful
javascript functions using wicket?
Matej Knopp-2 wrote:
>
> If it doesn't call the server than it's not Ajax...
>
> Anyway, you can accomplish what you want by writing the javascript by
> yourself. Or use Check, CheckGroup and CheckGroupSelector components
> that user client side javascript to change the state of checkboxes.
>
> -Matej
>
> On Wed, Sep 24, 2008 at 6:12 PM, Benny Weingarten <be...@myworklight.com>
> wrote:
>>
>> Hello.
>>
>> In my application I have a panel with a list of users and a checkbox next
>> to
>> each user.
>> [] user 1
>> [] user 2
>> [] user 3
>> ..
>> [] user n
>>
>> I also have an ajaxlink called "select all", which selects all the
>> checkboxes.
>>
>> Problem: when there are a lot of checkboxes, the operations takes a long
>> time - more than is tolerable. Is there a way to make the ajax do its
>> work
>> COMPLETELY on the client side, without accessing the server?
>>
>> In general, does wicket provide a way have pages that have ajax behavior
>> that doesn't make calls to the server at all?
>>
>> thanks,
>> Benny.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19662089.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Ajax calls loads my server
Posted by Matej Knopp <ma...@gmail.com>.
If it doesn't call the server than it's not Ajax...
Anyway, you can accomplish what you want by writing the javascript by
yourself. Or use Check, CheckGroup and CheckGroupSelector components
that user client side javascript to change the state of checkboxes.
-Matej
On Wed, Sep 24, 2008 at 6:12 PM, Benny Weingarten <be...@myworklight.com> wrote:
>
> Hello.
>
> In my application I have a panel with a list of users and a checkbox next to
> each user.
> [] user 1
> [] user 2
> [] user 3
> ..
> [] user n
>
> I also have an ajaxlink called "select all", which selects all the
> checkboxes.
>
> Problem: when there are a lot of checkboxes, the operations takes a long
> time - more than is tolerable. Is there a way to make the ajax do its work
> COMPLETELY on the client side, without accessing the server?
>
> In general, does wicket provide a way have pages that have ajax behavior
> that doesn't make calls to the server at all?
>
> thanks,
> Benny.
>
> --
> View this message in context: http://www.nabble.com/Ajax-calls-loads-my-server-tp19652337p19652337.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org