Re: Batched AjaxUpdateContainer ?
Re: Batched AjaxUpdateContainer ?
- Subject: Re: Batched AjaxUpdateContainer ?
- From: David LeBer <email@hidden>
- Date: Tue, 14 May 2013 13:00:17 -0400
A couple of thoughs.
The Ajax stuff pretty much assumes that it's interacting with simple container elements (div, span, p, etc) so it generally barfs horribly if you are trying to work with something like a tr. Second, as you've already noted an AjaxUpdateContainer isn't really going to do what you want, instead of doing an update you actually want to do an insert/append.
Can you continue doing what you're doing, but make the table smaller? Pagination perhaps?
Alternately, it looks like you may be facing creating a custom Ajax component that wraps Scriptaculouses insert() to append a tr at the end of your table.
--
David LeBer
Codeferous Software
On 2013-05-14, at 12:32 PM, Jan Taterka <email@hidden> wrote:
> Well, no actually...
>
>
> The whole table has much too much rows, and is very heavy (2-4 MB). What I want to do, is add a new row to the list/table, and not refreshing the whole list/table.
> AjaxUpdateTrigger will update a lot of UC's, but i want to update as little as possible (cause only change here is a new row). I guess that separated UC for each row is not the best solution, or is ? (and if, how add a new one to the DOM without refreshing others?)
>
>
> Dnia 14 maja 2013 17:46 Theodore Petrosky <email@hidden> napisaĆ(a):
>
>> is it possible to use an AjaxUpdateTrigger? It takes an array of containers. if you did create the batches of rows, you could add and detract from the array of groups.
>>
>> (That's if I understand what you are trying to do!)
>>
>> Ted
>>
>> --- On Tue, 5/14/13, Jan Taterka <email@hidden> wrote:
>>
>>> From: Jan Taterka <email@hidden>
>>> Subject: Batched AjaxUpdateContainer ?
>>> To: email@hidden
>>> Date: Tuesday, May 14, 2013, 10:08 AM
>>> Hi guys,
>>>
>>> Just wonder about some batched AjaxUpdateContainer. I have
>>> following situation in my app:
>>>
>>> <wo:AjaxUpdateContainer name ="uc" id="someId"
>>> fullSubmit="true" id = ucId >
>>> <wo:WORepetition name = "rep"
>>> list=myList item=myItem>
>>> <tr>
>>>
>>> <td><wo:WOPopUpButton ...></td>
>>>
>>> <td> ... </td>
>>> </tr>
>>> </wo:WORepetition>
>>> <wo:AjaxSubmitButton updateContainerId
>>> = ucId name="addMoreBtn" action = addEmptyListItem ...
>>> />
>>> </wo:AjaxUpdateContainer>
>>>
>>>
>>> and java:
>>>
>>> public NSMutableArray<SomeObject> myList;
>>> public SomeObject myItem;
>>>
>>> public WOActionResults addEmptyListItem() {
>>>
>>> if(myList == null) {
>>> myList = new
>>> NSMutableArray<SomeObject>();
>>> }
>>>
>>> myList.addObject(new SomeObject());
>>> return null;
>>>
>>> }
>>>
>>> public String ucId() {
>>> return "unique-constant-id";
>>> }
>>>
>>> Just to draft the code. Now, When the size of myList is
>>> lower than for example 200 elements, the addEmptyListItem
>>> method executes quite fast. When riching 200+elements, the
>>> response is a bit to large (1MB uncompressed) and adding new
>>> line takes 3-4 seconds and this time grows in function of
>>> list's elements count. Unfortunately, in my repetition is
>>> some DOM based javascript, so it slow's down the response a
>>> bit more.
>>>
>>> I wonder, i i can e ome trick / component i do not know,
>>> which could help with this situation? One of my ideas is
>>> UpdateContainer only for last "row", but how to do it? (Each
>>> row my contain some link to "remove" element from list, what
>>> breaks my idea of making separated UpdateContainer for evry
>>> N rows (30-40).
>>>
>>>
>>> Thanks for any help!
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be
>>> ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden