[ 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