You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Stephen Rufle <sr...@salmonllc.com> on 2009/11/04 18:34:47 UTC

Example of saving a list of edits in one shot

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?



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

Posted by Stephen Rufle <sr...@salmonllc.com>.
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 <srufle@salmonllc.com 
> <ma...@salmonllc.com>> 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
srufle@salmonllc.com
H1:480-626-8022
H2:480-802-7173
Yahoo IM: stephen_rufle
AOL IM: stephen1rufle


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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Rishi,

Thanks for the clear explanation

Jacques

From: "Rishi Solanki" <ri...@gmail.com>
> 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 <
> jacques.le.roux@les7arts.com> 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" <ri...@gmail.com>
>>
>>> 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 <
>>> jacques.le.roux@les7arts.com> wrote:
>>>
>>>  Hi Rishi,
>>>>
>>>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>> From: "Rishi Solanki" <ri...@gmail.com>
>>>>
>>>>  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 <sr...@salmonllc.com>
>>>>> 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?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


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

Posted by Rishi Solanki <ri...@gmail.com>.
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 <
jacques.le.roux@les7arts.com> 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" <ri...@gmail.com>
>
>> 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 <
>> jacques.le.roux@les7arts.com> wrote:
>>
>>  Hi Rishi,
>>>
>>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "Rishi Solanki" <ri...@gmail.com>
>>>
>>>  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 <sr...@salmonllc.com>
>>>> 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?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <ri...@gmail.com>
> 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 <
> jacques.le.roux@les7arts.com> wrote:
> 
>> Hi Rishi,
>>
>> What using Ajax and jsonservice-multi adds to a form of type multi ?
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Rishi Solanki" <ri...@gmail.com>
>>
>>  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 <sr...@salmonllc.com>
>>> 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?
>>>>
>>>>
>>>>
>>>>
>>>
>>
>


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

Posted by Rishi Solanki <ri...@gmail.com>.
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 <
jacques.le.roux@les7arts.com> wrote:

> Hi Rishi,
>
> What using Ajax and jsonservice-multi adds to a form of type multi ?
>
> Thanks
>
> Jacques
>
> From: "Rishi Solanki" <ri...@gmail.com>
>
>  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 <sr...@salmonllc.com>
>> 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?
>>>
>>>
>>>
>>>
>>
>

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Rishi,

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

Thanks

Jacques

From: "Rishi Solanki" <ri...@gmail.com>
> 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 <sr...@salmonllc.com> 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?
>>
>>
>>
>


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

Posted by Rishi Solanki <ri...@gmail.com>.
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 <sr...@salmonllc.com> 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?
>
>
>