Example of saving a list of edits in one shot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Example of saving a list of edits in one shot

Stephen Rufle-2
I am looking for an example of a screen that has a list of edits, but
only a single save function. I have seen examples [1] of a list that has
update and delete buttons on each row.

[1]
https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004

More generally what would be the best way to deal with this concept. My
thought is that I would still have a form on each row (as it is now for
EditProductPrices), but the global save function would use javascript to
submit each for in turn. I thinking in the correct direction?


Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Rishi Solanki
Hi Stephen,
Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
Here the form submit use the AJAX and handled using the "jsonservice-multi"
handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
HTH !

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]> wrote:

> I am looking for an example of a screen that has a list of edits, but only
> a single save function. I have seen examples [1] of a list that has update
> and delete buttons on each row.
>
> [1]
> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>
> More generally what would be the best way to deal with this concept. My
> thought is that I would still have a form on each row (as it is now for
> EditProductPrices), but the global save function would use javascript to
> submit each for in turn. I thinking in the correct direction?
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Jacques Le Roux
Administrator
Hi Rishi,

What using Ajax and jsonservice-multi adds to a form of type multi ?

Thanks

Jacques

From: "Rishi Solanki" <[hidden email]>

> Hi Stephen,
> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
> Here the form submit use the AJAX and handled using the "jsonservice-multi"
> handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
> HTH !
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]> wrote:
>
>> I am looking for an example of a screen that has a list of edits, but only
>> a single save function. I have seen examples [1] of a list that has update
>> and delete buttons on each row.
>>
>> [1]
>> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>>
>> More generally what would be the best way to deal with this concept. My
>> thought is that I would still have a form on each row (as it is now for
>> EditProductPrices), but the global save function would use javascript to
>> submit each for in turn. I thinking in the correct direction?
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Stephen Rufle-2
In reply to this post by Rishi Solanki
That is the way I was going. Thanks for giving me a good example.

I have an ajax related question.

I see that the CostCenters screen uses the prototypejs framework. What
is the relationship/status of prototypejs, scriptaculous, and
dojotoolkit and OfBiz. I have javascript using dojo.xhrPost to make ajax
requests, is there a benefit or trade off to using Ajax.Request which
looks like it does the same function? I am new to the use of these
frameworks so if you know of any good comparison articles please pass
them along. I will also google on my own :)


Rishi Solanki wrote:

> Hi Stephen,
> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
> Here the form submit use the AJAX and handled using the
> "jsonservice-multi" handler of
> org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
> HTH !
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I am looking for an example of a screen that has a list of edits,
>     but only a single save function. I have seen examples [1] of a
>     list that has update and delete buttons on each row.
>
>     [1]
>     https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>
>     More generally what would be the best way to deal with this
>     concept. My thought is that I would still have a form on each row
>     (as it is now for EditProductPrices), but the global save function
>     would use javascript to submit each for in turn. I thinking in the
>     correct direction?
>
>
>

--
Stephen P Rufle
[hidden email]
H1:480-626-8022
H2:480-802-7173
Yahoo IM: stephen_rufle
AOL IM: stephen1rufle

Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Rishi Solanki
In reply to this post by Jacques Le Roux
Hi Jacques,
Sorry, some how I missed your question.
Your question is not clear to me. Please Explain.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Thu, Nov 5, 2009 at 4:04 PM, Jacques Le Roux <
[hidden email]> wrote:

> Hi Rishi,
>
> What using Ajax and jsonservice-multi adds to a form of type multi ?
>
> Thanks
>
> Jacques
>
> From: "Rishi Solanki" <[hidden email]>
>
>  Hi Stephen,
>> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
>> Here the form submit use the AJAX and handled using the
>> "jsonservice-multi"
>> handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
>> HTH !
>>
>> Rishi Solanki
>> Enterprise Software Developer
>> HotWax Media Pvt. Ltd.
>>
>>
>> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]>
>> wrote:
>>
>>  I am looking for an example of a screen that has a list of edits, but
>>> only
>>> a single save function. I have seen examples [1] of a list that has
>>> update
>>> and delete buttons on each row.
>>>
>>> [1]
>>>
>>> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>>>
>>> More generally what would be the best way to deal with this concept. My
>>> thought is that I would still have a form on each row (as it is now for
>>> EditProductPrices), but the global save function would use javascript to
>>> submit each for in turn. I thinking in the correct direction?
>>>
>>>
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Jacques Le Roux
Administrator
Hi Rishi,

No worries, I was just curious. We can do the same thing without AJAX and the "jsonservice-multi", isn'it ?
So I wondered what it adds, because I guess there is something more adding them, at least there (CostCenters)

Thanks

Jacques

From: "Rishi Solanki" <[hidden email]>

> Hi Jacques,
> Sorry, some how I missed your question.
> Your question is not clear to me. Please Explain.
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Thu, Nov 5, 2009 at 4:04 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Rishi,
>>
>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Rishi Solanki" <[hidden email]>
>>
>>  Hi Stephen,
>>> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
>>> Here the form submit use the AJAX and handled using the
>>> "jsonservice-multi"
>>> handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
>>> HTH !
>>>
>>> Rishi Solanki
>>> Enterprise Software Developer
>>> HotWax Media Pvt. Ltd.
>>>
>>>
>>> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]>
>>> wrote:
>>>
>>>  I am looking for an example of a screen that has a list of edits, but
>>>> only
>>>> a single save function. I have seen examples [1] of a list that has
>>>> update
>>>> and delete buttons on each row.
>>>>
>>>> [1]
>>>>
>>>> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>>>>
>>>> More generally what would be the best way to deal with this concept. My
>>>> thought is that I would still have a form on each row (as it is now for
>>>> EditProductPrices), but the global save function would use javascript to
>>>> submit each for in turn. I thinking in the correct direction?
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Rishi Solanki
Hi Jacques,
As in the ServiceMultiEventHandler *beganTrans = false *is set in invoke.
Now if we got error in Nth line then it will return error as list of error
of N number of items, error.jsp will show all the errors in the list.
By AJAXfying the request now we are able to show the user friendly error
"Total amountPercentage is not equal 100."
Still one more improvement remains,need to show error at the line where it
occurs for first time, will do it in the next phase of implementation.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Fri, Nov 13, 2009 at 7:20 PM, Jacques Le Roux <
[hidden email]> wrote:

> Hi Rishi,
>
> No worries, I was just curious. We can do the same thing without AJAX and
> the "jsonservice-multi", isn'it ?
> So I wondered what it adds, because I guess there is something more adding
> them, at least there (CostCenters)
>
>
> Thanks
>
> Jacques
>
> From: "Rishi Solanki" <[hidden email]>
>
>> Hi Jacques,
>> Sorry, some how I missed your question.
>> Your question is not clear to me. Please Explain.
>>
>> Rishi Solanki
>> Enterprise Software Developer
>> HotWax Media Pvt. Ltd.
>>
>>
>> On Thu, Nov 5, 2009 at 4:04 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>  Hi Rishi,
>>>
>>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "Rishi Solanki" <[hidden email]>
>>>
>>>  Hi Stephen,
>>>
>>>> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
>>>> Here the form submit use the AJAX and handled using the
>>>> "jsonservice-multi"
>>>> handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
>>>> HTH !
>>>>
>>>> Rishi Solanki
>>>> Enterprise Software Developer
>>>> HotWax Media Pvt. Ltd.
>>>>
>>>>
>>>> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]>
>>>> wrote:
>>>>
>>>>  I am looking for an example of a screen that has a list of edits, but
>>>>
>>>>> only
>>>>> a single save function. I have seen examples [1] of a list that has
>>>>> update
>>>>> and delete buttons on each row.
>>>>>
>>>>> [1]
>>>>>
>>>>>
>>>>> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>>>>>
>>>>> More generally what would be the best way to deal with this concept. My
>>>>> thought is that I would still have a form on each row (as it is now for
>>>>> EditProductPrices), but the global save function would use javascript
>>>>> to
>>>>> submit each for in turn. I thinking in the correct direction?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Example of saving a list of edits in one shot

Jacques Le Roux
Administrator
Hi Rishi,

Thanks for the clear explanation

Jacques

From: "Rishi Solanki" <[hidden email]>

> Hi Jacques,
> As in the ServiceMultiEventHandler *beganTrans = false *is set in invoke.
> Now if we got error in Nth line then it will return error as list of error
> of N number of items, error.jsp will show all the errors in the list.
> By AJAXfying the request now we are able to show the user friendly error
> "Total amountPercentage is not equal 100."
> Still one more improvement remains,need to show error at the line where it
> occurs for first time, will do it in the next phase of implementation.
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Fri, Nov 13, 2009 at 7:20 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Rishi,
>>
>> No worries, I was just curious. We can do the same thing without AJAX and
>> the "jsonservice-multi", isn'it ?
>> So I wondered what it adds, because I guess there is something more adding
>> them, at least there (CostCenters)
>>
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Rishi Solanki" <[hidden email]>
>>
>>> Hi Jacques,
>>> Sorry, some how I missed your question.
>>> Your question is not clear to me. Please Explain.
>>>
>>> Rishi Solanki
>>> Enterprise Software Developer
>>> HotWax Media Pvt. Ltd.
>>>
>>>
>>> On Thu, Nov 5, 2009 at 4:04 PM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>>  Hi Rishi,
>>>>
>>>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>> From: "Rishi Solanki" <[hidden email]>
>>>>
>>>>  Hi Stephen,
>>>>
>>>>> Have look at - https://demo.ofbiz.org/accounting/control/CostCenters
>>>>> Here the form submit use the AJAX and handled using the
>>>>> "jsonservice-multi"
>>>>> handler of org.ofbiz.webapp.event.JSONServiceMultiEventHandler.
>>>>> HTH !
>>>>>
>>>>> Rishi Solanki
>>>>> Enterprise Software Developer
>>>>> HotWax Media Pvt. Ltd.
>>>>>
>>>>>
>>>>> On Wed, Nov 4, 2009 at 11:04 PM, Stephen Rufle <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>  I am looking for an example of a screen that has a list of edits, but
>>>>>
>>>>>> only
>>>>>> a single save function. I have seen examples [1] of a list that has
>>>>>> update
>>>>>> and delete buttons on each row.
>>>>>>
>>>>>> [1]
>>>>>>
>>>>>>
>>>>>> https://localhost:8443/catalog/control/EditProductPrices?productId=GZ-1004
>>>>>>
>>>>>> More generally what would be the best way to deal with this concept. My
>>>>>> thought is that I would still have a form on each row (as it is now for
>>>>>> EditProductPrices), but the global save function would use javascript
>>>>>> to
>>>>>> submit each for in turn. I thinking in the correct direction?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>