[jira] Created: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

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

[jira] Created: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

Nicolas Malin (Jira)
Prev/Next links in multi forms are messed up after form is submitted
--------------------------------------------------------------------

                 Key: OFBIZ-222
                 URL: http://issues.apache.org/jira/browse/OFBIZ-222
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: framework
            Reporter: Jacopo Cappellato


Prev/Next links in multi forms are messed up after form is submitted.

For example, in the ManageQuotePrices, this is the prev/next link before the multi form is submitted:

https://localhost:8443/ordermgr/control/ManageQuotePrices?quoteId=10060&VIEW_SIZE=2&VIEW_INDEX=1

(good);
and this is the link after the form is submitted:

https://localhost:8443/ordermgr/control/ManageQuotePrices?
submitButton=Submit&
quoteItemSeqId_o_1=00003&
quoteItemSeqId_o_0=00004&
averageCost_o_1=0&
quoteId_o_1=10060&
averageCost_o_0=0&
quoteId_o_0=10060&
quoteUnitPrice_o_1=59.99&
quoteUnitPrice_o_0=2%2C799.99&
_useRowSubmit=Y&
_rowSubmit_o_1=Y&
costToPriceMult_o_1=1&
_rowSubmit_o_0=Y&
_rowCount=2&
costToPriceMult_o_0=1&
productId_o_1=WG-1111&
productId_o_0=GZ-1005&
quantity_o_1=80&
quantity_o_0=10&
defaultQuoteUnitPrice_o_1=0&
quoteId=10060&
defaultQuoteUnitPrice_o_0=0&
VIEW_SIZE=2&
VIEW_INDEX=1


(wrong).

Probably, the problem is that the queryString variable in the HtmlFormRenderer.renderNextPrev() method, after the form is submitted, contains the form fields needed to call the multi-service.

Any hints on how I could fix the issue?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-222?page=all ]

Jacopo Cappellato updated OFBIZ-222:
------------------------------------

    Attachment: proposed-prev-next-multiform.patch

File and comment from Leon Torres:

 There are two ways to fix this. The first way is bottom-up, starting from whatever process is used to construct the query string. The other way is top-down, starting form the queryString that we're given in the form widget html rendering method and stripping out the multi-form data.

Since the approach seems to be top-down in renderNextPrev(), I created a top-down way of stripping the multi form data. See attached patch. It's not complete though, it doesn't strip the submit button nor the _rowCount. So I'm not sure this is the right way.

Comment by Leon Torres [20/Mar/06 09:36 PM]
[ Permlink ]
Also, I found a neat way to reproduce this bug. First, find any form widget of type="list" that has a lot of data and no target (target="").

Change it to type="multi".

Then add a submit button like this,
<field name="submitButton" title="Press Me"><submit button-type="button"/></field>

Go look at the list. Press the submit button named "Press Me", then try navigating the list using the Prev/Next buttons. You should see the multi form data in the link.


> Prev/Next links in multi forms are messed up after form is submitted
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-222
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-222
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Jacopo Cappellato
>         Attachments: proposed-prev-next-multiform.patch
>
>
> Prev/Next links in multi forms are messed up after form is submitted.
> For example, in the ManageQuotePrices, this is the prev/next link before the multi form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?quoteId=10060&VIEW_SIZE=2&VIEW_INDEX=1
> (good);
> and this is the link after the form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?
> submitButton=Submit&
> quoteItemSeqId_o_1=00003&
> quoteItemSeqId_o_0=00004&
> averageCost_o_1=0&
> quoteId_o_1=10060&
> averageCost_o_0=0&
> quoteId_o_0=10060&
> quoteUnitPrice_o_1=59.99&
> quoteUnitPrice_o_0=2%2C799.99&
> _useRowSubmit=Y&
> _rowSubmit_o_1=Y&
> costToPriceMult_o_1=1&
> _rowSubmit_o_0=Y&
> _rowCount=2&
> costToPriceMult_o_0=1&
> productId_o_1=WG-1111&
> productId_o_0=GZ-1005&
> quantity_o_1=80&
> quantity_o_0=10&
> defaultQuoteUnitPrice_o_1=0&
> quoteId=10060&
> defaultQuoteUnitPrice_o_0=0&
> VIEW_SIZE=2&
> VIEW_INDEX=1
> (wrong).
> Probably, the problem is that the queryString variable in the HtmlFormRenderer.renderNextPrev() method, after the form is submitted, contains the form fields needed to call the multi-service.
> Any hints on how I could fix the issue?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-222?page=comments#action_12433775 ]
           
Jacopo Cappellato commented on OFBIZ-222:
-----------------------------------------

Comment by David Jones:

 I was considering just throwing this in, but it would just be a temporary fix and as mentioned isn't quite complete.

I don't really like the idea of parsing parameter strings and pulling things out. Sometimes it's the easiest way to go, but if possible it's much better to work on the parameter map before it is expanded into a String.

I guess in short this needs more review and probably more work to get a cleaner solution. I had a few hours today to work through things, but now I need to switch over the a small project and then to taxes for the rest of the week...



> Prev/Next links in multi forms are messed up after form is submitted
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-222
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-222
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Jacopo Cappellato
>         Attachments: proposed-prev-next-multiform.patch
>
>
> Prev/Next links in multi forms are messed up after form is submitted.
> For example, in the ManageQuotePrices, this is the prev/next link before the multi form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?quoteId=10060&VIEW_SIZE=2&VIEW_INDEX=1
> (good);
> and this is the link after the form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?
> submitButton=Submit&
> quoteItemSeqId_o_1=00003&
> quoteItemSeqId_o_0=00004&
> averageCost_o_1=0&
> quoteId_o_1=10060&
> averageCost_o_0=0&
> quoteId_o_0=10060&
> quoteUnitPrice_o_1=59.99&
> quoteUnitPrice_o_0=2%2C799.99&
> _useRowSubmit=Y&
> _rowSubmit_o_1=Y&
> costToPriceMult_o_1=1&
> _rowSubmit_o_0=Y&
> _rowCount=2&
> costToPriceMult_o_0=1&
> productId_o_1=WG-1111&
> productId_o_0=GZ-1005&
> quantity_o_1=80&
> quantity_o_0=10&
> defaultQuoteUnitPrice_o_1=0&
> quoteId=10060&
> defaultQuoteUnitPrice_o_0=0&
> VIEW_SIZE=2&
> VIEW_INDEX=1
> (wrong).
> Probably, the problem is that the queryString variable in the HtmlFormRenderer.renderNextPrev() method, after the form is submitted, contains the form fields needed to call the multi-service.
> Any hints on how I could fix the issue?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-222?page=all ]

Jacopo Cappellato reassigned OFBIZ-222:
---------------------------------------

    Assignee: Jacopo Cappellato

> Prev/Next links in multi forms are messed up after form is submitted
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-222
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-222
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Jacopo Cappellato
>         Assigned To: Jacopo Cappellato
>         Attachments: proposed-prev-next-multiform.patch
>
>
> Prev/Next links in multi forms are messed up after form is submitted.
> For example, in the ManageQuotePrices, this is the prev/next link before the multi form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?quoteId=10060&VIEW_SIZE=2&VIEW_INDEX=1
> (good);
> and this is the link after the form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?
> submitButton=Submit&
> quoteItemSeqId_o_1=00003&
> quoteItemSeqId_o_0=00004&
> averageCost_o_1=0&
> quoteId_o_1=10060&
> averageCost_o_0=0&
> quoteId_o_0=10060&
> quoteUnitPrice_o_1=59.99&
> quoteUnitPrice_o_0=2%2C799.99&
> _useRowSubmit=Y&
> _rowSubmit_o_1=Y&
> costToPriceMult_o_1=1&
> _rowSubmit_o_0=Y&
> _rowCount=2&
> costToPriceMult_o_0=1&
> productId_o_1=WG-1111&
> productId_o_0=GZ-1005&
> quantity_o_1=80&
> quantity_o_0=10&
> defaultQuoteUnitPrice_o_1=0&
> quoteId=10060&
> defaultQuoteUnitPrice_o_0=0&
> VIEW_SIZE=2&
> VIEW_INDEX=1
> (wrong).
> Probably, the problem is that the queryString variable in the HtmlFormRenderer.renderNextPrev() method, after the form is submitted, contains the form fields needed to call the multi-service.
> Any hints on how I could fix the issue?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-222) Prev/Next links in multi forms are messed up after form is submitted

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-222?page=all ]

Jacopo Cappellato closed OFBIZ-222.
-----------------------------------

    Resolution: Fixed

Thanks to all for your help,

I've fixed this following David's suggestion (but thanks to Leon for his help too).


> Prev/Next links in multi forms are messed up after form is submitted
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-222
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-222
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>            Reporter: Jacopo Cappellato
>         Assigned To: Jacopo Cappellato
>         Attachments: proposed-prev-next-multiform.patch
>
>
> Prev/Next links in multi forms are messed up after form is submitted.
> For example, in the ManageQuotePrices, this is the prev/next link before the multi form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?quoteId=10060&VIEW_SIZE=2&VIEW_INDEX=1
> (good);
> and this is the link after the form is submitted:
> https://localhost:8443/ordermgr/control/ManageQuotePrices?
> submitButton=Submit&
> quoteItemSeqId_o_1=00003&
> quoteItemSeqId_o_0=00004&
> averageCost_o_1=0&
> quoteId_o_1=10060&
> averageCost_o_0=0&
> quoteId_o_0=10060&
> quoteUnitPrice_o_1=59.99&
> quoteUnitPrice_o_0=2%2C799.99&
> _useRowSubmit=Y&
> _rowSubmit_o_1=Y&
> costToPriceMult_o_1=1&
> _rowSubmit_o_0=Y&
> _rowCount=2&
> costToPriceMult_o_0=1&
> productId_o_1=WG-1111&
> productId_o_0=GZ-1005&
> quantity_o_1=80&
> quantity_o_0=10&
> defaultQuoteUnitPrice_o_1=0&
> quoteId=10060&
> defaultQuoteUnitPrice_o_0=0&
> VIEW_SIZE=2&
> VIEW_INDEX=1
> (wrong).
> Probably, the problem is that the queryString variable in the HtmlFormRenderer.renderNextPrev() method, after the form is submitted, contains the form fields needed to call the multi-service.
> Any hints on how I could fix the issue?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira